karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggrzy...@apache.org
Subject [1/2] karaf git commit: [KARAF-4905] Do not duplicate bundle locations in SimpleMavenResolver
Date Thu, 22 Dec 2016 12:01:01 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x da03f64c8 -> 541aea543
  refs/heads/master 6baf47d33 -> cf0967f23


[KARAF-4905] Do not duplicate bundle locations in SimpleMavenResolver


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/cf0967f2
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/cf0967f2
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/cf0967f2

Branch: refs/heads/master
Commit: cf0967f234f684b9eb19958a40991ce3ffa870ab
Parents: 6baf47d
Author: Grzegorz Grzybek <gr.grzybek@gmail.com>
Authored: Thu Dec 22 12:59:35 2016 +0100
Committer: Grzegorz Grzybek <gr.grzybek@gmail.com>
Committed: Thu Dec 22 12:59:35 2016 +0100

----------------------------------------------------------------------
 main/src/main/java/org/apache/karaf/main/Main.java | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/cf0967f2/main/src/main/java/org/apache/karaf/main/Main.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/Main.java b/main/src/main/java/org/apache/karaf/main/Main.java
index 581334d..1857420 100644
--- a/main/src/main/java/org/apache/karaf/main/Main.java
+++ b/main/src/main/java/org/apache/karaf/main/Main.java
@@ -538,15 +538,17 @@ public class Main {
 
     private List<File> getBundleRepos() {
         List<File> bundleDirs = new ArrayList<File>();
-        File baseSystemRepo = new File(config.karafHome, config.defaultRepo);
-        if (!baseSystemRepo.exists() && baseSystemRepo.isDirectory()) {
-            throw new RuntimeException("system repo folder not found: " + baseSystemRepo.getAbsolutePath());
-        }
-        bundleDirs.add(baseSystemRepo);
-
         File homeSystemRepo = new File(config.karafHome, config.defaultRepo);
+        if (!homeSystemRepo.isDirectory()) {
+            throw new RuntimeException("system repo folder not found: " + homeSystemRepo.getAbsolutePath());
+        }
         bundleDirs.add(homeSystemRepo);
 
+        File baseSystemRepo = new File(config.karafBase, config.defaultRepo);
+        if (baseSystemRepo.isDirectory() && !baseSystemRepo.equals(homeSystemRepo))
{
+            bundleDirs.add(baseSystemRepo);
+        }
+
         String locations = config.bundleLocations;
         if (locations != null) {
             StringTokenizer st = new StringTokenizer(locations, "\" ", true);


Mime
View raw message