Gradle setupBuild exception


(bbremen) #1

I ran the new setupBuild phase as documented in 1.6-rc-1 on two of my maven projects. This was my first time using gradle and I have no gradle settings of any kind.

One of my maven projects is a reactor build with several modules but simple configuration for each model. The other project is a single project. Unfortunately, I cannot share the exact POM contents. I will try to pair down my POMs until I have a short reproducible example. In the meantime, here is the debug log from the multi-module project. There is a NullPointerException in there:

bbremen@box:~/git/java-common$ gradle --stacktrace --debug setupBuild 14:55:16.487 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:17.198 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:17.205 [INFO] [org.gradle.BuildLogger] Starting Build 14:55:17.206 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /home/bbremen/.gradle 14:55:17.206 [DEBUG] [org.gradle.BuildLogger] Current dir: /home/bbremen/git/java-common 14:55:17.208 [DEBUG] [org.gradle.BuildLogger] Settings file: null 14:55:17.208 [DEBUG] [org.gradle.BuildLogger] Build file: null 14:55:17.230 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources. 14:55:17.232 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave. 14:55:17.233 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: [] 14:55:17.235 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: [] 14:55:17.352 [DEBUG] [org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator] No local repository in Settings file defined. Using default path: /home/bbremen/.m2/repository 14:55:17.636 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:17.648 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:17.649 [DEBUG] [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing: Processing settings took: 0.413 secs 14:55:17.651 [INFO] [org.gradle.BuildLogger] Settings evaluated using empty settings script. 14:55:17.744 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /home/bbremen/git/java-common/gradle.properties 14:55:17.746 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue! 14:55:17.747 [INFO] [org.gradle.BuildLogger] Projects loaded. Root project using empty build file. 14:55:17.749 [INFO] [org.gradle.BuildLogger] Included projects: [root project ‘java-common’] 14:55:17.751 [INFO] [org.gradle.configuration.BuildScriptProcessor] Evaluating root project ‘java-common’ using empty build file. 14:55:17.762 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:17.765 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:17.766 [DEBUG] [org.gradle.configuration.BuildScriptProcessor] Timing: Running the build script took 0.014 secs 14:55:18.130 [INFO] [org.gradle.BuildLogger] All projects evaluated. 14:55:18.145 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskGraphExecuter] Timing: Creating the DAG took 0.006 secs 14:55:18.146 [INFO] [org.gradle.execution.TaskNameResolvingBuildConfigurationAction] Selected primary task ‘setupBuild’ 14:55:18.151 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on task artifact state cache (/home/bbremen/git/java-common/.gradle/1.6-rc-1/taskArtifacts). 14:55:18.153 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired. 14:55:18.156 [INFO] [org.gradle.BuildLogger] Tasks to be executed: [task ‘:maven2Gradle’, task ‘:setupWrapper’, task ‘:setupBuild’] 14:55:18.164 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :maven2Gradle 14:55:18.165 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ‘:maven2Gradle’ 14:55:18.168 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ‘:maven2Gradle’ is up-to-date 14:55:18.169 [INFO] [org.gradle.api.internal.changedetection.changes.ShortCircuitTaskArtifactStateRepository] Task ‘:maven2Gradle’ has not declared any outputs, assuming that it is out-of-date. 14:55:18.171 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] task ‘:maven2Gradle’ is not up-to-date 14:55:18.172 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task artifact state cache (/home/bbremen/git/java-common/.gradle/1.6-rc-1/taskArtifacts). 14:55:18.173 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ‘:maven2Gradle’. 14:55:18.181 [LIFECYCLE] [org.gradle.util.DeprecationLogger] Maven to Gradle conversion is an incubating feature. Enjoy it and let us know how it works for you. 14:55:18.929 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c] 14:55:18.930 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on task artifact state cache (/home/bbremen/git/java-common/.gradle/1.6-rc-1/taskArtifacts). 14:55:18.931 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired. 14:55:18.932 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ‘:maven2Gradle’ 14:55:18.933 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :maven2Gradle FAILED 14:55:18.939 [ERROR] [org.gradle.BuildExceptionReporter]

14:55:18.940 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 14:55:18.941 [ERROR] [org.gradle.BuildExceptionReporter]

14:55:18.942 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 14:55:18.943 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ‘:maven2Gradle’. 14:55:18.944 [ERROR] [org.gradle.BuildExceptionReporter] > Unable to create Maven project model using POM file: /home/bbremen/git/java-common/pom.xml 14:55:18.946 [ERROR] [org.gradle.BuildExceptionReporter]

