You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by pi...@apache.org on 2011/01/11 06:31:38 UTC
svn commit: r1057491 -
/karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
Author: pieber
Date: Tue Jan 11 05:31:38 2011
New Revision: 1057491
URL: http://svn.apache.org/viewvc?rev=1057491&view=rev
Log:
[KARAF-373] addressing installation of maven based descriptors
Signed-off-by: Andreas Pieber <an...@gmail.com>
Modified:
karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
Modified: karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
URL: http://svn.apache.org/viewvc/karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java?rev=1057491&r1=1057490&r2=1057491&view=diff
==============================================================================
--- karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java (original)
+++ karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java Tue Jan 11 05:31:38 2011
@@ -78,6 +78,11 @@ public class AddFeaturesToRepoMojo exten
/**
* @parameter
*/
+ private boolean includeMvnBasedDescriptors = false;
+
+ /**
+ * @parameter
+ */
private boolean skipNonMavenProtocols = true;
/**
@@ -87,8 +92,12 @@ public class AddFeaturesToRepoMojo exten
public void execute() throws MojoExecutionException, MojoFailureException {
try {
+ Set<String> bundles = new HashSet<String>();
Map<String, Feature> featuresMap = new HashMap<String, Feature>();
for (String uri : descriptors) {
+ if (includeMvnBasedDescriptors) {
+ bundles.add(uri);
+ }
Repository repo = new Repository(URI.create(translateFromMaven(uri)));
for (Feature f : repo.getFeatures()) {
featuresMap.put(f.getName(), f);
@@ -96,7 +105,6 @@ public class AddFeaturesToRepoMojo exten
}
Set<String> transitiveFeatures = new HashSet<String>();
addFeatures(features, transitiveFeatures, featuresMap);
- Set<String> bundles = new HashSet<String>();
for (String feature : transitiveFeatures) {
bundles.addAll(featuresMap.get(feature).getBundles());
//Treat the config files as bundles, since it is only copying
@@ -260,7 +268,7 @@ public class AddFeaturesToRepoMojo exten
public Map<String, Map<String, String>> getConfigurations() {
return configs;
}
-
+
public List<String> getConfigFiles() {
return configFiles;
}
@@ -276,7 +284,7 @@ public class AddFeaturesToRepoMojo exten
public void addConfig(String name, Map<String,String> properties) {
configs.put(name, properties);
}
-
+
public void addConfigFile(String configFile) {
configFiles.add(configFile);
}