You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2015/02/20 11:26:08 UTC
[1/3] karaf git commit: Improve exception reporting when artifacts
download failed
Repository: karaf
Updated Branches:
refs/heads/master fa8133517 -> 47414d989
Improve exception reporting when artifacts download failed
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0c350b94
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0c350b94
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0c350b94
Branch: refs/heads/master
Commit: 0c350b94c5677e000dff88976425926b03216819
Parents: fa81335
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Fri Feb 20 10:54:47 2015 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Fri Feb 20 10:54:47 2015 +0100
----------------------------------------------------------------------
.../karaf/features/internal/download/impl/SimpleDownloadTask.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c350b94/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/SimpleDownloadTask.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/SimpleDownloadTask.java b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/SimpleDownloadTask.java
index 0767f91..be9090e 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/SimpleDownloadTask.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/SimpleDownloadTask.java
@@ -86,7 +86,7 @@ public class SimpleDownloadTask extends AbstractRetryableDownloadTask {
throw new IOException("Unable to rename file " + tmpFile.toString() + " to " + file.toString());
}
return file;
- } catch (IOException ignore) {
+ } catch (Exception ignore) {
throw new IOException("Could not download [" + this.url + "]", ignore);
}
}
[3/3] karaf git commit: [KARAF-3545] The bundle:list command should
display ellipsis when displaying long bundle locations
Posted by gn...@apache.org.
[KARAF-3545] The bundle:list command should display ellipsis when displaying long bundle locations
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/47414d98
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/47414d98
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/47414d98
Branch: refs/heads/master
Commit: 47414d989d9c055aa4da9d2a8b18a119852f14bc
Parents: f621963
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Fri Feb 20 11:06:35 2015 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Fri Feb 20 11:06:35 2015 +0100
----------------------------------------------------------------------
.../org/apache/karaf/bundle/command/List.java | 39 +++++++++++++++++++-
1 file changed, 37 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/47414d98/bundle/core/src/main/java/org/apache/karaf/bundle/command/List.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/List.java b/bundle/core/src/main/java/org/apache/karaf/bundle/command/List.java
index 14b2523..82119c0 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/List.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/List.java
@@ -24,6 +24,8 @@ import org.apache.karaf.shell.api.action.Command;
import org.apache.karaf.shell.api.action.Option;
import org.apache.karaf.shell.api.action.lifecycle.Reference;
import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.console.Terminal;
+import org.apache.karaf.shell.support.table.Col;
import org.apache.karaf.shell.support.table.ShellTable;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -48,18 +50,28 @@ public class List extends BundlesCommand {
@Option(name = "--no-format", description = "Disable table rendered output", required = false, multiValued = false)
boolean noFormat;
+ @Option(name = "--no-ellipsis")
+ boolean noEllipsis;
+
@Reference
BundleContext bundleContext;
@Reference
BundleService bundleService;
+ @Reference
+ Terminal terminal;
+
@Override
protected void executeOnBundle(Bundle bundle) throws Exception {
}
@Override
protected Object doExecute(java.util.List<Bundle> bundles) throws Exception {
+ if (noFormat) {
+ noEllipsis = true;
+ }
+
determineBundleLevelThreshold();
// Display active start level.
@@ -69,12 +81,35 @@ public class List extends BundlesCommand {
}
ShellTable table = new ShellTable();
+ if (!noEllipsis && showLocation && terminal != null && terminal.getWidth() > 0) {
+ table.size(terminal.getWidth());
+ }
table.column("ID").alignRight();
table.column("State");
table.column("Lvl").alignRight();
table.column("Version");
- table.column(getNameHeader());
-
+ table.column(new Col(getNameHeader()) {
+ @Override
+ protected String cut(String value, int size) {
+ if (showLocation && value.length() > size) {
+ String[] parts = value.split("/");
+ String cut = "";
+ int c = parts[0].length() + 4;
+ for (int idx = parts.length - 1; idx > 0; idx--) {
+ if (cut.length() + c + parts[idx].length() + 1 < size) {
+ cut = "/" + parts[idx] + cut;
+ } else {
+ break;
+ }
+ }
+ cut = parts[0] + "/..." + cut;
+ return cut;
+ } else {
+ return super.cut(value, size);
+ }
+ }
+ });
+
for (Bundle bundle : bundles) {
BundleInfo info = this.bundleService.getInfo(bundle);
if (info.getStartLevel() >= bundleLevelThreshold) {
[2/3] karaf git commit: [KARAF-3544] Spring features should have a
conditional on deployer for installing the spring url handler
Posted by gn...@apache.org.
[KARAF-3544] Spring features should have a conditional on deployer for installing the spring url handler
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f621963e
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f621963e
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f621963e
Branch: refs/heads/master
Commit: f621963e39a9019e68391b56df244f9ddf9b0aa4
Parents: 0c350b9
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Fri Feb 20 11:00:15 2015 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Fri Feb 20 11:00:15 2015 +0100
----------------------------------------------------------------------
.../spring/src/main/feature/feature.xml | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/f621963e/assemblies/features/spring/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/assemblies/features/spring/src/main/feature/feature.xml b/assemblies/features/spring/src/main/feature/feature.xml
index 838b052..8552f28 100644
--- a/assemblies/features/spring/src/main/feature/feature.xml
+++ b/assemblies/features/spring/src/main/feature/feature.xml
@@ -59,7 +59,10 @@
<bundle start-level="30">mvn:org.springframework/spring-aop/${spring31.version}</bundle>
<bundle start-level="30">mvn:org.springframework/spring-context/${spring31.version}</bundle>
<bundle start-level="30">mvn:org.springframework/spring-context-support/${spring31.version}</bundle>
- <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ <conditional>
+ <condition>deployer</condition>
+ <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ </conditional>
</feature>
<feature name="spring-aspects" description="Spring 3.1.x AOP support" version="${spring31.version}">
@@ -137,7 +140,10 @@
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring32.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring32.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring32.version}</bundle>
- <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ <conditional>
+ <condition>deployer</condition>
+ <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ </conditional>
</feature>
<feature name="spring-aspects" description="Spring 3.2.x AOP support" version="${spring32.version}">
@@ -215,7 +221,10 @@
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring40.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring40.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring40.version}</bundle>
- <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ <conditional>
+ <condition>deployer</condition>
+ <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ </conditional>
</feature>
<feature name="spring-aspects" description="Spring 4.0.x AOP support" version="${spring40.version}">
@@ -289,7 +298,10 @@
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/${spring41.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/${spring41.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/${spring41.version}</bundle>
- <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ <conditional>
+ <condition>deployer</condition>
+ <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/${project.version}</bundle>
+ </conditional>
</feature>
<feature name="spring-aspects" description="Spring 4.1.x AOP support" version="${spring41.version}">