IllegalStateException without any further details in included build


(Thorsten Schöning) #1

I have a composite build like the following:

A includes B + C
C includes B

gradlew eclipse on B and C individually succeed, fails on A with the following exception mentioning project C:

org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':de.am_soft.docbeam.raw.server.build'.
		at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:79)
		at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:73)
		at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:54)
		at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:107)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
		at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
		at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:68)
		at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:687)
		at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:140)
		at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
		at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
		at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:41)
		at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:274)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
		at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
		at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
		at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:182)
		at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:141)
		at org.gradle.initialization.DefaultGradleLauncher.getConfiguredBuild(DefaultGradleLauncher.java:119)
		at org.gradle.initialization.DefaultGradleLauncher.scheduleTasks(DefaultGradleLauncher.java:198)
		at org.gradle.composite.internal.DefaultIncludedBuild.execute(DefaultIncludedBuild.java:239)
		at org.gradle.composite.internal.DefaultIncludedBuildController.doBuild(DefaultIncludedBuildController.java:196)
		at org.gradle.composite.internal.DefaultIncludedBuildController.run(DefaultIncludedBuildController.java:106)
		at org.gradle.composite.internal.DefaultIncludedBuildControllers$BuildOpRunnable.run(DefaultIncludedBuildControllers.java:118)
		at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
		at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
		at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.IllegalStateException
	at org.gradle.composite.internal.DefaultIncludedBuildController.queueForExecution(DefaultIncludedBuildController.java:235)
	at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.addTask(DefaultIncludedBuildTaskGraph.java:47)
	at org.gradle.composite.internal.CompositeBuildClassPathInitializer.build(CompositeBuildClassPathInitializer.java:66)
	at org.gradle.composite.internal.CompositeBuildClassPathInitializer.execute(CompositeBuildClassPathInitializer.java:47)
	at org.gradle.composite.internal.CompositeBuildClassPathInitializer.execute(CompositeBuildClassPathInitializer.java:32)
	at org.gradle.api.internal.initialization.DefaultScriptClassPathResolver.resolveClassPath(DefaultScriptClassPathResolver.java:37)
	at org.gradle.api.internal.initialization.DefaultScriptHandler.getScriptClassPath(DefaultScriptHandler.java:74)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.defineScriptHandlerClassScope(DefaultPluginRequestApplicator.java:204)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:140)
	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:186)
	at org.gradle.configuration.BuildOperationScriptPlugin$1$1.run(BuildOperationScriptPlugin.java:69)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.configuration.BuildOperationScriptPlugin$1.execute(BuildOperationScriptPlugin.java:66)
	at org.gradle.configuration.BuildOperationScriptPlugin$1.execute(BuildOperationScriptPlugin.java:63)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:48)
	at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:63)
	at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:41)
	at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
	at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:105)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:68)
	at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:687)
	at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:140)
	at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
	at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
	at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:41)
	at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:274)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:182)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:141)
	at org.gradle.initialization.DefaultGradleLauncher.getConfiguredBuild(DefaultGradleLauncher.java:119)
	at org.gradle.initialization.DefaultGradleLauncher.scheduleTasks(DefaultGradleLauncher.java:198)
	at org.gradle.composite.internal.DefaultIncludedBuild.execute(DefaultIncludedBuild.java:239)
	at org.gradle.composite.internal.DefaultIncludedBuildController.doBuild(DefaultIncludedBuildController.java:196)
	at org.gradle.composite.internal.DefaultIncludedBuildController.run(DefaultIncludedBuildController.java:106)
	at org.gradle.composite.internal.DefaultIncludedBuildControllers$BuildOpRunnable.run(DefaultIncludedBuildControllers.java:118)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:748)

Project B is applying a plugin doing some modifications to Eclipse’ settings in case the task eclipse gets executed. C provides a plugin reconfiguring the build of A ONLY, not caring about eclipse at all. That’s interesting because running build, clean, publish etc. on A succeeds, only eclipse is the problem. Even cleanEclipse on A succeeds.

But the problem is encountered during configuration of C and because there aren’t any additional details I’m a bit lost here. The interesting thing to note is that the stacktrace only contains classes from Gradle, none of me.

Additionally, I’m able to get things to work if I remove C as an included build from A and do everything manually which the included build should deal with, dependencies, classpath etc.

Any ideas for the problem? Thanks!


(Thorsten Schöning) #2

Some important things to note: Some tasks of eclipse are actually ran before the exception gets thrown, so that e.g. the file org.eclipse.jdt.core.prefs is created. My plugin is changing the contents of that file and my own contents are in that file as well. The additionally needed files created by my plugin are not created anymore, though.

