diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-04-20 14:19:00 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-04-20 14:19:00 +0000 |
commit | 6cf10d20a878faeb3b6d846169af2f50004d3961 (patch) | |
tree | 8edf54104385fef84dc20906a304dcdd9804547f /sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache | |
parent | c42f794d6ec00e4022e8b3b502ca532b33a39453 (diff) |
No code changes just format the code
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1095421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache')
2 files changed, 28 insertions, 27 deletions
diff --git a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java index 1240f8ad09..be7c90e7c8 100644 --- a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java +++ b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java @@ -34,22 +34,23 @@ import org.apache.tuscany.sca.TuscanyRuntime; import org.apache.tuscany.sca.shell.Shell;
/**
- * Maven Mojo to start a Tuscany runtime and install the project as an SCA contribution.
- *
- * Invoked with "mvn tuscany:start" usually from configuration in a module pom.xml
+ * Maven Mojo to start a Tuscany runtime and install the project as an SCA
+ * contribution. Invoked with "mvn tuscany:start" usually from configuration in
+ * a module pom.xml
*
* @goal start
* @requiresDependencyResolution runtime
* @execute phase="test-compile"
- * @description Start a Tuscany directly and run composites from a SCA conribution maven project
+ * @description Start a Tuscany directly and run composites from a SCA
+ * conribution maven project
*/
public class TuscanyStartMojo extends AbstractMojo {
- public static Map<String, TuscanyRuntime> runtimes = new HashMap<String, TuscanyRuntime>();
-
+ public static Map<String, TuscanyRuntime> runtimes = new HashMap<String, TuscanyRuntime>();
+
/**
* The maven project.
- *
+ *
* @parameter expression="${project}"
* @required
* @readonly
@@ -104,7 +105,7 @@ public class TuscanyStartMojo extends AbstractMojo { private String nodeConfig;
/**
- * @parameter expression="${contributions}"
+ * @parameter expression="${contributions}"
*/
private String[] contributions;
@@ -122,13 +123,13 @@ public class TuscanyStartMojo extends AbstractMojo { 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.");
}
@@ -140,7 +141,7 @@ public class TuscanyStartMojo extends AbstractMojo { } else {
boolean found = false;
for (Object o : project.getDependencyArtifacts()) {
- Artifact a = (Artifact) o;
+ Artifact a = (Artifact)o;
if (a.getId().startsWith(s)) {
try {
contributionList.add(a.getFile().toURI().toURL().toString());
@@ -169,11 +170,11 @@ public class TuscanyStartMojo extends AbstractMojo { if (!contributionFile.exists()) {
contributionFile = new File(buildDirectory.getParent(), finalName.getName() + packaging);
}
-
+
String contribution = contributionFile.toURI().toURL().toString();
getLog().info("Project contribution: " + contribution);
cs.add(contribution);
-
+
} catch (MalformedURLException e) {
throw new MojoExecutionException("", e);
}
diff --git a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java index e6827ac0be..02f464619d 100644 --- a/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java +++ b/sca-java-2.x/trunk/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java @@ -38,22 +38,22 @@ public class TuscanyStopMojo extends AbstractMojo { private String id;
public void execute() throws MojoExecutionException, MojoFailureException {
- if (id.length() < 1) {
- // if id is set to "" then stop all runtimes
- for (String id : TuscanyStartMojo.runtimes.keySet()) {
- TuscanyRuntime runtime = TuscanyStartMojo.runtimes.get(id);
- runtime.stop();
+ if (id.length() < 1) {
+ // if id is set to "" then stop all runtimes
+ for (String id : TuscanyStartMojo.runtimes.keySet()) {
+ TuscanyRuntime runtime = TuscanyStartMojo.runtimes.get(id);
+ runtime.stop();
getLog().info("stopped Tuscany runtime " + id);
- }
- TuscanyStartMojo.runtimes.clear();
- } else {
- TuscanyRuntime runtime = TuscanyStartMojo.runtimes.remove(id);
- if (runtime == null) {
+ }
+ TuscanyStartMojo.runtimes.clear();
+ } else {
+ TuscanyRuntime runtime = TuscanyStartMojo.runtimes.remove(id);
+ if (runtime == null) {
getLog().info("No started runtime found for ID " + id);
- } else {
- runtime.stop();
+ } else {
+ runtime.stop();
getLog().info("stopped Tuscany runtime " + id);
- }
- }
+ }
+ }
}
}
|