You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/04/04 15:57:09 UTC
karaf git commit: Revert "[KARAF-4255] Only include conditional
dependencies in assembly if condition is met"
Repository: karaf
Updated Branches:
refs/heads/karaf-4.0.x 8198a513b -> 69ae22c98
Revert "[KARAF-4255] Only include conditional dependencies in assembly if condition is met"
This reverts commit 84b90910d955dbbf1d4752acb06ee126e341c669.
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/69ae22c9
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/69ae22c9
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/69ae22c9
Branch: refs/heads/karaf-4.0.x
Commit: 69ae22c98ae3632c9ee51391f0274f29796ba7c6
Parents: 8198a51
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Mon Apr 4 15:40:04 2016 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Mon Apr 4 15:40:04 2016 +0200
----------------------------------------------------------------------
.../apache/karaf/profile/assembly/Builder.java | 35 +++++---------------
1 file changed, 9 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/69ae22c9/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
index 9768f26..b4daa50 100644
--- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
+++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
@@ -751,12 +751,10 @@ public class Builder {
}
}
for (Conditional cond : feature.getConditional()) {
- if (isConditionalMet(cond, installedFeatures)) {
- for (Bundle bundle : cond.getBundle()) {
- if (!ignoreDependencyFlag || !bundle.isDependency()) {
- installArtifact(downloader, bundle.getLocation().trim());
- }
- }
+ for (Bundle bundle : cond.getBundle()) {
+ if (!ignoreDependencyFlag || !bundle.isDependency()) {
+ installArtifact(downloader, bundle.getLocation().trim());
+ }
}
}
}
@@ -822,11 +820,9 @@ public class Builder {
}
}
for (Conditional cond : feature.getConditional()) {
- if (isConditionalMet(cond, bootFeatures)) {
- for (Bundle bundle : cond.getBundle()) {
- if (!ignoreDependencyFlag || !bundle.isDependency()) {
- locations.add(bundle.getLocation().trim());
- }
+ for (Bundle bundle : cond.getBundle()) {
+ if (!ignoreDependencyFlag || !bundle.isDependency()) {
+ locations.add(bundle.getLocation().trim());
}
}
}
@@ -859,10 +855,8 @@ public class Builder {
installArtifact(downloader, configFile.getLocation().trim());
}
for (Conditional cond : feature.getConditional()) {
- if (isConditionalMet(cond, bootFeatures)) {
- for (ConfigFile configFile : cond.getConfigfile()) {
- installArtifact(downloader, configFile.getLocation().trim());
- }
+ for (ConfigFile configFile : cond.getConfigfile()) {
+ installArtifact(downloader, configFile.getLocation().trim());
}
}
// Install libraries
@@ -933,17 +927,6 @@ public class Builder {
return allBootFeatures;
}
- private boolean isConditionalMet(Conditional cond, Set<Feature> bootFeatures) {
- for (String condition : cond.getCondition()) {
- for (Feature feature : bootFeatures) {
- if (feature.getName().equals(condition)) {
- return true;
- }
- }
- }
- return false;
- }
-
private String getRepos(Features rep) {
StringBuilder repos = new StringBuilder();
for (String repo : new HashSet<>(rep.getRepository())) {