What I don’t understand is, why that error gets thrown in de.am_soft.docbeam.raw.server.build, when de.am_soft.docbeam.raw.server already executes tasks and creates prefs files for Eclipse? I thought that eclipse is only run for the project I issued it for and if its tasks are executed, build.gradle and all mentioned plugins should have been processed in a way that all task can run.

The stacktrace OTOH clearly shows that some tasks are added while already running some, but in the included project de.am_soft.docbeam.raw.server.build. The logs don’t mention any additional configuration or such as well after executing the first tasks:

12:57:07.280 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipseJdt (Thread[Task worker for ':' Thread 7,5,main]) started.
12:57:07.280 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 
12:57:07.280 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :eclipseJdt
12:57:07.280 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipseJdt' started
12:57:07.280 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':eclipseJdt'
12:57:07.280 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':eclipseJdt' into context took 0.0 secs.
12:57:07.281 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':eclipseJdt' is up-to-date
12:57:07.281 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Implementation for task ':eclipseJdt': org.gradle.plugins.ide.eclipse.GenerateEclipseJdt_Decorated@3f0709a55268ce60c478862388d0730a
12:57:07.281 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Action implementations for task ':eclipseJdt': [org.gradle.plugins.ide.eclipse.GenerateEclipseJdt_Decorated@3f0709a55268ce60c478862388d0730a]
12:57:07.281 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property inputFileIfExists (AbsolutePathInput) for task ':eclipseJdt'
12:57:07.281 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property outputFile (Output) for task ':eclipseJdt'
12:57:07.282 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Task ':eclipseJdt' is not up-to-date because:
  Task.upToDateWhen is false.
12:57:07.282 [DEBUG] [org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter] Ensuring parent directory exists for property outputFile (Output) at C:\Users\tschoening\Documents\Eclipse\Java DocBeam\de.am_soft.docbeam.raw.server\.settings\org.eclipse.jdt.core.prefs
12:57:07.282 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':eclipseJdt'.
12:57:07.282 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute generate for :eclipseJdt' started
12:57:07.290 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute generate for :eclipseJdt'
12:57:07.291 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute generate for :eclipseJdt' completed
12:57:07.291 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property outputFile (Output) for task ':eclipseJdt'
12:57:07.291 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
12:57:07.291 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':eclipseJdt'
12:57:07.291 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :eclipseJdt'
12:57:07.292 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipseJdt' completed
12:57:07.292 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipseJdt (Thread[Task worker for ':' Thread 7,5,main]) completed. Took 0.011 secs.
12:57:07.292 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on :
12:57:07.292 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.84 completed (1 worker(s) in use)
12:57:07.292 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on root.1.84
12:57:07.292 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: acquired lock on :
12:57:07.292 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.84 started (1 worker(s) in use).
12:57:07.292 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: acquired lock on root.1.84
12:57:07.292 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipseProject (Thread[Task worker for ':' Thread 7,5,main]) started.
12:57:07.292 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 
12:57:07.292 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :eclipseProject
12:57:07.292 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipseProject' started
12:57:07.292 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':eclipseProject'
12:57:07.293 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':eclipseProject' into context took 0.0 secs.
12:57:07.293 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':eclipseProject' is up-to-date
12:57:07.293 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Implementation for task ':eclipseProject': org.gradle.plugins.ide.eclipse.GenerateEclipseProject_Decorated@3f0709a55268ce60c478862388d0730a
12:57:07.293 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Action implementations for task ':eclipseProject': [org.gradle.plugins.ide.eclipse.GenerateEclipseProject_Decorated@3f0709a55268ce60c478862388d0730a]
12:57:07.293 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property inputFileIfExists (AbsolutePathInput) for task ':eclipseProject'
12:57:07.293 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property outputFile (Output) for task ':eclipseProject'
12:57:07.293 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Task ':eclipseProject' is not up-to-date because:
  Task.upToDateWhen is false.
