Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0
-
Fix Version/s: None
-
Component/s: prepare
-
Labels:None
-
Environment:Perforce, jdk1.6.0_07, Maven 2.2.1
-
Number of attachments :
Description
The issue has been discussed in the user mailing list, cf.
http://mail-archives.apache.org/mod_mbox/maven-users/201005.mbox/%3cAANLkTikXPJ792-G1cdzen1R8WEfs1456U3dUClb40w2s@mail.gmail.com%3e
I'm releasing a Maven2 multi-module project. One of the modules is a POM
project ("assembly project") that uses the maven-assembly-plugin in order to
build an assembly (zip archive). The artifacts to be assembled are specified
via dependencies in the POM. They point to modules contained in the same
multi-module project. The project build is running fine and produces the desired results.
The project structure is as follows:
commons
| – commons.util | |
| – commons.util.test | |
| – commons.distribution | |
| – assembly_descriptor.xml |
When running mvn release:prepare on this multi-module project, the build of
the assembly project commons.distribution fails with the message that the dependencies cannot be
resolved. These dependencies are reported with the version that should be
released, e.g. 0.0.3. Before running the goal, all dependency versions are 0.0.3-SNAPSHOT.
What seems to happen is that the snapshot version 0.0.3-SNAPSHOT is
replaced by release version 0.0.3 through the release plugin and consequently the assembly plugin tries to resolve the dependencies based on version
0.0.3 which however do not yet exist in the repository at that point.
It was suggested in the mail thread that the reactor should be able to handle the dependencies correctly and the following test was proposed:
1. mvn versions:set -DnewVersion=0.0.3-reltesting-SNAPSHOT
2. mvn clean verify
3. mvn versions:revert
However this test fails in the same manner as described above.
The issue can be reproduced with any multi-module project of the structure
T
| --A |
| --X |
| --... |
where T is a top-level project and A is a child project of packaging type POM that assembles module X (and possibly other modules
as indicated by the ellipsis).
I think that this is either a similar or the same problem that I have...
I am trying to do a release:prepare (clean verify) and get errors with missing dependencies that are in the current build. I had the problem with the maven-dependency-plugin where I was using the 'copy' goal when I should have been using the 'copy-dependencies' goal. The copy-dependencies goal first looks in the current reactor, then the local repository and then remote. This is the same requirement for other 'bundling' type plugins. The 'jarResource's should be looked up in the same way. This is a show stopper for the release plugin when using the webstart (or other) bundling plugins.