14:55:18.947 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 14:55:18.949 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:maven2Gradle’. 14:55:18.950 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) 14:55:18.951 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) 14:55:18.951 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 14:55:18.952 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:35) 14:55:18.953 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22) 14:55:18.954 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179) 14:55:18.955 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232) 14:55:18.956 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142) 14:55:18.957 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83) 14:55:18.958 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter.execute(CacheLockReleasingTaskExecuter.java:33) 14:55:18.958 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:58) 14:55:18.959 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ContextualisingTaskExecuter.execute(ContextualisingTaskExecuter.java:34) 14:55:18.960 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter$1.run(CacheLockAcquiringTaskExecuter.java:39) 14:55:18.961 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22) 14:55:18.962 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124) 14:55:18.963 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112) 14:55:18.964 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134) 14:55:18.964 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79) 14:55:18.965 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter.execute(CacheLockAcquiringTaskExecuter.java:37) 14:55:18.966 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57) 14:55:18.967 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41) 14:55:18.967 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51) 14:55:18.968 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52) 14:55:18.969 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42) 14:55:18.970 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:282) 14:55:18.971 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:48) 14:55:18.971 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:34) 14:55:18.972 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:27) 14:55:18.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89) 14:55:18.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) 14:55:18.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) 14:55:18.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) 14:55:18.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) 14:55:18.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31) 14:55:18.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22) 14:55:18.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124) 14:55:18.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112) 14:55:18.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134) 14:55:18.980 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79) 14:55:18.981 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29) 14:55:18.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) 14:55:18.983 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) 14:55:18.983 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) 14:55:18.984 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) 14:55:18.985 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) 14:55:18.986 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54) 14:55:18.986 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166) 14:55:18.987 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) 14:55:18.988 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) 14:55:18.989 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64) 14:55:18.989 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) 14:55:18.990 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) 14:55:18.991 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35) 14:55:18.991 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) 14:55:18.992 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) 14:55:18.993 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) 14:55:18.994 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201) 14:55:18.994 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174) 14:55:18.995 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170) 14:55:18.996 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139) 14:55:18.996 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 14:55:18.997 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 14:55:18.998 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:48) 14:55:18.998 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 14:55:18.999 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:39) 14:55:19.000 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) 14:55:19.000 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) 14:55:19.001 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:26) 14:55:19.002 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.GradleException: Unable to create Maven project model using POM file: /home/bbremen/git/java-common/pom.xml 14:55:19.003 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.buildsetup.plugins.internal.maven.MavenProjectsCreator.create(MavenProjectsCreator.java:54) 14:55:19.003 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.buildsetup.plugins.internal.maven.MavenProjectsCreator$create.call(Unknown Source) 14:55:19.004 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.buildsetup.tasks.ConvertMaven2Gradle.convertNow(ConvertMaven2Gradle.groovy:50) 14:55:19.005 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216) 14:55:19.006 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122) 14:55:19.007 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147) 14:55:19.007 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.buildsetup.tasks.ConvertMaven2Gradle_Decorated.invokeMethod(Unknown Source) 14:55:19.008 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23) 14:55:19.009 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:217) 14:55:19.009 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210) 14:55:19.010 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:199) 14:55:19.011 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:526) 14:55:19.014 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:509) 14:55:19.015 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) 14:55:19.015 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 14:55:19.016 [ERROR] [org.gradle.BuildExceptionReporter] … 67 more 14:55:19.017 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NullPointerException 14:55:19.017 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:279) 14:55:19.018 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:173) 14:55:19.019 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:225) 14:55:19.019 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:272) 14:55:19.020 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) 14:55:19.021 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) 14:55:19.021 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286) 14:55:19.022 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155) 14:55:19.023 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813) 14:55:19.024 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664) 14:55:19.024 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310) 14:55:19.025 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232) 14:55:19.026 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:142) 14:55:19.044 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.mvn3.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:102) 14:55:19.045 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.buildsetup.plugins.internal.maven.MavenProjectsCreator.createNow(MavenProjectsCreator.java:74) 14:55:19.045 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.buildsetup.plugins.internal.maven.MavenProjectsCreator.create(MavenProjectsCreator.java:52) 14:55:19.046 [ERROR] [org.gradle.BuildExceptionReporter] … 81 more 14:55:19.047 [ERROR] [org.gradle.BuildExceptionReporter]

14:55:19.047 [LIFECYCLE] [org.gradle.BuildResultLogger]

14:55:19.048 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED 14:55:19.050 [LIFECYCLE] [org.gradle.BuildResultLogger]

