Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2666

maven2Gradle runs into Nullpointer

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7-rc-1
    • Gradle Forums topic Reference:

      Description

      I have a legacy maven multi project, and I tried to generate appriopriate Gradle-build scripts using task maven2Gradle. I already tried this with 1.2 with success, but with some minor problems I reported.

      With Gradle 1.4, I now run into a Nullpointer exception the Gradle folks might have a look on it:

      • Exception is:
        org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':maven2Gradle'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.
        java:72)
        (...)
        Caused by: org.gradle.api.GradleException: Unable to create maven project model using pom file: C:\devpacks\dpjw\maven-p
        rj\dpjwApp\pom.xml
        at org.gradle.api.plugins.maven.internal.MavenProjectsCreator.create(MavenProjectsCreator.java:54)
        Caused by: java.lang.NullPointerException
        at org.gradle.mvn3.org.apache.maven.plugin.CacheUtils.getWorkspace(CacheUtils.java:207)
        at org.gradle.mvn3.org.apache.maven.plugin.DefaultPluginArtifactsCache$CacheKey.<init>(DefaultPluginArtifactsCac
        he.java:67)
        at org.gradle.mvn3.org.apache.maven.plugin.DefaultPluginArtifactsCache.createKey(DefaultPluginArtifactsCache.jav
        a:141)
        at org.gradle.mvn3.org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildi
        ngHelper.java:223)
        at org.gradle.mvn3.org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBu
        ildingListener.java:106)
        at org.gradle.mvn3.org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.
        java:43)
        at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1053)
        at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:388)
        at org.gradle.mvn3.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:371)
        at org.gradle.mvn3.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:560)
        at org.gradle.mvn3.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:566)
        at org.gradle.mvn3.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:352)
        at org.gradle.api.plugins.maven.internal.MavenProjectsCreator.createNow(MavenProjectsCreator.java:83)
        at org.gradle.api.plugins.maven.internal.MavenProjectsCreator.create(MavenProjectsCreator.java:52)

        Activity

        Hide
        carlo.lf Carlo Luib-Finetti added a comment -

        included you will find the poms of the maven project to be gradled

        Show
        carlo.lf Carlo Luib-Finetti added a comment - included you will find the poms of the maven project to be gradled
        Hide
        kellyrob99 Kelly Robinson added a comment -

        I see this same stack trace using 1.5-rc-1 on a multi-module project. I'd try to debug into it, but I couldn't find the source for the jarjar'd mvn3 code where the NPE is happening.

        Show
        kellyrob99 Kelly Robinson added a comment - I see this same stack trace using 1.5-rc-1 on a multi-module project. I'd try to debug into it, but I couldn't find the source for the jarjar'd mvn3 code where the NPE is happening.
        Hide
        nikem Nikita Salnikov-Tarnovski added a comment -

        Can something be done with this issue? I have the very same exception with both Gradle 1.5 and latest nightly of 1.7.

        Show
        nikem Nikita Salnikov-Tarnovski added a comment - Can something be done with this issue? I have the very same exception with both Gradle 1.5 and latest nightly of 1.7.
        Hide
        nikem Nikita Salnikov-Tarnovski added a comment -

        And just released 1.6 still has the very same problem.

        Show
        nikem Nikita Salnikov-Tarnovski added a comment - And just released 1.6 still has the very same problem.
        Hide
        nikem Nikita Salnikov-Tarnovski added a comment -

        Are there any plans to fix this NPE?

        Show
        nikem Nikita Salnikov-Tarnovski added a comment - Are there any plans to fix this NPE?
        Hide
        nikem Nikita Salnikov-Tarnovski added a comment -

        Just checked the latest nightly 1.7-20130621220026+0000. One of the projects, that has failed before, now works correctly. Thank you

        The other one fails with:

        Caused by: java.lang.StackOverflowError
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
        at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)

        Show
        nikem Nikita Salnikov-Tarnovski added a comment - Just checked the latest nightly 1.7-20130621220026+0000. One of the projects, that has failed before, now works correctly. Thank you The other one fails with: Caused by: java.lang.StackOverflowError at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy) at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)
        Hide
        adammurdoch Adam Murdoch added a comment -

        @Nikita, can you add a separate issue in the forums for the StackOverflowError, please?

        Show
        adammurdoch Adam Murdoch added a comment - @Nikita, can you add a separate issue in the forums for the StackOverflowError, please?

          People

          • Assignee:
            breskeby René Gröschke
            Reporter:
            forums Gradle Forums
          • Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development