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/15 11:29:46 UTC
svn commit: r1059285 -
/karaf/branches/karaf-2.1.x/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
Author: pieber
Date: Sat Jan 15 10:29:45 2011
New Revision: 1059285
URL: http://svn.apache.org/viewvc?rev=1059285&view=rev
Log:
[KARAF-373] addressing installation of maven based descriptors
Signed-off-by: Andreas Pieber <an...@gmail.com>
Modified:
karaf/branches/karaf-2.1.x/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
Modified: karaf/branches/karaf-2.1.x/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.1.x/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java?rev=1059285&r1=1059284&r2=1059285&view=diff
==============================================================================
--- karaf/branches/karaf-2.1.x/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java (original)
+++ karaf/branches/karaf-2.1.x/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java Sat Jan 15 10:29:45 2011
@@ -88,12 +88,21 @@ public class AddFeaturesToRepoMojo exten
/**
* @parameter
*/
+ private boolean includeMvnBasedDescriptors = false;
+
+ /**
+ * @parameter
+ */
private boolean addTransitiveFeatures = true;
public void execute() throws MojoExecutionException, MojoFailureException {
try {
Map<String, Feature> featuresMap = new HashMap<String, Feature>();
+ Set<String> bundles = new HashSet<String>();
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);
@@ -101,7 +110,6 @@ public class AddFeaturesToRepoMojo exten
}
Set<String> featuresBundles = new HashSet<String>();
Set<String> transitiveFeatures = new HashSet<String>();
- Set<String> bundles = new HashSet<String>();
addFeatures(features, featuresBundles, transitiveFeatures, featuresMap);
// add the bundles of the configured features to the bundles list
@@ -109,13 +117,13 @@ public class AddFeaturesToRepoMojo exten
// if transitive features are enabled we add the contents of those
// features to the bundles list
- if (this.addTransitiveFeatures) {
+ if (addTransitiveFeatures) {
for (String feature : transitiveFeatures) {
getLog().info("Adding contents of transitive feature: " + feature);
bundles.addAll(featuresMap.get(feature).getBundles());
}
}
-
+
getLog().info("Base repo: " + localRepo.getUrl());
for (String bundle : bundles) {
// get rid of of possible line-breaks KARAF-313