summaryrefslogtreecommitdiffstats
path: root/java/sca/archetypes/contribution-jar
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-04-19 08:41:38 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-04-19 08:41:38 +0000
commitf5434dff25e5fb861d84a35ba7c4bcd0afe0b876 (patch)
tree22d6164f9886a42ebc6c015005a0c5e1c7c5bad9 /java/sca/archetypes/contribution-jar
parentf092056d428a18aa52b32538532f97b2a7b7b8f4 (diff)
Update contribution archetypes to support tuscany:run, add EagerInit method to helloworld imls so it outputs 'hello world' on init so its obvious its started up
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@766439 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/archetypes/contribution-jar')
-rw-r--r--java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml4
-rw-r--r--java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java9
2 files changed, 13 insertions, 0 deletions
diff --git a/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml
index a91c20c80b..9bbaa237dd 100644
--- a/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml
+++ b/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml
@@ -97,6 +97,10 @@
<downloadSources>true</downloadSources>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.tuscany.maven.plugins</groupId>
+ <artifactId>maven-tuscany-plugin</artifactId>
+ </plugin>
</plugins>
</build>
<properties>
diff --git a/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
index 2491816adc..af90e4fe7f 100644
--- a/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
+++ b/java/sca/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
@@ -18,10 +18,19 @@
*/
package ${package};
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.EagerInit;
+
+@Scope("COMPOSITE") @EagerInit
public class HelloworldImpl implements HelloworldService {
public String sayHello(String name) {
return "Hello " + name;
}
+ @Init
+ public void init() {
+ System.out.println(sayHello("world"));
+ }
}