12:57:07.294 [DEBUG] [org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter] Ensuring parent directory exists for property outputFile (Output) at C:\Users\tschoening\Documents\Eclipse\Java DocBeam\de.am_soft.docbeam.raw.server\.project
12:57:07.294 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':eclipseProject'.
12:57:07.294 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute generate for :eclipseProject' started
12:57:07.297 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute generate for :eclipseProject'
12:57:07.297 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute generate for :eclipseProject' completed
12:57:07.297 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property outputFile (Output) for task ':eclipseProject'
12:57:07.298 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
12:57:07.298 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':eclipseProject'
12:57:07.298 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :eclipseProject'
12:57:07.298 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipseProject' completed
12:57:07.298 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipseProject (Thread[Task worker for ':' Thread 7,5,main]) completed. Took 0.005 secs.
12:57:07.298 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on :
12:57:07.298 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.84 completed (1 worker(s) in use)
12:57:07.298 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on root.1.84
12:57:07.298 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: acquired lock on :
12:57:07.298 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.84 started (1 worker(s) in use).
12:57:07.298 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: acquired lock on root.1.84
12:57:07.298 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on :
12:57:07.299 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.84 completed (1 worker(s) in use)
12:57:07.299 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on root.1.84
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 7,5,main]] finished, busy: 0.193 secs, idle: 0.005 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 5,5,main]] finished, busy: 0.0 secs, idle: 0.198 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 4,5,main]] finished, busy: 0.0 secs, idle: 0.197 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 3,5,main]] finished, busy: 0.0 secs, idle: 0.198 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 9,5,main]] finished, busy: 0.0 secs, idle: 0.198 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 6,5,main]] finished, busy: 0.0 secs, idle: 0.198 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.0 secs, idle: 0.198 secs
12:57:07.299 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 2,5,main]] finished, busy: 0.0 secs, idle: 0.198 secs
12:57:07.300 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskExecutionGraph] Timing: Executing the DAG took 0.217 secs
12:57:07.300 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
12:57:07.300 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run tasks' completed
12:57:07.301 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
12:57:07.301 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:57:07.301 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
12:57:07.301 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
12:57:07.301 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring project ':de.am_soft.docbeam.raw.server.build'.
12:57:07.301 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.lang.IllegalStateException (no error message)

(Thorsten Schöning) #3

The problem seems to be after running the task eclipseProject and before running the final task eclipse. Besides what the error message in the above logs say, I can not see any additional configuration attempts in the logs of a successful execution:

