You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Chris Hilton (JIRA)" <ji...@codehaus.org> on 2006/12/05 17:00:41 UTC

[jira] Commented: (MNG-2544) dependencies ant task incorrectly handles transitive snapshot dependencies

    [ http://jira.codehaus.org/browse/MNG-2544?page=comments#action_81816 ] 
            
Chris Hilton commented on MNG-2544:
-----------------------------------

Possibly related to MNG-1408?

> dependencies ant task incorrectly handles transitive snapshot dependencies
> --------------------------------------------------------------------------
>
>                 Key: MNG-2544
>                 URL: http://jira.codehaus.org/browse/MNG-2544
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Ant tasks
>    Affects Versions: 2.0.4
>         Environment: Windows XP, Java 1.5.0_08-b03, Ant 1.6.5, Maven 2.0.4
>            Reporter: Rick Riemer
>
> This issue may be related to MNG-2543.
> The ant <dependencies> task resolves transitive SNAPSHOT dependencies incorrectly. Here's an example:
> [dependencies section of pom.xml for project A]
> ...
> <dependencies>
>     <dependency>
>         <groupId>hapi</groupId>
>         <artifactId>hapi</artifactId>
>         <version>0.5beta-SNAPSHOT</version>
>     </dependency>
> </dependencies>
> ...
> [dependencies section of pom.xml for project B]
> ...
> <dependencies>
>     <dependency>
>         <groupId>my-company</groupId>
>         <artifactId>project-A</artifactId>
>         <version>1.0-SNAPSHOT</version>
>     </dependency>
> </dependencies>
> ...
> When I use the <dependencies> task to build a classpath for project A everything is OK:
> <mvn:dependencies pathId="compile.classpath" useScope="compile">
>     <pom refid="maven.pom" />
> </mvn:dependencies>
> - gives -
> \.m2\repository\hapi\hapi\0.5beta-SNAPSHOT\hapi-0.5beta-SNAPSHOT.jar
> But when I use the same task to build a classpath for project B, the version numbering goes bad:
> <mvn:dependencies pathId="compile.classpath" useScope="compile">
>     <pom refid="maven.pom" />
> </mvn:dependencies>
> - gives -
> \.m2\repository\hapi\hapi\0.5beta-20060814.110000-1\hapi-0.5beta-20060814.110000-1.jar
> The files in my repository are:
> \.m2\repository\hapi\hapi\0.5beta-SNAPSHOT\hapi-0.5beta-20060814.110000-1.jar
> \.m2\repository\hapi\hapi\0.5beta-SNAPSHOT\hapi-0.5beta-SNAPSHOT.jar
> For some reason, the <dependencies> task uses the expanded artifact name for the folder as well, but the folder name should use SNAPSHOT. If I use the mvn executable itself to run a compile instead of the ant tasks, then there is no problem and the jar is correctly resolved. It seems that the ant tasks have a different mechanism of resolving transitive dependencies than the mvn executable.

-- 
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