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 Assembly Plugin
  • MASSEMBLY-247

versions of included dependencies in multi-module projects are not deterministic

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.2-beta-2
  • Fix Version/s: 2.2-beta-2
  • Labels:
    None
  • Environment:
    Maven 2.0.4 an assembly plugin 2.2-SNAPSHOT

Description

There is a problem with including dependency jars in an assembly. The resoultion of the version of the dependencies is not deterministic. The attached zipfile contains three projects, assembly, module-One and modue-Two. the assembly project is the aggregator of module-One and module-Two. module-One has a dep to junit 3.8.1, module-Two to junit 4.0. The assembly project contains a DependencyManagement with a dependency to junit 4.0. After executing 'mvn clean package ' in the assembly project the resulting zip file assembly-1.0-SNAPSHOT-luna.zip contains junit 3.8.1, after 'mvn clean install' it contains junit 4.0.
Sometimes its the other way around, but playing with both commands shows that the resulting version of junit is not deterministic.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    assembly-dependency-problem.zip
    11/Oct/07 2:43 AM
    118 kB
    Tarek El-Sibay
    1. File
      assembly/.classpath 0.4 kB
    2. File
      assembly/.project 0.3 kB
    3. XML File
      assembly/pom.xml 2 kB
    4. XML File
      assembly/src/main/assembly/luna.xml 0.2 kB
    5. Java Source File
      assembly/src/main/.../tipp24/qs/App.java 0.2 kB
    6. Java Source File
      assembly/src/test/.../tipp24/qs/AppTest.java 0.6 kB
    7. Zip Archive
      assembly/.../assembly-1.0-SNAPSHOT-luna.zip 95 kB
    8. File
      module-Two/.classpath 0.4 kB
    9. File
      module-Two/.project 0.3 kB
    10. XML File
      module-Two/pom.xml 0.9 kB
    11. Java Source File
      module-Two/src/main/.../tipp24/qs/App.java 0.2 kB
    12. Java Source File
      module-Two/src/test/.../qs/AppTest.java 0.6 kB
    13. File
      module-Two/target/classes/.../qs/App.class 0.5 kB
    14. Java Archive File
      module-Two/target/module-Two-2.0.jar 2 kB
    15. Text File
      module-Two/.../net.tipp24.qs.AppTest.txt 0.3 kB
    16. XML File
      module-Two/.../TEST-net.tipp24.qs.AppTest.xml 5 kB
    17. File
      module-Two/target/.../qs/AppTest.class 1 kB
    18. File
      module-One/.classpath 0.4 kB
    19. File
      module-One/.project 0.3 kB
    20. XML File
      module-One/pom.xml 0.9 kB
    21. Java Source File
      module-One/src/main/.../tipp24/qs/App.java 0.2 kB
    22. Java Source File
      module-One/src/test/.../qs/AppTest.java 0.6 kB
    23. File
      module-One/target/classes/.../qs/App.class 0.5 kB
    24. Java Archive File
      module-One/target/module-One-1.0.jar 2 kB
    25. Text File
      module-One/.../net.tipp24.qs.AppTest.txt 0.3 kB
    26. XML File
      module-One/.../TEST-net.tipp24.qs.AppTest.xml 5 kB
    27. File
      module-One/target/.../qs/AppTest.class 1 kB
    Download Zip
    Show
    Zip Archive
    assembly-dependency-problem.zip
    11/Oct/07 2:43 AM
    118 kB
    Tarek El-Sibay

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MASSEMBLY-393 Cannot Override dependencyManagement

  • Major - Major loss of function.
  • 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. MASSEMBLY-235 dependencySet ignores dependency management

  • 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
Tarek El-Sibay added a comment - 07/Dec/07 7:51 AM

hello!

no comments, no hints, no solving. Nobody interested in the bug? did i made something wrong with this bug report?

What can i do?

Tarek

Show
Tarek El-Sibay added a comment - 07/Dec/07 7:51 AM hello! no comments, no hints, no solving. Nobody interested in the bug? did i made something wrong with this bug report? What can i do? Tarek
Hide
Permalink
Anders Eriksson added a comment - 12/Dec/07 7:20 AM

It seems that we've experienced this problem too. With several versions of SNAPSHOT jars in the local repository it seems like the assembly plugin takes any arbitrary jar from the local repository.

For example the following files in the local repository

