jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Ant Tasks
  • MANTTASKS-1

dependencies ant task incorrectly handles transitive snapshot dependencies

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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

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

Bug - A problem which impairs or prevents the functions of the product. MANTTASKS-18 filesetId does not contain all dependencies when artifact was not yet locally installed

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MANTTASKS-18 filesetId does not contain all dependencies when artifact was not yet locally installed

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MANTTASKS-7 dependencies ant task does not handle scoped transitive dependencies correctly

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Chris Hilton added a comment - 05/Dec/06 10:00 AM

Possibly related to MNG-1408?

Show
Chris Hilton added a comment - 05/Dec/06 10:00 AM Possibly related to MNG-1408?
Hide
Permalink
Herve Boutemy added a comment - 13/Jun/07 1:16 PM

To me, this is exactly MANTTASKS-18

Show
Herve Boutemy added a comment - 13/Jun/07 1:16 PM To me, this is exactly MANTTASKS-18

People

  • Assignee:
    Unassigned
    Reporter:
    Rick Riemer
Vote (3)
Watch (3)

Dates

  • Created:
    31/Aug/06 10:19 AM
    Updated:
    27/Feb/10 3:39 PM
    Resolved:
    13/Jun/07 1:25 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.