Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0.4
-
Fix Version/s: 2.0.7
-
Component/s: dependencies task
-
Labels:None
-
Environment:Windows XP, Java 1.5.0_08-b03, Ant 1.6.5, Maven 2.0.4
-
Number of attachments :
Description
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.
Issue Links
- duplicates
-
MANTTASKS-18
filesetId does not contain all dependencies when artifact was not yet locally installed
-
- is related to
-
MANTTASKS-18
filesetId does not contain all dependencies when artifact was not yet locally installed
-
- relates to
-
MANTTASKS-7
dependencies ant task does not handle scoped transitive dependencies correctly
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Link | This issue is related to MNG-2543 [ MNG-2543 ] |
| Link | This issue is depended upon by MNG-1408 [ MNG-1408 ] |
| Link | This issue is depended upon by MNG-1408 [ MNG-1408 ] |
| Link | This issue is related to MNG-1408 [ MNG-1408 ] |
| Key | MNG-2544 |
|
| Workflow | Maven New [ 61064 ] | jira [ 69331 ] |
| Project | Maven 2 [ 10500 ] | Maven 2.x Ant Tasks [ 11533 ] |
| Component/s | Ant tasks [ 11532 ] | |
| Affects Version/s | 2.0.4 [ 12527 ] |
| Workflow | jira [ 69331 ] | Maven New [ 69380 ] |
| Component/s | dependencies task [ 12843 ] |
| Link |
This issue duplicates |
| Affects Version/s | 2.0.4 [ 13393 ] |
| Resolution | Duplicate [ 3 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 2.0.7 [ 13521 ] |
Possibly related to MNG-1408?