Running the default task of build, received this error
FAILURE: Build aborted because of an internal error.
- What went wrong:
Build aborted because of an unexpected internal error. Please file an issue at: www.gradle.org.
- Try:
Run with -d option to get additional debug info.
- Exception is:
java.lang.IllegalArgumentException: Neither path nor baseDir may be null or empty string. path='null' basedir='/staging/sallain/parent/component2'
at org.gradle.api.internal.file.BaseDirConverter.doResolve(BaseDirConverter.java:36) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:35) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:31) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.PathResolvingFileCollection.resolveToFilesAndFileCollections(PathResolvingFileCollection.java:138) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.PathResolvingFileCollection.addSourceCollections(PathResolvingFileCollection.java:91) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:127) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.CompositeFileCollection.addDependencies(CompositeFileCollection.java:120) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.PathResolvingFileCollection.addDependencies(PathResolvingFileCollection.java:85) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.CompositeFileCollection$2.getDependencies(CompositeFileCollection.java:109) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.tasks.DefaultTaskDependency.getDependencies(DefaultTaskDependency.java:52) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.file.CompositeFileCollection$2.getDependencies(CompositeFileCollection.java:110) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.tasks.DefaultTaskDependency.getDependencies(DefaultTaskDependency.java:52) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DefaultTaskGraphExecuter.fillDag(DefaultTaskGraphExecuter.java:112) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DefaultTaskGraphExecuter.addTasks(DefaultTaskGraphExecuter.java:66) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.TaskNameResolvingBuildExecuter.select(TaskNameResolvingBuildExecuter.java:46) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DelegatingBuildExecuter.select(DelegatingBuildExecuter.java:46) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.ProjectDefaultsBuildExecuter.select(ProjectDefaultsBuildExecuter.java:42) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DelegatingBuildExecuter.select(DelegatingBuildExecuter.java:46) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:52) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:185) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:128) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.GradleLauncher.run(GradleLauncher.java:98) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.launcher.Main.execute(Main.java:93) [gradle-launcher-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.launcher.Main.main(Main.java:42) [gradle-launcher-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_12]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_12]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_12]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_12]
at org.gradle.launcher.GradleMain.main(GradleMain.java:50) [gradle-launcher-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
Explicitly running gradle compileJava produces this:
- Exception is:
java.lang.NullPointerException: null
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskInfo.<init>(DefaultTaskArtifactStateRepository.java:229) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository.getThisExecution(DefaultTaskArtifactStateRepository.java:91) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository.getStateFor(DefaultTaskArtifactStateRepository.java:48) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.project.ExecutionShortCircuitTaskExecuter.execute(ExecutionShortCircuitTaskExecuter.java:55) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExecuter.java:63) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecuter.java:36) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:202) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:174) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:193) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:128) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.GradleLauncher.run(GradleLauncher.java:98) [gradle-core-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.launcher.Main.execute(Main.java:93) [gradle-launcher-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at org.gradle.launcher.Main.main(Main.java:42) [gradle-launcher-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_12]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_12]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_12]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_12]
at org.gradle.launcher.GradleMain.main(GradleMain.java:50) [gradle-launcher-0.9-20091110044632+0000.jar:0.9-20091110044632+0000]
I should note, that I scrubbed baseDir in this message to not be the real one, but the original stack trace shows the correct baseDir. This is an instance where one subproject depends upon another subproject and both other them are using the war plugin. Not sure that's the issue at this point though.
Aside from changing the fileset()'s to from's and webInf() to webInf
{ from ... }
, there are no other changes in the build.gradle files, which work as expected with gradle 0.8.
I've tracked down the issue to the following dependency statement
dependencies
{
compile(project(':component1'))
{
artifact
{ name = 'component1' ; type = 'jar' }
}
}
This works in 0.8 to get only the jar file instead of the war file which is also part of the exposed artifacts, but now crashes under the 0.9 snapshot.
Of course removing that line allows the build to work, but both the war and jar are included in component2.war which is not desired; hence the whole reason for constraining the actual artifact that is to be depended upon.
|