lillmacen:0.2.0-SNAPSHOT anders$ ls -latr *.jar
rw-rr- 1 anders staff 7432 22 Nov 15:39 fas3-core-api-0.2.0-20071121.140025-4.jar
rw-rr- 1 anders staff 9255 29 Nov 13:08 fas3-core-api-0.2.0-20071128.090034-6.jar
rw-rr- 1 anders staff 23911 12 Dec 13:39 fas3-core-api-0.2.0-SNAPSHOT.jar
rw-rr- 1 anders staff 23911 12 Dec 13:39 fas3-core-api-0.2.0-20071212.120216-27.jar

would not necessarily pick our intended fas3-core-api-0.2.0-SNAPSHOT.jar

The POM snippet looks like this:

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
</configuration>

<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Our workaround is to completely empty the local repository and have it reinstalled with only the latest SNAPSHOT before trying to use the assembly plugin.

This problem have so far only been seen on Windows XP (even if the explaining example above shows files from a Mac) using Eclipse 3.3 and the M2Eclipse plugin http://m2eclipse.codehaus.org/ which I believe is built on Maven 2.1.

Show
Anders Eriksson added a comment - 12/Dec/07 7:20 AM It seems that we've experienced this problem too. With several versions of SNAPSHOT jars in the local repository it seems like the assembly plugin takes any arbitrary jar from the local repository. For example the following files in the local repository lillmacen:0.2.0-SNAPSHOT anders$ ls -latr *.jar rw-rr- 1 anders staff 7432 22 Nov 15:39 fas3-core-api-0.2.0-20071121.140025-4.jar rw-rr- 1 anders staff 9255 29 Nov 13:08 fas3-core-api-0.2.0-20071128.090034-6.jar rw-rr- 1 anders staff 23911 12 Dec 13:39 fas3-core-api-0.2.0-SNAPSHOT.jar rw-rr- 1 anders staff 23911 12 Dec 13:39 fas3-core-api-0.2.0-20071212.120216-27.jar would not necessarily pick our intended fas3-core-api-0.2.0-SNAPSHOT.jar The POM snippet looks like this: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef> jar-with-dependencies </descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>attached</goal> </goals> </execution> </executions> </plugin> </plugins> </build> Our workaround is to completely empty the local repository and have it reinstalled with only the latest SNAPSHOT before trying to use the assembly plugin. This problem have so far only been seen on Windows XP (even if the explaining example above shows files from a Mac) using Eclipse 3.3 and the M2Eclipse plugin http://m2eclipse.codehaus.org/ which I believe is built on Maven 2.1.
Hide
Permalink
Tarek El-Sibay added a comment - 12/Dec/07 10:23 AM

Hi,

i have this problem on windows XP but with eclipse 3.2 and without the M2Eclipse plugin. And this problem occured too with a non snapshot version, commons-lang-2.1 was included instead of commons-lang-2.2.

But we will try your workaround!

Regards
Tarek

Show
Tarek El-Sibay added a comment - 12/Dec/07 10:23 AM Hi, i have this problem on windows XP but with eclipse 3.2 and without the M2Eclipse plugin. And this problem occured too with a non snapshot version, commons-lang-2.1 was included instead of commons-lang-2.2. But we will try your workaround! Regards Tarek
Hide
Permalink
John Casey added a comment - 13/Jul/09 4:15 PM

reviewing dependency-resolution issues for beta-5

Show
John Casey added a comment - 13/Jul/09 4:15 PM reviewing dependency-resolution issues for beta-5
Hide
Permalink
John Casey added a comment - 23/Sep/10 9:30 AM

issue filed against 2.2-beta-2, but I cannot reproduce using that version. in the environment, the version is stated as 2.2-SNAPSHOT, which likely doesn't exist anymore.

In any case, this seems fixed, if it was ever a problem in a released version.

Show
John Casey added a comment - 23/Sep/10 9:30 AM issue filed against 2.2-beta-2, but I cannot reproduce using that version. in the environment, the version is stated as 2.2-SNAPSHOT, which likely doesn't exist anymore. In any case, this seems fixed, if it was ever a problem in a released version.

People

  • Assignee:
    John Casey
    Reporter:
    Tarek El-Sibay
Vote (1)
Watch (2)

Dates

  • Created:
    11/Oct/07 2:43 AM
    Updated:
    23/Sep/10 9:30 AM
    Resolved:
    23/Sep/10 9:30 AM
  • 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.