summaryrefslogtreecommitdiffstats
path: root/maven-plugins/trunk
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-09-30 16:50:25 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-09-30 16:50:25 +0000
commit827a22b82cfbf835328d9061e67087bcb2110187 (patch)
tree13628be3062331131ad10b6a18c71bb982998254 /maven-plugins/trunk
parentfd91059b4edb58814dc1848e51f43b1a78979497 (diff)
Ignore provided, test and system scopes when creating meta-data. Also sort the meta data just for readability.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1003153 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven-plugins/trunk')
-rw-r--r--maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundlesMetaDataBuildMojo.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundlesMetaDataBuildMojo.java b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundlesMetaDataBuildMojo.java
index 4a793fc8c1..8d6cfd9aa4 100644
--- a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundlesMetaDataBuildMojo.java
+++ b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundlesMetaDataBuildMojo.java
@@ -42,6 +42,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.TreeSet;
import java.util.jar.Attributes;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
@@ -391,13 +392,20 @@ public class BundlesMetaDataBuildMojo extends AbstractMojo {
artifact.getArtifactId().equals(p.getArtifactId())){
a = p.getArtifact();
}
- if (a != null) {
- Set<String> names = nameMap.get(p.getArtifactId());
- if (names == null) {
- names = new HashSet<String>();
- nameMap.put(p.getArtifactId(), names);
+ if (a != null) {
+ if (a.getScope() != null &&
+ (a.getScope().equals("provided") ||
+ a.getScope().equals("test") ||
+ a.getScope().equals("system"))){
+ // ignore the artifact
+ } else {
+ Set<String> names = nameMap.get(p.getArtifactId());
+ if (names == null) {
+ names = new TreeSet<String>();
+ nameMap.put(p.getArtifactId(), names);
+ }
+ names.add(name);
}
- names.add(name);
}
}
artifactToNameMap.put(key, name);