You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/04/22 11:15:15 UTC

[jira] Closed: (MNG-4451) Parametized declarations fail in two level deep multi-module project

     [ http://jira.codehaus.org/browse/MNG-4451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4451.
----------------------------------

    Resolution: Won't Fix
      Assignee: Benjamin Bentmann

Thanks for the example project Julien. And yes, using expressions for the project coordinates is not going to be supported (cf. MNG-4297).

> Parametized <groupId/> declarations fail in two level deep multi-module project
> -------------------------------------------------------------------------------
>
>                 Key: MNG-4451
>                 URL: http://jira.codehaus.org/browse/MNG-4451
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 2.2.1
>         Environment: Windows XP, JDK 1.6.0_16
>            Reporter: J. Michael McGarr
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4451.zip
>
>
> We utilized the appfuse 2.x multi-module project setup where the modules of the project declare their own <groupId/> value as:
> {quote}
> <groupId>$[pom.parent.groupId].$[pom.parent.artifactId]</groupId>
> {quote}
> (note: replaced the curly braces with brackets due to a wiki error) 
> When you add a second level of modules, this approach does not seem to work in Maven.  The second level child module, which declares it parent to be a first level child module.  It appears that the parameter declaration in the first-level module is ambiguous or is resolving to value as seen by the second-level module.  This can be seen below in the output of the error the Maven reactor provides.  
> I was able to work around this error by changing the parametized groupId declaration in the first-level module pom and making it explicit.  If there is something wrong with this approach or another parametized setting I need to use, please let me know.
> {quote}
> C:\DEV\workspace\parent>mvn clean install
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: com.maventest.parent.first-level:second-level:jar:null
> Reason: Cannot find parent: com.maventest.parent:first-level for project: com.maventest.parent.first-level:second-level:jar:null for project com.maventest.parent.first-level:second-level:jar:null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.maventest.parent:first-level for project: com.maventest.parent.first-level:second-level:jar:null for project com.maventest.parent.first-level:second-level:jar:null
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.maventest.parent:first-level for project: com.maventest.parent.first-level:second-level:jar:null for project com.maventest.parent.first-level:second-level:jar:null
>         at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
>         at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
>         at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
>         at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
>         at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
>         ... 12 more
> Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.maventest.parent:first-level' not found in repository: Unable to download the artifact from any repository
>   com.maventest.parent:first-level:pom:1.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
>  for project com.maventest.parent:first-level
>         at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
>         ... 20 more
> Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
>   com.maventest.parent:first-level:pom:1.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
>         at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
>         at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
>         ... 21 more
> Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
>         at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
>         at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
>         ... 23 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Tue Nov 17 09:57:27 EST 2009
> [INFO] Final Memory: 2M/4M
> [INFO] ------------------------------------------------------------------------
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira