felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1156554 - in /felix/trunk/scrplugin/maven-scr-plugin: changelog.txt src/main/java/org/apache/felix/scrplugin/mojo/MavenJavaClassDescriptorManager.java src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
Date Thu, 11 Aug 2011 09:27:32 GMT
Author: cziegeler
Date: Thu Aug 11 09:27:32 2011
New Revision: 1156554

URL: http://svn.apache.org/viewvc?rev=1156554&view=rev
Log:
FELIX-3066 : Add support for source directory include filter via plugin configuration. Apply
patch from Jan Volckaert

Modified:
    felix/trunk/scrplugin/maven-scr-plugin/changelog.txt
    felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/MavenJavaClassDescriptorManager.java
    felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java

Modified: felix/trunk/scrplugin/maven-scr-plugin/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/maven-scr-plugin/changelog.txt?rev=1156554&r1=1156553&r2=1156554&view=diff
==============================================================================
--- felix/trunk/scrplugin/maven-scr-plugin/changelog.txt (original)
+++ felix/trunk/scrplugin/maven-scr-plugin/changelog.txt Thu Aug 11 09:27:32 2011
@@ -1,3 +1,10 @@
+Changes from 1.7.2 to 1.7.4
+---------------------------
+
+** Improvement
+    * [FELIX-3066] - Add support for source directory include filter via plugin configuration
+
+
 Changes from 1.7.0 to 1.7.2
 ---------------------------
 

Modified: felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/MavenJavaClassDescriptorManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/MavenJavaClassDescriptorManager.java?rev=1156554&r1=1156553&r2=1156554&view=diff
==============================================================================
--- felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/MavenJavaClassDescriptorManager.java
(original)
+++ felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/MavenJavaClassDescriptorManager.java
Thu Aug 11 09:27:32 2011
@@ -36,6 +36,8 @@ public class MavenJavaClassDescriptorMan
 
     private final MavenProject project;
 
+    private final String includeString;
+    
     private final String excludeString;
 
     /** The component definitions from other bundles hashed by classname. */
@@ -43,12 +45,13 @@ public class MavenJavaClassDescriptorMan
 
 
     public MavenJavaClassDescriptorManager( MavenProject project, Log log, ClassLoader classLoader,
-        String[] annotationTagProviders, String excludeString, boolean parseJavadocs, boolean
processAnnotations )
+        String[] annotationTagProviders, String includeString, String excludeString, boolean
parseJavadocs, boolean processAnnotations )
         throws SCRDescriptorFailureException
     {
         super( log, classLoader, annotationTagProviders, parseJavadocs, processAnnotations
);
 
         this.project = project;
+        this.includeString = includeString;
         this.excludeString = excludeString;
     }
 
@@ -68,7 +71,11 @@ public class MavenJavaClassDescriptorMan
         final Iterator<String> i = project.getCompileSourceRoots().iterator();
 
         // FELIX-509: check for excludes
-        final String[] includes = new String[] { "**/*.java" };
+        String[] includes = new String[] { "**/*.java" };
+        if ( includeString != null ) {
+        	includes = StringUtils.split( includeString, "," );
+        }
+        
         final String[] excludes;
         if ( excludeString != null )
         {

Modified: felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java?rev=1156554&r1=1156553&r2=1156554&view=diff
==============================================================================
--- felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
(original)
+++ felix/trunk/scrplugin/maven-scr-plugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
Thu Aug 11 09:27:32 2011
@@ -125,6 +125,14 @@ public class SCRDescriptorMojo extends A
      */
     protected boolean strictMode;
 
+    
+    /**
+     * The comma separated list of tokens to include when processing sources.
+     * 
+     * @parameter alias="includes"
+     */
+    private String sourceIncludes;
+    
     /**
      * The comma separated list of tokens to exclude when processing sources.
      *
@@ -166,7 +174,7 @@ public class SCRDescriptorMojo extends A
 
             final ClassLoader classLoader = new URLClassLoader( getClassPath(), this.getClass().getClassLoader()
);
             final JavaClassDescriptorManager jManager = new MavenJavaClassDescriptorManager(
project, scrLog,
-                classLoader, this.annotationTagProviders, this.sourceExcludes, this.parseJavadoc,
+                classLoader, this.annotationTagProviders, this.sourceIncludes, this.sourceExcludes,
this.parseJavadoc,
                 this.processAnnotations );
 
             final SCRDescriptorGenerator generator = new SCRDescriptorGenerator( scrLog );



Mime
View raw message