You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2014/07/02 10:47:38 UTC

git commit: [KARAF-3089] Ignore artifacts with scope test in the generation of the feature descriptor

Repository: karaf
Updated Branches:
  refs/heads/karaf-2.x 3c5edd4e1 -> 2253d98c7


[KARAF-3089] Ignore artifacts with scope test in the generation of the feature descriptor


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/2253d98c
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/2253d98c
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/2253d98c

Branch: refs/heads/karaf-2.x
Commit: 2253d98c76af5a39f99df4f1ded3247e46267608
Parents: 3c5edd4
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Wed Jul 2 10:43:21 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Wed Jul 2 10:43:21 2014 +0200

----------------------------------------------------------------------
 .../tooling/features/GenerateFeaturesFileMojo.java    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/2253d98c/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java
----------------------------------------------------------------------
diff --git a/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java b/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java
index a82f1d0..152ca65 100644
--- a/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java
+++ b/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java
@@ -250,12 +250,14 @@ public class GenerateFeaturesFileMojo extends MojoSupport {
         Set<Artifact> dependencies = (Set<Artifact>)project.getDependencyArtifacts();
         dependencies.removeAll(provided);
         for (Artifact artifact : dependencies) {
-            getLog().info(" Generating feature " + artifact.getArtifactId() + " from " + artifact);
-            out.println("  <feature name='" + artifact.getArtifactId() + "'>");
-            currentFeature.clear();
-            writeBundle(out, artifact);
-            features.add(artifact);
-            out.println("  </feature>");
+            if (!artifact.getScope().equalsIgnoreCase("test")) {
+                getLog().info(" Generating feature " + artifact.getArtifactId() + " from " + artifact);
+                out.println("  <feature name='" + artifact.getArtifactId() + "'>");
+                currentFeature.clear();
+                writeBundle(out, artifact);
+                features.add(artifact);
+                out.println("  </feature>");
+            }
         }
         if (missingBundles.size() > 0) {
         	getLog().info("-- Some bundles were missing  --");