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 2012/05/01 10:17:22 UTC

svn commit: r1332567 - /tuscany/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java

Author: antelder
Date: Tue May  1 08:17:21 2012
New Revision: 1332567

URL: http://svn.apache.org/viewvc?rev=1332567&view=rev
Log:
Update Tuscany maven plugin to support using a node xml file

Modified:
    tuscany/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java

Modified: tuscany/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java?rev=1332567&r1=1332566&r2=1332567&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java (original)
+++ tuscany/sca-java-2.x/trunk/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java Tue May  1 08:17:21 2012
@@ -98,9 +98,9 @@ public class TuscanyRunMojo extends Abst
     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 Abst
     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.");