You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/10/27 08:09:52 UTC

svn commit: r1710724 - in /felix/trunk/tools/maven-bundle-plugin/src: it/no-test-scoped-imports/ it/no-test-scoped-imports/src/ it/no-test-scoped-imports/src/main/ it/no-test-scoped-imports/src/main/java/ it/no-test-scoped-imports/src/main/java/org/ it...

Author: cziegeler
Date: Tue Oct 27 07:09:52 2015
New Revision: 1710724

URL: http://svn.apache.org/viewvc?rev=1710724&view=rev
Log:
FELIX-5062 : maven-bundle-plugin includes tests dependencies in package analysis. Add test cases from Julian Sedding

Added:
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/
Modified:
    felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Modified: felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=1710724&r1=1710723&r2=1710724&view=diff
==============================================================================
--- felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java (original)
+++ felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java Tue Oct 27 07:09:52 2015
@@ -89,6 +89,7 @@ import org.codehaus.plexus.util.Director
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.PropertyUtils;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.WriterFactory;
 
 import aQute.bnd.header.Attrs;
 import aQute.bnd.header.OSGiHeader;
@@ -107,7 +108,6 @@ import aQute.bnd.osgi.Processor;
 import aQute.lib.collections.ExtList;
 import aQute.lib.spring.SpringXMLType;
 import aQute.libg.generics.Create;
-import org.codehaus.plexus.util.WriterFactory;
 
 
 /**
@@ -1612,7 +1612,7 @@ public class BundlePlugin extends Abstra
         for ( Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); )
         {
             Artifact artifact = it.next();
-            if ( artifact.getArtifactHandler().isAddedToClasspath() )
+            if ( artifact.getArtifactHandler().isAddedToClasspath() && !Artifact.SCOPE_TEST.equals( artifact.getScope() ) )
             {
                 File file = getFile( artifact );
                 if ( file == null )
@@ -2126,7 +2126,7 @@ public class BundlePlugin extends Abstra
             else if ( mavenTestSourcePaths.length() > 0 )
             {
                 log.warn( Analyzer.SOURCEPATH + ": overriding " + mavenTestSourcePaths + " with " + sourcePath + " (add "
-                        + MAVEN_TEST_SOURCES + " if you want to include the maven sources)" );
+                        + MAVEN_TEST_SOURCES + " if you want to include the maven test sources)" );
             }
         }
         else if ( mavenSourcePaths.length() > 0 )