felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r934695 - /felix/trunk/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
Date Fri, 16 Apr 2010 06:07:29 GMT
Author: ffang
Date: Fri Apr 16 06:07:28 2010
New Revision: 934695

URL: http://svn.apache.org/viewvc?rev=934695&view=rev
Log:
[FELIX-2239]features-maven-plugin validate goal should be able to use configurable config.properties

Modified:
    felix/trunk/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java

Modified: felix/trunk/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java?rev=934695&r1=934694&r2=934695&view=diff
==============================================================================
--- felix/trunk/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
(original)
+++ felix/trunk/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
Fri Apr 16 06:07:28 2010
@@ -78,6 +78,15 @@ public class ValidateFeaturesMojo extend
      */
     private File file;
 
+    /**
+     * karaf config.properties
+     * 
+     * @parameter default-value="config.properties"
+     */
+    private String karafConfig;
+
+    
+    
     /*
      * A map to cache the mvn: uris and the artifacts that correspond with them
      */
@@ -215,11 +224,19 @@ public class ValidateFeaturesMojo extend
      */
     private void readSystemPackages() throws IOException {
         Properties properties = new Properties();
-        properties.load(getClass().getClassLoader().getResourceAsStream("config.properties"));
+        if (karafConfig.equals("config.properties")) {
+        	properties.load(getClass().getClassLoader().getResourceAsStream("config.properties"));
+        } else {
+        	properties.load(new FileInputStream(new File(karafConfig)));
+        }
+
         String packages = (String) properties.get("jre-1.5");
         for (String pkg : packages.split(";")) {
             systemExports .add(pkg.trim());
         }
+        for (String pkg : packages.split(",")) {
+            systemExports .add(pkg.trim());
+        }
     }
 
     /*



Mime
View raw message