karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-3506] Handle locations starting/ending with whitespaces in InstallKarsMojo
Date Sun, 08 Feb 2015 07:02:54 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x 516199213 -> af5b42691


[KARAF-3506] Handle locations starting/ending with whitespaces in InstallKarsMojo


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

Branch: refs/heads/karaf-3.0.x
Commit: af5b42691e8e69d6122bccf3b33c5ee925ac632c
Parents: 5161992
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Sun Feb 8 08:02:29 2015 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sun Feb 8 08:02:29 2015 +0100

----------------------------------------------------------------------
 .../apache/karaf/tooling/features/InstallKarsMojo.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/af5b4269/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
index a16f96f..543fab2 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
@@ -222,7 +222,7 @@ public class InstallKarsMojo extends MojoSupport {
                     getLog().info("= Updating startup.properties file");
                     List<String> comment = Arrays.asList(new String[]{"", "# feature:
" + feature.getName() + " version: " + feature.getVersion()});
                     for (BundleInfo bundleInfo : feature.getBundles()) {
-                        String bundleLocation = bundleInfo.getLocation();
+                        String bundleLocation = bundleInfo.getLocation().trim();
                         String bundleStartLevel = Integer.toString(bundleInfo.getStartLevel()
== 0 ? defaultStartLevel : bundleInfo.getStartLevel());
                         if (startupProperties.containsKey(bundleLocation)) {
                             int oldStartLevel = Integer.decode((String) startupProperties.get(bundleLocation));
@@ -469,10 +469,10 @@ public class InstallKarsMojo extends MojoSupport {
 
     private void installBundle(Bundle bundle) throws Exception {
         if (!ignoreDependencyFlag && bundle.isDependency()) {
-            getLog().warn("== Bundle " + bundle.getLocation() + " is defined as dependency,
so it's not installed");
+            getLog().warn("== Bundle " + bundle.getLocation().trim() + " is defined as dependency,
so it's not installed");
         } else {
-            getLog().info("== Installing bundle " + bundle.getLocation());
-            String bundleLocation = bundle.getLocation();
+            getLog().info("== Installing bundle " + bundle.getLocation().trim());
+            String bundleLocation = bundle.getLocation().trim();
             // cleanup prefixes
             if (bundleLocation.startsWith("wrap:")) {
                 bundleLocation = bundleLocation.substring("wrap:".length());
@@ -528,8 +528,8 @@ public class InstallKarsMojo extends MojoSupport {
     }
 
     private void installConfigFile(ConfigFile configFile) throws Exception {
-        getLog().warn("== Installing configuration file " + configFile.getLocation());
-        String configFileLocation = configFile.getLocation();
+        getLog().warn("== Installing configuration file " + configFile.getLocation().trim());
+        String configFileLocation = configFile.getLocation().trim();
         File configFileFile;
         if (configFileLocation.startsWith("mvn:")) {
             configFileFile = dependencyHelper.resolveById(configFileLocation, getLog());


Mime
View raw message