summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-28 08:35:51 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-28 08:35:51 +0000
commit82b1d62db2fdde322d928ba3b2dc2f16bb1c368f (patch)
tree1c3ffe63e502ab1a5b20d1511b53536c5d1f0ed2 /java
parentc0820807441e7eada782a13741fbe2a273554a32 (diff)
Clean up the quickstart archetype and update to use the latest maven archetype plugin and get console prompting style work so 'mvn archetype:generate' works now
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@748791 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/archetypes/quickstart/pom.xml31
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml16
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml18
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml12
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml2
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java2
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java2
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite6
-rw-r--r--java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp2
9 files changed, 56 insertions, 35 deletions
diff --git a/java/sca/archetypes/quickstart/pom.xml b/java/sca/archetypes/quickstart/pom.xml
index 2676490854..37f408868c 100644
--- a/java/sca/archetypes/quickstart/pom.xml
+++ b/java/sca/archetypes/quickstart/pom.xml
@@ -26,20 +26,25 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>tuscany-archetype-quickstart</artifactId>
- <packaging>maven-plugin</packaging>
- <name>Apache Tuscany Quickstart Archetype</name>
+ <artifactId>tuscany-quickstart</artifactId>
+ <packaging>maven-archetype</packaging>
+ <name>Create a simple Apache Tuscany SCA webapp project</name>
<build>
- <resources>
- <resource>
- <filtering>false</filtering>
- <directory>${basedir}/src/main/resources</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- </resources>
- </build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-3</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-3</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml b/java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml
deleted file mode 100644
index 6ca47d2e71..0000000000
--- a/java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<archetype>
- <id>tuscany</id>
- <sources>
- <source>src/main/java/HelloworldImpl.java</source>
- <source>src/main/java/HelloworldService.java</source>
- </sources>
- <!-- testSources>
- <source>src/test/java/Start.java</source>
- <source>src/test/java/TestHomePage.java</source>
- </testSources -->
- <resources>
- <resource>src/main/webapp/hello.jsp</resource>
- <resource>src/main/webapp/WEB-INF/web.xml</resource>
- <resource>src/main/webapp/WEB-INF/web.composite</resource>
- </resources>
-</archetype> \ No newline at end of file
diff --git a/java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml b/java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000000..1c1efacea8
--- /dev/null
+++ b/java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="myproject">
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.jsp</include>
+ <include>**/*.xml</include>
+ <include>**/*.composite</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor> \ No newline at end of file
diff --git a/java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml b/java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml
new file mode 100644
index 0000000000..3c37144ad1
--- /dev/null
+++ b/java/sca/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><archetype>
+ <id>tuscany-quickstart</id>
+ <sources>
+ <source>src\main\java\HelloworldImpl.java</source>
+ <source>src\main\java\HelloworldService.java</source>
+ </sources>
+ <resources>
+ <resource>src\main\webapp\hello.jsp</resource>
+ <resource>src\main\webapp\WEB-INF\web.composite</resource>
+ <resource>src\main\webapp\WEB-INF\web.xml</resource>
+ </resources>
+</archetype> \ No newline at end of file
diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index 4a4466ac13..0a6cb38717 100644
--- a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -54,6 +54,8 @@
</dependency>
</dependencies>
<build>
+ <defaultGoal>install</defaultGoal>
+ <finalName>${artifactId}</finalName>
<resources>
<resource>
<filtering>false</filtering>
diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
index 31ae3b713a..b787f956c7 100644
--- a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
+++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
@@ -1,4 +1,4 @@
-package ${packageName};
+package ${package};
public class HelloworldImpl implements HelloworldService {
diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java
index 0540106802..fa9fad6788 100644
--- a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java
+++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java
@@ -1,4 +1,4 @@
-package ${packageName};
+package ${package};
public interface HelloworldService {
diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
index cf877edb4f..cd443aed16 100644
--- a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
+++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://${packageName}"
+ targetNamespace="http://${package}"
name=">${artifactId}">
- <component name="=">${artifactId}.web">
+ <component name="${artifactId}WebComponent">
<implementation.web web-uri=""/>
<reference name="service" target="HelloworldComponent"/>
</component>
<component name="HelloworldComponent">
- <implementation.java class="${packageName}.HelloworldImpl"/>
+ <implementation.java class="${package}.HelloworldImpl"/>
</component>
</composite>
diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp
index c3ebb4386d..7195c302d7 100644
--- a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp
+++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp
@@ -1,7 +1,7 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
-<sca:reference name="service" type="${packageName}.HelloworldService" />
+<sca:reference name="service" type="${package}.HelloworldService" />
<html>
<body >