summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/maven
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2012-05-01 08:17:21 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2012-05-01 08:17:21 +0000
commita990c66f7d93a51384f7920d6c9b19690c944b32 (patch)
treeac357ad45d8dd0f71c900b0ea9570683e4cef52b /sca-java-2.x/trunk/maven
parentef40d3b0b39917441426516d59ecab859e3428fc (diff)
Update Tuscany maven plugin to support using a node xml file
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1332567 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/maven')
-rw-r--r--sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java32
1 files changed, 20 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java b/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java
index 1f4effcaf1..1f9a31480e 100644
--- a/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java
+++ b/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java
@@ -98,9 +98,9 @@ public class TuscanyRunMojo extends AbstractMojo {
private String domainURI;
/**
- * @parameter expression="${nodeConfig}"
+ * @parameter expression="${nodeXML}"
*/
- private String nodeConfig;
+ private String nodeXML;
/**
* @parameter expression="${contributions}"
@@ -155,19 +155,27 @@ public class TuscanyRunMojo extends AbstractMojo {
private void executeShell() throws MojoExecutionException {
getLog().info("Starting Tuscany Shell...");
- List<String> contributionList = new ArrayList<String>();
+ if (nodeXML != null && nodeXML.length() > 0) {
+ try {
+ Shell.main(new String[]{"-nodeXML:" + nodeXML});
+ } catch (Exception e) {
+ throw new MojoExecutionException("Exception in Shell", e);
+ }
+ } else {
+ List<String> contributionList = new ArrayList<String>();
- addProjectContribution(contributionList);
+ addProjectContribution(contributionList);
- addAdditionalContributions(contributionList);
+ addAdditionalContributions(contributionList);
- contributionList.add(0, "-help");
- contributionList.add(0, domainURI);
-
- try {
- Shell.main(contributionList.toArray(new String[contributionList.size()]));
- } catch (Exception e) {
- throw new MojoExecutionException("Exception in Shell", e);
+ contributionList.add(0, "-help");
+ contributionList.add(0, domainURI);
+
+ try {
+ Shell.main(contributionList.toArray(new String[contributionList.size()]));
+ } catch (Exception e) {
+ throw new MojoExecutionException("Exception in Shell", e);
+ }
}
getLog().info("Tuscany Shell stopped.");