diff options
Diffstat (limited to 'sca-java-2.x')
-rw-r--r-- | sca-java-2.x/trunk/maven/maven-tuscany-plugin/pom.xml | 5 | ||||
-rw-r--r-- | sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java | 21 |
2 files changed, 20 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/pom.xml b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/pom.xml index 5a4d890a89..45d571d437 100644 --- a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/pom.xml +++ b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/pom.xml @@ -59,6 +59,11 @@ <artifactId>tuscany-domain-hazelcast</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>0.9.94</version>
+ </dependency>
</dependencies>
diff --git a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java index edb7e0f0de..7e3938d544 100644 --- a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java +++ b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java @@ -30,10 +30,11 @@ import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.shell.Shell;
/**
- * Maven Mojo to run the SCA contribution project in Tuscany.
+ * Maven Mojo to run the Tuscany Shell and install the project as an SCA contribution.
+ *
* Invoked with "mvn tuscany:run"
*
* @goal run
@@ -85,16 +86,17 @@ public class TuscanyRunMojo extends AbstractMojo { protected File finalName;
/**
- * @parameter expression="${config}" default-value="uri:default"
+ * @parameter expression="${config}" default-value="default"
*/
private String config;
+
/**
* @parameter expression="${contributions}"
*/
private String[] contributions;
public void execute() throws MojoExecutionException, MojoFailureException {
- getLog().info("Starting Tuscany Runtime...");
+ getLog().info("Starting Tuscany Shell...");
List<String> contributionList = new ArrayList<String>();
@@ -102,9 +104,16 @@ public class TuscanyRunMojo extends AbstractMojo { addAdditionalContributions(contributionList);
- Node node = NodeFactory.newInstance(config).createNode((String)null, contributionList.toArray(new String[contributionList.size()])).start();
+ contributionList.add(0, config);
+
+ try {
+ Shell.main(contributionList.toArray(new String[contributionList.size()]));
+ } catch (Exception e) {
+ throw new MojoExecutionException("Exception in Shell", e);
+ }
- waitForShutdown(node, getLog());
+// waitForShutdown(new Ob, getLog());
+ getLog().info("Tuscany Shell stopped.");
}
private void addAdditionalContributions(List<String> contributionList) throws MojoExecutionException {
|