14:55:19.050 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 2.95 secs 14:55:19.070 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task artifact state cache (/home/bbremen/git/java-common/.gradle/1.6-rc-1/taskArtifacts). 14:55:19.072 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@25533ae9, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@7b40aa23, org.gradle.logging.internal.JavaUtilLoggingConfigurer@52621f0c]


(Simen Bekkhus) #2

I’m having the same problem converting my Android-projects. It’s pretty easy to produce, just create a maven android project using the archetype, and try to run setupBuild in that.

See here for example.


(René Groeschke) #3

@Simen I can reproduce your exception when running “gradle setupBuild” on your “archetype” project. The problem seems a bit different than the stracktrace listed by “absurdhero”


(Simen Bekkhus) #4

Oh, I just saw an NPE and the same error, I didn’t actually compare the stacktraces too much.

Shall I create a new issue on this?


(René Groeschke) #5

I’ll do that after finding the root cause of the problem. I’ll ping you once I know more


(Simen Bekkhus) #6

OK, thank you very much for the quick response!


(kenkyee) #7

I’m seeing the same issue converting an Android project…seems like a bug in Gradle’s setupBuild plugin since the NPE is down in the code that tries to set up a workspace internally in that plugin :frowning:


(Erik Pragt) #8

Hello, any updates on this? I’m trying to convert our Maven build to Gradle, using the same task, and I get the same exception:

Caused by: java.lang.NullPointerException

at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:279)

at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:173)

at org.gradle.mvn3.org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:225)

at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:272)

at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)

at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)

at org.gradle.mvn3.org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)

at org.gradle.mvn3.org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155)

A fix/workaround would be nice!


(René Groeschke) #9

I’m just working on that. Is your maven plugin using extensions? It seems, that this is at least one cause of failure here. I’ll ping you when I have a fix in place.

cheers, René


(Erik Pragt) #10

Hi Rene, I’m not sure what you mean with that. You mean something like this? http://maven.apache.org/guides/mini/guide-using-extensions.html

Cause then the answer is no. I’m also not building a plugin, it’s a ‘normal’ project. I checked for any reference to extensions, but it seems to not be there.

I can send you an (obfuscated) pom if you want, but I cannot post it here.


(René Groeschke) #11

Hi eric, yes, that’s exactly what I mean. An obfuscated pom would help me a lot. you can send it to rene.groeschke@gradleware.com.

many thanks,

René


(bbremen) #12

I found that one of my POMs works fine if I remove the section. My parent pom is very simple. When I copy its contents directly into the project, the build also succeeds. It seems to be the use of itself that causes the problem.

I can’t seem to get xml to display in here so here is this post on pastebin: http://pastebin.com/AJVMvLEU

My parent pom looks like this:




  



4.0.0



  com.example



  example



  1.0-SNAPSHOT



  pom







  





 UTF-8



  







  





 







releases







http://corp.repo/content/repositories/releases





 





 







 snapshots







 http://corp.repo/content/repositories/snapshots





 



  





 

and it is being included like this:




  





 com.example





 example





 1.0-SNAPSHOT





 

(Erik Pragt) #13

I actually tried the same (remove the parents) and now it’s working quite a bit better: at least the build.gradles are generated. That’s a good start. Now I suffer from ‘cyclic variable definitions’ when I try to build my project. Any ideas, or should I start a new topic for this?


(René Groeschke) #14

I guess you run into the problem described here: http://forums.gradle.org/gradle/topics/latest_setupbuild_plugin_fails_with_stackoverflow

At the moment I see too issues with the maven2gradle converter:

  1. it fails with nullpointer if parent pom is declared (havn’t completely verified this issue)

  2. the described stackoverflow seen in the link above.

We fixed GRADLE-2666 which was caused by using external custom maven plugins in your maven build which are not evaluated anymore.

BTW. Eric, you send me a sample mvn build for testing. this mvn build is not working for me as I get the following error message when running “mvn package”

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]
 The project com.company.payments:payments-api:3.10.0-SNAPSHOT (/Users/Rene/Downloads/gradlebug/pom.xml) has 1 error
[ERROR]
   Non-resolvable parent POM: Could not find artifact com.company.components:components:pom:0.12.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 2, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

(Erik Pragt) #15

Hi Rene,

For 1, that’s correct. When I move the properties to my child POM, it creates the build.gradle file. But when I try to build it using ‘gradle build’, I don’t get the error as described in your link, I see something like (I don’t have the output here): unable to find reference X, error: cyclic variable definitions : [project.version, project.version].

On Thursday, I can paste the correct error message here, but I haven’t found out what the problem is so far, plus the project is quite big.

Thanks, Erik