Details
-
Type:
Wish
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.0-alpha-1
-
Component/s: None
-
Labels:None
-
Environment:Maven2
-
Number of attachments :
Description
It would be useful if there were an option that could be set such that a 'scope=provided' jar would not be copied via copy-dependencies, but I can't see any way of setting such or otherwise excluding such a jar from the copy.
Issue Links
- is duplicated by
-
MDEP-22
copy of provided dependencies
-
Just in case you think this is worth doing....
Index: CopyDependenciesMojo.java
===================================================================
— CopyDependenciesMojo.java (revision 1841)
+++ CopyDependenciesMojo.java (working copy)
@@ -60,7 +60,12 @@
for ( Iterator i = artifacts.iterator(); i.hasNext(); )
{
+ DefaultArtifact artifact = (DefaultArtifact) i.next();
+ String aScope = artifact.getScope();
+ // Gwyn: Only copy if not provided & not system
+ if (!Artifact.SCOPE_PROVIDED.equals( aScope ) && !Artifact.SCOPE_SYSTEM.equals( aScope )) { + copyArtifact( artifact, this.stripVersion ); + }
}
}