20:27:46.475 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':eclipseProject'
20:27:46.475 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :eclipseProject'
20:27:46.475 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipseProject' completed
20:27:46.475 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipseProject (Thread[Task worker for ':',5,main]) completed. Took 0.004 secs.
20:27:46.475 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on :
20:27:46.475 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.29 completed (1 worker(s) in use)
20:27:46.475 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on root.1.29
20:27:46.475 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': acquired lock on :
20:27:46.475 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.29 started (1 worker(s) in use).
20:27:46.475 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': acquired lock on root.1.29
20:27:46.475 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipse (Thread[Task worker for ':',5,main]) started.
20:27:46.475 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 
20:27:46.475 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :eclipse
20:27:46.475 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipse' started
20:27:46.475 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':eclipse'
20:27:46.475 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':eclipse' into context took 0.0 secs.
20:27:46.476 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':eclipse' is up-to-date
20:27:46.476 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Task ':eclipse' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
20:27:46.476 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':eclipse'.
20:27:46.476 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doFirst {} action for :eclipse' started
20:27:46.476 [DEBUG] [de.am_soft.build.gradle.plugin.eclipse.DefaultCodeStyle] Resolved: 'saveActions.prefs' -> 'C:\Users\tschoening\Documents\Eclipse\Java DocBeam\de.am_soft.docbeam.raw.server.build\..\..\..\Konfigurationen\trunk\Eclipse\Code Style\Java\saveActions.prefs'
20:27:46.477 [DEBUG] [de.am_soft.build.gradle.plugin.eclipse.DefaultCodeStyle] Preferences read: 'C:\Users\tschoening\Documents\Eclipse\Java DocBeam\de.am_soft.docbeam.raw.server.build\..\..\..\Konfigurationen\trunk\Eclipse\Code Style\Java\saveActions.prefs' -> {sp_cleanup.use_blocks_only_for_return_and_throw=false, sp_cleanup.make_local_variable_final=true, sp_cleanup.make_private_fields_final=true, sp_cleanup.format_source_code=false, sp_cleanup.always_use_this_for_non_static_field_access=false, sp_cleanup.remove_private_constructors=true, sp_cleanup.format_source_code_changes_only=false, sp_cleanup.remove_unused_imports=false, sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true, sp_cleanup.remove_unused_private_types=true, sp_cleanup.use_this_for_non_static_field_access=false, sp_cleanup.remove_unnecessary_casts=true, sp_cleanup.add_generated_serial_version_id=false, sp_cleanup.remove_redundant_type_arguments=false, sp_cleanup.use_anonymous_class_creation=false, sp_cleanup.use_blocks=false, sp_cleanup.remove_unused_private_fields=true, sp_cleanup.correct_indentation=false, sp_cleanup.remove_trailing_whitespaces_ignore_empty=false, sp_cleanup.always_use_parentheses_in_expressions=false, sp_cleanup.remove_unnecessary_nls_tags=false, sp_cleanup.add_missing_nls_tags=false, sp_cleanup.insert_inferred_type_arguments=false, sp_cleanup.on_save_use_additional_actions=true, sp_cleanup.use_this_for_non_static_method_access=false, sp_cleanup.remove_redundant_modifiers=false, sp_cleanup.add_missing_override_annotations=true, sp_cleanup.remove_redundant_semicolons=false, sp_cleanup.add_missing_override_annotations_interface_methods=true, sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true, sp_cleanup.convert_to_enhanced_for_loop=false, sp_cleanup.sort_members_all=false, sp_cleanup.add_missing_deprecated_annotations=true, sp_cleanup.qualify_static_field_accesses_with_declaring_class=false, sp_cleanup.always_use_this_for_non_static_method_access=false, sp_cleanup.add_default_serial_version_id=true, sp_cleanup.make_variable_declarations_final=false, sp_cleanup.organize_imports=true, sp_cleanup.add_missing_methods=false, sp_cleanup.use_lambda=true, sp_cleanup.always_use_blocks=true, sp_cleanup.convert_functional_interfaces=false, sp_cleanup.qualify_static_method_accesses_with_declaring_class=false, sp_cleanup.remove_unused_private_members=false, sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true, sp_cleanup.add_serial_version_id=false, sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true, sp_cleanup.add_missing_annotations=true, sp_cleanup.use_parentheses_in_expressions=false, sp_cleanup.make_type_abstract_if_missing_method=false, sp_cleanup.sort_members=false, sp_cleanup.remove_trailing_whitespaces_all=true, sp_cleanup.remove_unused_private_methods=true, sp_cleanup.remove_unused_local_variables=false, sp_cleanup.make_parameters_final=false, sp_cleanup.remove_trailing_whitespaces=false, sp_cleanup.never_use_parentheses_in_expressions=true, sp_cleanup.qualify_static_member_accesses_with_declaring_class=false, editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true, sp_cleanup.never_use_blocks=false}
20:27:46.477 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doFirst {} action for :eclipse'
20:27:46.477 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doFirst {} action for :eclipse' completed
20:27:46.477 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' started
20:27:46.485 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :eclipse'
20:27:46.485 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' completed
20:27:46.485 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' started
20:27:46.487 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :eclipse'
20:27:46.487 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' completed
20:27:46.487 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' started
20:27:46.490 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :eclipse'
20:27:46.490 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' completed
20:27:46.490 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' started
20:27:46.492 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :eclipse'
20:27:46.492 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :eclipse' completed
20:27:46.492 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
20:27:46.492 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':eclipse'
20:27:46.492 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :eclipse'
20:27:46.492 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :eclipse' completed
20:27:46.492 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :eclipse (Thread[Task worker for ':',5,main]) completed. Took 0.016 secs.
20:27:46.492 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on :
20:27:46.492 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.29 completed (1 worker(s) in use)
20:27:46.492 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on root.1.29
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.077 secs, idle: 0.007 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 7,5,main]] finished, busy: 0.0 secs, idle: 0.083 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 6,5,main]] finished, busy: 0.0 secs, idle: 0.083 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 14,5,main]] finished, busy: 0.0 secs, idle: 0.083 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 4,5,main]] finished, busy: 0.0 secs, idle: 0.084 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 5,5,main]] finished, busy: 0.0 secs, idle: 0.083 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 2,5,main]] finished, busy: 0.0 secs, idle: 0.084 secs
20:27:46.492 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 3,5,main]] finished, busy: 0.0 secs, idle: 0.084 secs
20:27:46.493 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskExecutionGraph] Timing: Executing the DAG took 0.086 secs
20:27:46.493 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
20:27:46.493 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run tasks' completed
20:27:46.493 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 
20:27:46.493 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD SUCCESSFUL in 2s
20:27:46.493 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 4 actionable tasks: 4 executed

So, it seems that someone is adding some task to late for some reason. I’ve already added log statements in the apply method of my own plugins and those don’t fire at the time when the exception is thrown. Additionally I don’t understand why the error message mentions a project which is clearly configured in the logs not posted here at the start of the build.


(Thorsten Schöning) #4

It seems my problem is resolved after upgrading to Gradle 5.0 RC1. Switching between 4.10 and 5.0 RC1 reliably changes between the exception occurring and not, with the same command line in use and all.