You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Henrik Brautaset Aronsen (JIRA)" <ji...@codehaus.org> on 2008/06/30 11:50:27 UTC
[jira] Updated: (MNG-2446) parent Pom properties not resolved for
module dependencies
[ http://jira.codehaus.org/browse/MNG-2446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henrik Brautaset Aronsen updated MNG-2446:
------------------------------------------
Attachment: maven-version-problem.zip
I have the same problem, and I have attached a test case (see maven-version-problem.zip):
{code}
first-+-second---third
|
+-fourth
{code}
Fourth depends on third. Doing a {{mvn clean install}} from root works fine. Doing the same within the {{fourth}} module fails to resolve the {{second}} artifact:
{code}
INFO] Using default encoding to copy filtered resources.
Downloading: http://repo1.maven.org/maven2/me/second/${applicationVersion}/second-${applicationVersion}.pom
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
{code}
The problem is in the install plugin. It creates pom files in the repository with an unparsed <version>:
{code}
$ cat ~/.m2/repository/me/second/1.0/second-1.0.pom
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>me</groupId>
<artifactId>second</artifactId>
<name>Second</name>
<packaging>pom</packaging>
<modules>
<module>third</module>
</modules>
<parent>
<groupId>me</groupId>
<artifactId>first</artifactId>
<version>${applicationVersion}</version>
<relativePath>../pom.xml</relativePath>
</parent>
</project>
{code}
If I replace ${applicationVersion} to 1.0 in this file, the {{fourth}} module builds fine on itself.
> parent Pom properties not resolved for module dependencies
> -----------------------------------------------------------
>
> Key: MNG-2446
> URL: http://jira.codehaus.org/browse/MNG-2446
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 2.0.4
> Environment: WindowsXP/Linux - JDK 1.4 last version
> Reporter: Jeremie Poutrin
> Priority: Minor
> Fix For: Reviewed Pending Version Assignment
>
> Attachments: maven-version-problem.zip
>
>
> root-project --> root-pom.xml with <version>${my.version}</version>
> |------->proj1 <parent><version>${my.version}</version></parent>
> |------->proj2 <parent><version>${my.version}</version></parent>
> | |
> | |->proj1 dependency
> |------->proj3 <parent><version>${my.version}</version></parent>
> if I compile from the root-project directory, all compile fine.
> if I compile from the proj2 directory, maven2 resolve proj2-${my.version}
> resolve proj1-${my.version}
> but tries to resolve the parent version root-project-${my.version} but this is not resolved.
--
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