You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "S van Sabben (JIRA)" <ji...@codehaus.org> on 2013/05/07 16:15:52 UTC

[jira] (ARCHETYPE-436) Error installing a multimodule archetype created with mvn archetype:create-from-project

S van Sabben created ARCHETYPE-436:
--------------------------------------

             Summary: Error installing a multimodule archetype created with mvn archetype:create-from-project
                 Key: ARCHETYPE-436
                 URL: https://jira.codehaus.org/browse/ARCHETYPE-436
             Project: Maven Archetype
          Issue Type: Bug
    Affects Versions: 2.2
         Environment: Windows 7 (64 bits), maven 3.0.5, jdk 1.7
            Reporter: S van Sabben
            Priority: Blocker


I have a multi module project with a structure like:
aggregator (pom)
distribution (pom, bin.xml)
parent (pom)
n x modules(jar) hierarchies multiple level deep

Inside the pom the modules reference the parent using:
<relativePath>../project</relativePath>

I can create an archetype using archetype:create-from-project, and everything runs smoothly.

But when I try to install the archetype (mvn install inside the target/generated-sources/archetype dir), I get the error:
ERROR] ResourceManager : unable to find resource 'archetype-resources/__rootArtifactId__.aggregator/../__rootArtifactId__.parent/pom.xml' in any resource loader.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.818s
[INFO] Finished at: Tue May 07 15:46:20 CEST 2013
[INFO] Final Memory: 10M/25M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project org.svs.archetype.osgi.blueprint.karaf.mul
tiproject:
[ERROR] Archetype IT 'basic' failed: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Unable to find resource 'archetype-resources
/__rootArtifactId__.aggregator/../__rootArtifactId__.parent/pom.xml'
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on pr
oject org.svs.archetype.osgi.blueprint.karaf.multiproject:
Archetype IT 'basic' failed: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Unable to find resource 'archetype-resources/__rootA
rtifactId__.aggregator/../__rootArtifactId__.parent/pom.xml'
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        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:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException:
Archetype IT 'basic' failed: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Unable to find resource 'archetype-resources/__rootA
rtifactId__.aggregator/../__rootArtifactId__.parent/pom.xml'
        at org.apache.maven.archetype.mojos.IntegrationTestMojo.execute(IntegrationTestMojo.java:268)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 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 message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira