You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2011/05/11 12:28:59 UTC
svn commit: r1101821 -
/tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
Author: antelder
Date: Wed May 11 10:28:59 2011
New Revision: 1101821
URL: http://svn.apache.org/viewvc?rev=1101821&view=rev
Log:
Change the Shell command 'installed' to by default just show the URIs of installed contributions. The plan being to then add 'installed <curi>' which will show detail about an installed contribution including its uri, url, dependent cintrubutions, deployables, exports, etc
Modified:
tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
Modified: tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java?rev=1101821&r1=1101820&r2=1101821&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java Wed May 11 10:28:59 2011
@@ -218,15 +218,21 @@ public class Shell {
}
curis = getNode().getInstalledContributionURIs();
}
+ boolean full = false;
for (String curi : curis) {
- out.println(curi + " " + getNode().getInstalledContribution(curi).getLocation());
- Contribution c = getNode().getInstalledContribution(curi);
- List<String> deployeds = getNode().getStartedCompositeURIs(curi);
- for (Artifact a : c.getArtifacts()) {
- if (a.getModel() instanceof Composite) {
- Composite composite = (Composite)a.getModel();
- String running = deployeds.contains(composite.getURI()) ? "***running***" : "";
- out.println(" " + composite.getURI() + " " + composite.getName() + " " + running);
+ out.println(" " + curi);
+ if (full) {
+ // TODO: add full detail view of contribution showing
+ // uri, url, dependent cintrubutions, deployables, exports
+ out.println(curi + " " + getNode().getInstalledContribution(curi).getLocation());
+ Contribution c = getNode().getInstalledContribution(curi);
+ List<String> deployeds = getNode().getStartedCompositeURIs(curi);
+ for (Artifact a : c.getArtifacts()) {
+ if (a.getModel() instanceof Composite) {
+ Composite composite = (Composite)a.getModel();
+ String running = deployeds.contains(composite.getURI()) ? "***running***" : "";
+ out.println(" " + composite.getURI() + " " + composite.getName() + " " + running);
+ }
}
}
}