[
http://jira.codehaus.org/browse/MASSEMBLY-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Casey updated MASSEMBLY-102:
---------------------------------
Fix Version/s: (was: 2.2)
2.2-beta-1
> 'attached' goal bound to 'package' phase not working in a multiproject
> environment when having dependency between its modules
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: MASSEMBLY-102
> URL: http://jira.codehaus.org/browse/MASSEMBLY-102
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: Linux (Fedora Core 4)
> Reporter: Dário Oliveros
> Assigned To: John Casey
> Fix For: 2.2-beta-1
>
> Attachments: project_M.tar.gz
>
>
> I've noticed the assembly plugin does not work by binding the 'attached' goal
> to the 'package' phase in a multiproject environment when its modules depend
> on each other and the local repository is empty.
> To reproduce this issue, please consider the following scenario where M is a
> multiproject that contains modules A, B, C, D and E (see attached file for
> the entire project).
> + M
> - A
> - B (depends on A) (uses assembly plugin by binding 'attached' goal to
> 'package' phase)
> - C (depends on B)
> - D (depends on A)
> - E (depends on D)
> When running 'mvn install' in the project 'M' for the first time, the buid
> process fails saying that one required artifact is missing (see error below).
> And it turns out to be D.jar.
> #####################################################################################
> ...
> [INFO] [jar:jar]
> [INFO] Building jar: /l/disk0/devel/assembly/B/target/B-1.1.jar
> Downloading:
> http://kraz.cpqd.com.br/internal/release/repository/com/mycompany/assembly/D/1.1/D-1.1.jar
> [WARNING] Unable to get resource from repository central
> (http://repo1.maven.org/maven2)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> Missing:
> ----------
> 1) com.mycompany.assembly:D:jar:1.1
> Try downloading the file manually from the project website.
> Then, install it using the command:
> mvn install:install-file -DgroupId=com.mycompany.assembly
> -DartifactId=D \
> -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file
> Path to dependency:
> 1) com.mycompany.assembly:E:jar:1.1
> 2) com.mycompany.assembly:D:jar:1.1
> ----------
> 1 required artifact is missing.
> for artifact:
> com.mycompany.assembly:E:jar:1.1
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2)
> #####################################################################################
> It looks like module B triggers the compilation of all modules and when it
> does that, it happens that E is being compiling but its dependency (D) is not
> in the local repository yet.
> Please remember to remove the 'com/mycompany/assembly' directory from local
> repository before running 'mvn install'. Otherwise you won't be able to
> reproduce the problem.
> Thanks,
> Dário
--
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