Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-488

Goal integration-test of maven-archetype-plugin fails with 'Cannot run additions goals." in version 3.3.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 3.0.0
    • Component/s: Plugin
    • Environment:
      maven-archetype-plugin 2.3

      Description

      Running the goal 'integration-test' of the 'maven-archetype-plugin' fails with the following output:

      [INFO] Invoking post-archetype-generation goals: verify
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2.048 s
      [INFO] Finished at: 2015-04-23T18:17:07+02:00
      [INFO] Final Memory: 18M/309M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:integration-test (default-integration-test) on project simple-archetype:
      [ERROR] Archetype IT 'it' failed: Cannot run additions goals.
      [ERROR] -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:integration-test (default-integration-test) on project simple-archetype:
      Archetype IT 'it' failed: Cannot run additions goals.
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
              at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.MojoExecutionException:
      Archetype IT 'it' failed: Cannot run additions goals.
              at org.apache.maven.archetype.mojos.IntegrationTestMojo.execute(IntegrationTestMojo.java:258)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
              ... 20 more
      [ERROR]
      [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/MojoExecutionException
      

      This works fine in earlier versions (tested with Maven 3.2.5 and 3.2.3).

        Issue Links

          Activity

          Hide
          hohwille Jörg Hohwiller added a comment -

          I can confirm this problem and it seems a very general bug with archetype testing that I have tested for maven 3.3.1, 3.3.2 and 3.3.3 and all these 3.3.x versions are affected by the bug.
          Therefore I have to stay with 3.2.x.

          Show
          hohwille Jörg Hohwiller added a comment - I can confirm this problem and it seems a very general bug with archetype testing that I have tested for maven 3.3.1, 3.3.2 and 3.3.3 and all these 3.3.x versions are affected by the bug. Therefore I have to stay with 3.2.x.
          Hide
          ursa Kuzma Deretuke added a comment -

          Caught the same problem. The root cause is the difference in maven packaging:

          • Maven 3.2: bin\mvn.bat
          • Maven 3.3: bin\mvn.cmd

          The problem disappears after creating a symlink mvn.bat => mvn.cmd:

          > cd %MAVEN_HOME%\bin
          > mklink mvn.bat mvn.cmd
          
          Show
          ursa Kuzma Deretuke added a comment - Caught the same problem. The root cause is the difference in maven packaging: Maven 3.2: bin\mvn.bat Maven 3.3: bin\mvn.cmd The problem disappears after creating a symlink mvn.bat => mvn.cmd: > cd %MAVEN_HOME%\bin > mklink mvn.bat mvn.cmd
          Hide
          rfscholte Robert Scholte added a comment -

          I would expect that upgrading org.apache.maven.shared:maven-invoker from 2.1.1 to 2.2 would fix this due to MSHARED-413. You don't need to wait for the next release, you can add this dependency to the plugin in your pom.xml

          Show
          rfscholte Robert Scholte added a comment - I would expect that upgrading org.apache.maven.shared:maven-invoker from 2.1.1 to 2.2 would fix this due to MSHARED-413 . You don't need to wait for the next release, you can add this dependency to the plugin in your pom.xml
          Hide
          reaal Alexis Resendiz Andrade added a comment -

          This problem still present in Maven 3.3.9

          Is there a workaround for it? I tried with the suggestion in previous comment but is not working.

          Show
          reaal Alexis Resendiz Andrade added a comment - This problem still present in Maven 3.3.9 Is there a workaround for it? I tried with the suggestion in previous comment but is not working.
          Hide
          hohwille Jörg Hohwiller added a comment -

          > Is there a workaround for it?

          Yep. Just create a copy of "mvn.cmd" that you call "mvn.bat" in MAVEN_HOME/bin.

          Show
          hohwille Jörg Hohwiller added a comment - > Is there a workaround for it? Yep. Just create a copy of "mvn.cmd" that you call "mvn.bat" in MAVEN_HOME/bin.
          Hide
          rfscholte Robert Scholte added a comment -
          Show
          rfscholte Robert Scholte added a comment - Fixed in e188f8fd091ade542fc2d31a4a2d7e05c631a6e9
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in maven-archetype-m3 #205 (See https://builds.apache.org/job/maven-archetype-m3/205/)
          ARCHETYPE-488 Goal integration-test of maven-archetype-plugin fails (rfscholte: rev e188f8fd091ade542fc2d31a4a2d7e05c631a6e9)

          • pom.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in maven-archetype-m3 #205 (See https://builds.apache.org/job/maven-archetype-m3/205/ ) ARCHETYPE-488 Goal integration-test of maven-archetype-plugin fails (rfscholte: rev e188f8fd091ade542fc2d31a4a2d7e05c631a6e9) pom.xml
          Hide
          sgandon Sébastien Gandon added a comment -

          Why is this bug closed, has it seems that the build failed upon this commit ?

          Show
          sgandon Sébastien Gandon added a comment - Why is this bug closed, has it seems that the build failed upon this commit ?
          Hide
          khmarbaise Karl Heinz Marbaise added a comment - - edited

          First the integration build has not failed based on this commit (see the log file). apart from that you should have checked the following build (206) which was successful. BTW: Don't make discussions on JIRA issues. Better use the dev list for such things (Best is to remove the comment here and continue on dev list).

          Show
          khmarbaise Karl Heinz Marbaise added a comment - - edited First the integration build has not failed based on this commit (see the log file). apart from that you should have checked the following build (206) which was successful. BTW: Don't make discussions on JIRA issues. Better use the dev list for such things (Best is to remove the comment here and continue on dev list).
          Hide
          rottstock Sven Rottstock added a comment - - edited

          Alexis Resendiz Andrade: The upgrade of org.apache.maven.shared:maven-invoker is working for me if I add it as a dependency of maven-archetype-plugin - not as a separate plugin definition. So the pom.xml should look as follows:

          <plugin>
              <artifactId>maven-archetype-plugin</artifactId>
              <version>2.4</version>
              <dependencies>
                  <dependency>
                      <groupId>org.apache.maven.shared</groupId>
                      <artifactId>maven-invoker</artifactId>
                      <version>2.2</version>
                  </dependency>
              </dependencies>
          </plugin>
          
          Show
          rottstock Sven Rottstock added a comment - - edited Alexis Resendiz Andrade : The upgrade of org.apache.maven.shared:maven-invoker is working for me if I add it as a dependency of maven-archetype-plugin - not as a separate plugin definition. So the pom.xml should look as follows: <plugin> <artifactId> maven-archetype-plugin </artifactId> <version> 2.4 </version> <dependencies> <dependency> <groupId> org.apache.maven.shared </groupId> <artifactId> maven-invoker </artifactId> <version> 2.2 </version> </dependency> </dependencies> </plugin>

            People

            • Assignee:
              rfscholte Robert Scholte
              Reporter:
              andreas.horst Andreas Horst
            • Votes:
              5 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development