You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/05/27 15:02:12 UTC
[jira] Commented: (MDEP-264) Dependency is copied from original
source directory instead of .m2 using maven 3
[ http://jira.codehaus.org/browse/MDEP-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222843#action_222843 ]
Benjamin Bentmann commented on MDEP-264:
----------------------------------------
The retrieval of the artifact from the reactor instead of the local repository is a long wanted fix for Maven. The issue boils down to {{DependencyUtil. getFormattedFileName()}} which makes wrong assumptions about the artifact file name.
> Dependency is copied from original source directory instead of .m2 using maven 3
> --------------------------------------------------------------------------------
>
> Key: MDEP-264
> URL: http://jira.codehaus.org/browse/MDEP-264
> Project: Maven 2.x Dependency Plugin
> Issue Type: Bug
> Components: copy
> Affects Versions: 2.1
> Environment: SUSE 9 Linux, OpenJDK 1.6.0 build 11.0-b17, Maven 3.0-beta-1
> Reporter: Jake Zuidema
> Attachments: mavenDepsCopyExample.tar
>
>
> Using Maven 2.2.1, the maven-dependency-plugin copy goal always copied the artifacts from the local .m2, which meant that they kept their full name (ex: ccad-moda-1.0.0-SNAPSHOT-system-help.pdf). Using Maven 3.0-beta-1, this is no longer always the case. If I build just the assembly sub-module, then it copies the artifact from the local .m2 and maintains the name. If I build the whole project, which includes building the module that produces the artifact being copied, then Maven 3 skips going to the local .m2 and instead goes back to the original source of the artifact and copies it from there. This results in a copied file with the short name (ex: system-help.pdf).
> Here are some lines from the build logs to show the difference.
> Maven 2.2.1
> ===========
> [INFO] Configured Artifact: com.ccadllc.test1:ccad-moda:system-help:1.0.0-SNAPSHOT:pdf
> [DEBUG] Skipping disabled repository central
> [DEBUG] ccad-moda: using locally installed snapshot
> [INFO] Copying /home/jzuidema/.m2/repository/com/ccadllc/test1/ccad-moda/1.0.0-SNAPSHOT/ccad-moda-1.0.0-SNAPSHOT-system-help.pdf to /extra1/export/home/jzuidema/tmp2/test1/assembly/target/pdfs/ccad-moda-1.0.0-SNAPSHOT-system-help.pdf
> Maven 3.0-beta-1
> ================
> [INFO] Configured Artifact: com.ccadllc.test1:ccad-moda:system-help:1.0.0-SNAPSHOT:pdf
> [INFO] Copying /extra1/export/home/jzuidema/tmp2/test1/moda/system-help.pdf to /extra1/export/home/jzuidema/tmp2/test1/assembly/target/pdfs/system-help.pdf
> Attached is an example project with the build logs from a maven 2.2.1 and a 3.0-beta-1 run of "mvn -X clean install" at the top level of the project.
--
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