Alex Telesh created MDEP-349:
--------------------------------

             Summary: add possibility to have consistent output results in 
"properties" and "copy-dependencies" goals when using snapshot dependencies 
                 Key: MDEP-349
                 URL: https://jira.codehaus.org/browse/MDEP-349
             Project: Maven 2.x Dependency Plugin
          Issue Type: Improvement
          Components: copy-dependencies
    Affects Versions: 2.4
            Reporter: Alex Telesh
         Attachments: pom.xml

after build project described in attached {{pom.xml}} I have following result:

{code}
[INFO] --- maven-dependency-plugin:2.4:copy-dependencies 
(copy-plugin-dependencies) @ org.test ---
[INFO] Copying wss4j-1.6.6-SNAPSHOT.jar to 
E:\tmp\maven\target\classes\lib\wss4j-1.6.6-20120316.095133-6.jar
[INFO] Copying cxf-bundle-2.6.0-SNAPSHOT.jar to 
E:\tmp\maven\target\classes\lib\cxf-bundle-2.6.0-20120323.063849-49.jar
{code}

{code}
[echoproperties] #Ant properties
[echoproperties] 
org.apache.cxf\:cxf-bundle\:jar=E\:\\apache-maven-3.0.2\\repo\\org\\apache\\cxf\\cxf-bundle\\2.6.0-SNAPSHOT\\cxf-bundle-2.6.0-SNAPSHOT.jar
[echoproperties] 
org.apache.ws.security\:wss4j\:jar=E\:\\apache-maven-3.0.2\\repo\\org\\apache\\ws\\security\\wss4j\\1.6.6-SNAPSHOT\\wss4j-1.6.6-SNAPSHOT.jar
{code}

in my project I need to create a special xml configuration file which will 
describe copied dependencies libraries.

for this I use maven resource filtering mechanism and describe in configuration 
template file placeholders like {{$\{org.apache.ws.security:wss4j:jar\}}} which 
will be replaced by maven from its properties (populated in my case by 
"_properties_" goal). I also use "propertymapper-maven-plugin" plugin for 
retrieve only jar file name from path in the property value.

but in case dependencies artifacts are snapshots versions as you can see from 
above example in configuration file library name will be 
{{"wss4j-1.6.6-SNAPSHOT.jar"}} and name of real copied library will be 
{{"wss4j-1.6.6-20120316.095133-6.jar"}}.

It would be good to have a property in "_copy-dependencies_" goal configuration 
which will force to copy dependencies using version with "*-SNAPSHOT*" 
qualifier (as it was resolved) instead of using timestamped version.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to