[FELIX-2239]features-maven-plugin validate goal should be able to use configurable config.properties
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@934695 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java b/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
index fc3fe0a..deb6963 100644
--- a/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
+++ b/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
@@ -78,6 +78,15 @@
*/
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 @@
*/
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());
+ }
}
/*