Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.0.4, 2.0.6
-
Fix Version/s: 2.0.7
-
Component/s: dependencies task
-
Labels:None
-
Number of attachments :
Description
I would like to copy all dependencies into a 'lib' directory without version numbers in the filename. I don't think I can safely determine which part of the filename is the artifact and which part is the version number. Only maven knows that, so I think the m2 ant tasks need something more flexible than the current filesetId.
Brett Porter suggests:
Basically, filesetId references the local repository directory, so it
will need to be something that:
1) produces a reference to all the artifacts downloaded for use later
2) can be used as a mapper in association with the filesetId produced
Here is a patch to be able to remove versions from filenames, securely and consistently.
The idea is :
1. add a "versionsPropertyName" attribute to dependencies task: this task will set the property with a String representing the misc versions of resolved artifacts (with file separator)
2. a custom mapper that will take this version info as from property: it will do the mapping itself
Look at the sample.build.xml part of the patch to see the way of using it.