tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1369603 [1/4] - in /tomcat/maven-plugin/trunk/tomcat-maven-archetype: ./ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/__rootArtifactId__-api-impl/ src/main/resources/arch...
Date Sun, 05 Aug 2012 14:30:06 GMT
Author: olamy
Date: Sun Aug  5 14:30:03 2012
New Revision: 1369603

URL: http://svn.apache.org/viewvc?rev=1369603&view=rev
Log:
[MTOMCAT-124] tomcat-maven-archetype unused generation parameters
Submitted by Patrick Garcia.


Added:
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/impl/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/impl/DefaultHelloService.java
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/META-INF/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/META-INF/spring-context.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/impl/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/impl/TestDefaultHelloService.java
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/HelloService.java
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-exec/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-exec/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/context.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/test/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/test/SimpleTest.java
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/resources/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/resources/log4j.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/applicationContext.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/web.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/css/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/css/bootstrap.min.1.4.0.css
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/index.html
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/js/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/js/jquery-1.7.js
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/customized/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/customized/archetype.properties
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/customized/goal.txt
Removed:
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/basic-api/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/basic-api-impl/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/basic-webapp/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/basic-webapp-exec/
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/basic-webapp-it/src/
Modified:
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/archetype.properties
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/goal.txt

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml?rev=1369603&r1=1369602&r2=1369603&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml Sun Aug  5 14:30:03 2012
@@ -38,6 +38,7 @@
   <properties>
     <archetypeVersion>2.2</archetypeVersion>
     <tomcatPluginVersion>${project.version}</tomcatPluginVersion>
+    <archetypeItGoalsBatch>clean,pre-integration-test</archetypeItGoalsBatch>
     <archetypeItGoals>clean,install</archetypeItGoals>
   </properties>
   <build>
@@ -80,10 +81,8 @@
               <exclude>README.txt</exclude>
               <exclude>*.sh</exclude>
               <exclude>.git/**</exclude>
-              <exclude>.idea/**</exclude>
               <exclude>.extract/**</exclude>
-              <exclude>src/main/resources/archetype-resources/basic-webapp/src/main/webapp/css/bootstrap.min.1.4.0.css</exclude>
-              <exclude>src/main/resources/archetype-resources/basic-webapp/src/main/webapp/js/jquery-1.7.js</exclude>
+              <exclude>src/main/resources/archetype-resources/*/src/main/webapp/js/jquery-1.7.js</exclude>
               <exclude>src/test/**</exclude>
             </excludes>
           </configuration>
@@ -113,6 +112,7 @@
     <profile>
       <id>headless</id>
       <properties>
+        <archetypeItGoalsBatch>clean,pre-integration-test,-Pheadless</archetypeItGoalsBatch>
         <archetypeItGoals>clean,install,-Pheadless</archetypeItGoals>
       </properties>
     </profile>

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1369603&r1=1369602&r2=1369603&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml Sun Aug  5 14:30:03 2012
@@ -17,45 +17,14 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="tomcat-archetype"
-    xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <requiredProperties>
-    <requiredProperty key="groupId">
-      <defaultValue>org.apache.tomcat.maven</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="rootArtifactId">
-      <defaultValue>tomcat-maven-project</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="version">
-      <defaultValue>1.0-SNAPSHOT</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="artifactId-api">
-      <defaultValue>basic-api</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="artifactId-api-impl">
-      <defaultValue>basic-api-impl</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="artifactId-webapp">
-      <defaultValue>basic-webapp</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="artifactId-webapp-exec">
-      <defaultValue>basic-webapp-exec</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="artifactId-webapp-it">
-      <defaultValue>basic-webapp-it</defaultValue>
-    </requiredProperty>
-  </requiredProperties>
-  <fileSets>
-    <fileSet encoding="UTF-8">
-      <directory></directory>
-      <includes>
-        <include>pom.xml</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-  <modules>
-    <module id="basic-api" dir="basic-api" name="basic-api">
+<archetype-descriptor
+	xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+	name="tomcat-archetype"
+	xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+>
+	<modules>
+		<module id="${rootArtifactId}-api" dir="__rootArtifactId__-api" name="${rootArtifactId}-api">
       <fileSets>
         <fileSet filtered="true" packaged="true" encoding="UTF-8">
           <directory>src/main/java</directory>
@@ -64,8 +33,8 @@
           </includes>
         </fileSet>
       </fileSets>
-    </module>
-    <module id="basic-api-impl" dir="basic-api-impl" name="basic-api-impl">
+		</module>
+		<module id="${rootArtifactId}-api-impl" dir="__rootArtifactId__-api-impl" name="${rootArtifactId}-api-impl">
       <fileSets>
         <fileSet filtered="true" packaged="true" encoding="UTF-8">
           <directory>src/main/java</directory>
@@ -86,8 +55,8 @@
           </includes>
         </fileSet>
       </fileSets>
-    </module>
-    <module id="basic-webapp" dir="basic-webapp" name="basic-webapp">
+		</module>
+		<module id="${rootArtifactId}-webapp" dir="__rootArtifactId__-webapp" name="${rootArtifactId}-webapp">
       <fileSets>
         <fileSet filtered="false" encoding="UTF-8">
           <directory>src/main/resources</directory>
@@ -116,8 +85,8 @@
           </includes>
         </fileSet>
       </fileSets>
-    </module>
-    <module id="basic-webapp-exec" dir="basic-webapp-exec" name="basic-webapp-exec">
+		</module>
+		<module id="${rootArtifactId}-webapp-exec" dir="__rootArtifactId__-webapp-exec" name="${rootArtifactId}-webapp-exec">
       <fileSets>
         <fileSet filtered="false" packaged="false" encoding="UTF-8">
           <directory></directory>
@@ -126,8 +95,8 @@
           </includes>
         </fileSet>
       </fileSets>
-    </module>
-    <module id="basic-webapp-it" dir="basic-webapp-it" name="basic-webapp-it">
+		</module>
+		<module id="${rootArtifactId}-webapp-it" dir="__rootArtifactId__-webapp-it" name="${rootArtifactId}-webapp-it">
       <fileSets>
         <fileSet filtered="true" packaged="true" encoding="UTF-8">
           <directory>src/test/java</directory>
@@ -142,6 +111,6 @@
           </includes>
         </fileSet>
       </fileSets>
-    </module>
-  </modules>
+		</module>
+	</modules>
 </archetype-descriptor>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/pom.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/pom.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/pom.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>\${groupId}</groupId>
+    <artifactId>\${rootArtifactId}</artifactId>
+    <version>\${version}</version>
+  </parent>
+
+  <artifactId>\${rootArtifactId}-api-impl</artifactId>
+
+  <dependencies>
+    <dependency>
+       <groupId>\${groupId}</groupId>
+       <artifactId>\${rootArtifactId}-api</artifactId>
+     </dependency>
+    <dependency>
+      <groupId>javax.ws.rs</groupId>
+      <artifactId>jsr311-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle-jaxrs</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-server</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-servlet_3.0_spec</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-javamail_1.4_spec</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-servlet_2.5_spec</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat.embed</groupId>
+      <artifactId>tomcat-embed-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-juli</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat.embed</groupId>
+      <artifactId>tomcat-embed-logging-juli</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-servlet-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+</project>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/impl/DefaultHelloService.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/impl/DefaultHelloService.java?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/impl/DefaultHelloService.java (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/java/api/impl/DefaultHelloService.java Sun Aug  5 14:30:03 2012
@@ -0,0 +1,39 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.api.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import ${package}.api.HelloService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author Olivier Lamy
+ */
+@Service( "helloService${symbol_pound}default" )
+public class DefaultHelloService
+    implements HelloService
+{
+    public String sayHello( String who )
+    {
+        return "Hello " + who;
+    }
+}

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/META-INF/spring-context.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/META-INF/spring-context.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/main/resources/META-INF/spring-context.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,52 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+           http://www.springframework.org/schema/context 
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd
+           http://cxf.apache.org/jaxrs
+           http://cxf.apache.org/schemas/jaxrs.xsd">
+
+  <import resource="classpath:META-INF/cxf/cxf.xml"/>
+  <!--
+  <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
+  -->
+  <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
+
+  <context:annotation-config />
+  <context:component-scan base-package="${package}"/>
+
+  <jaxrs:server id="testServices" address="/testServices">
+
+    <jaxrs:serviceBeans>
+      <ref bean="helloService${symbol_pound}default"/>
+    </jaxrs:serviceBeans>
+
+   </jaxrs:server>
+
+</beans>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/impl/TestDefaultHelloService.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/impl/TestDefaultHelloService.java?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/impl/TestDefaultHelloService.java (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api-impl/src/test/java/api/impl/TestDefaultHelloService.java Sun Aug  5 14:30:03 2012
@@ -0,0 +1,104 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.api.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import ${package}.api.HelloService;
+
+import junit.framework.TestCase;
+import org.apache.catalina.Context;
+import org.apache.catalina.deploy.ApplicationParameter;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.transport.servlet.CXFServlet;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.springframework.web.context.ContextLoaderListener;
+
+/**
+ * @author Olivier Lamy
+ */
+@RunWith( JUnit4.class )
+public class TestDefaultHelloService
+    extends TestCase
+{
+    int port;
+
+    private Tomcat tomcat;
+
+    @Before
+    public void startTomcat()
+        throws Exception
+    {
+        tomcat = new Tomcat();
+        tomcat.setBaseDir( System.getProperty( "java.io.tmpdir" ) );
+        tomcat.setPort( 0 );
+
+        Context context = tomcat.addContext( "", System.getProperty( "java.io.tmpdir" ) );
+
+        ApplicationParameter applicationParameter = new ApplicationParameter();
+        applicationParameter.setName( "contextConfigLocation" );
+        applicationParameter.setValue( getSpringConfigLocation() );
+        context.addApplicationParameter( applicationParameter );
+
+        context.addApplicationListener( ContextLoaderListener.class.getName() );
+
+        Tomcat.addServlet( context, "cxf", new CXFServlet() );
+        context.addServletMapping( "/" + getRestServicesPath() + "/*", "cxf" );
+
+        tomcat.start();
+
+        port = tomcat.getConnector().getLocalPort();
+
+        System.out.println("Tomcat started on port:"+port);
+    }
+
+    @After
+    public void stopTomcat()
+        throws Exception
+    {
+        tomcat.stop();
+    }
+
+    protected String getRestServicesPath()
+    {
+        return "foo";
+    }
+
+    protected String getSpringConfigLocation()
+    {
+        return "classpath*:META-INF/spring-context.xml";
+    }
+
+    @Test
+    public void testSayHello()
+    {
+        HelloService service =
+            JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/testServices/",
+                                       HelloService.class );
+        String who = "foo";
+        assertEquals( "Hello "+who, service.sayHello( who ) );
+    }
+}

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>\${groupId}</groupId>
+    <artifactId>\${rootArtifactId}</artifactId>
+    <version>\${version}</version>
+  </parent>
+
+  <artifactId>\${rootArtifactId}-api</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>javax.ws.rs</groupId>
+      <artifactId>jsr311-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle-jaxrs</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-server</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+
+</project>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/HelloService.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/HelloService.java?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/HelloService.java (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/HelloService.java Sun Aug  5 14:30:03 2012
@@ -0,0 +1,41 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.api;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * HelloService!
+ */
+@Path( "HelloService" )
+public interface HelloService
+{
+    @Path( "sayHello/{who}" )
+    @GET
+    @Produces( { MediaType.TEXT_PLAIN } )
+    String sayHello( @PathParam( "who" ) String who );
+}

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-exec/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-exec/pom.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-exec/pom.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-exec/pom.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>\${groupId}</groupId>
+    <artifactId>\${rootArtifactId}</artifactId>
+    <version>\${version}</version>
+  </parent>
+
+  <artifactId>\${rootArtifactId}-webapp-exec</artifactId>
+  <packaging>pom</packaging>
+
+
+  <build>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-war-exec</id>
+            <goals>
+              <goal>exec-war-only</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <warRunDependencies>
+                <warRunDependency>
+                  <dependency>
+                    <groupId>\${groupId}</groupId>
+                    <artifactId>\${rootArtifactId}-webapp</artifactId>
+                    <version>\${project.version}</version>
+                    <type>war</type>
+                  </dependency>
+                </warRunDependency>
+              </warRunDependencies>
+            </configuration>
+          </execution>
+
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>\${groupId}</groupId>
+      <artifactId>\${rootArtifactId}-webapp</artifactId>
+      <type>war</type>
+    </dependency>
+
+  </dependencies>
+
+
+
+</project>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/pom.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/pom.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/pom.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>\${groupId}</groupId>
+    <artifactId>\${rootArtifactId}</artifactId>
+    <version>\${version}</version>
+  </parent>
+
+  <artifactId>\${rootArtifactId}-webapp-it</artifactId>
+  <packaging>pom</packaging>
+
+  <properties>
+    <seleniumPluginVersion>2.3</seleniumPluginVersion>
+    <selenium-server.version>2.24.1</selenium-server.version>
+    <selenium.port>4444</selenium.port>
+    <tomcat.port>9898</tomcat.port>
+    <serverUrl>http://localhost:${tomcat.port}/</serverUrl>
+    <seleniumBrowser>*firefox</seleniumBrowser>
+  </properties>
+
+  <build>
+    <testSourceDirectory>src/test/java</testSourceDirectory>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>selenium-maven-plugin</artifactId>
+          <version>${seleniumPluginVersion}</version>
+          <dependencies>
+            <dependency>
+              <groupId>org.seleniumhq.selenium</groupId>
+              <artifactId>selenium-server</artifactId>
+              <version>${selenium-server.version}</version>
+            </dependency>
+
+            <dependency>
+              <groupId>org.seleniumhq.selenium</groupId>
+              <artifactId>selenium-remote-driver</artifactId>
+              <version>${selenium-server.version}</version>
+            </dependency>
+
+            <dependency>
+              <groupId>org.seleniumhq.selenium</groupId>
+              <artifactId>selenium-api</artifactId>
+              <version>${selenium-server.version}</version>
+            </dependency>
+          </dependencies>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>test-compile</phase>
+            <goals>
+              <goal>testCompile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.4</version>
+        <executions>
+          <execution>
+            <id>unzip-webapp</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>\${project.groupId}</groupId>
+                  <artifactId>\${rootArtifactId}-webapp</artifactId>
+                  <version>\${project.version}</version>
+                  <type>war</type>
+                </artifactItem>
+              </artifactItems>
+              <outputDirectory>\${project.build.directory}/webapp</outputDirectory>
+              <overWriteSnapshots>true</overWriteSnapshots>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>selenium-integration-tests</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <systemPropertyVariables>
+                <selenium.port>${selenium.port}</selenium.port>
+                <serverUrl>${serverUrl}</serverUrl>
+                <seleniumBrowser>${seleniumBrowser}</seleniumBrowser>
+              </systemPropertyVariables>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-run</id>
+            <goals>
+              <goal>run-war-only</goal>
+            </goals>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <path>/</path>
+              <port>${tomcat.port}</port>
+              <uriEncoding>UTF-8</uriEncoding>
+              <warDirectory>\${project.build.directory}/webapp/</warDirectory>
+              <fork>true</fork>
+              <ignorePackaging>true</ignorePackaging>
+              <contextFile>src/test/context.xml</contextFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-shutdown</id>
+            <goals>
+              <goal>shutdown</goal>
+            </goals>
+            <phase>post-integration-test</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>selenium-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>start-server</goal>
+            </goals>
+            <configuration>
+              <background>true</background>
+              <port>${selenium.port}</port>
+              <logOutput>true</logOutput>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>\${groupId}</groupId>
+      <artifactId>\${rootArtifactId}-webapp</artifactId>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.12</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+      <artifactId>selenium-java-client-driver</artifactId>
+      <version>1.0.2</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>chrome</id>
+      <properties>
+        <seleniumBrowser>*chrome</seleniumBrowser>
+      </properties>
+    </profile>
+    <profile>
+      <id>iexplore</id>
+      <properties>
+        <seleniumBrowser>*iexplore</seleniumBrowser>
+      </properties>
+    </profile>
+    <profile>
+      <id>headless</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>selenium-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>xvfb</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>xvfb</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+
+</project>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/context.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/context.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/context.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/context.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<Context path="/"/>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/test/SimpleTest.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/test/SimpleTest.java?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/test/SimpleTest.java (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp-it/src/test/java/webapp/test/SimpleTest.java Sun Aug  5 14:30:03 2012
@@ -0,0 +1,53 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.webapp.test;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import junit.framework.TestCase;
+
+/**
+ * @author Olivier Lamy
+ */
+public class SimpleTest
+    extends TestCase
+{
+    
+    public void testSimple() throws Exception
+    {
+        
+        int seleniumPort = Integer.parseInt( System.getProperty( "selenium.port", "4444" ) );
+        String browser = System.getProperty( "seleniumBrowser", "*firefox" );
+        String serverUrl = System.getProperty( "serverUrl", "http://localhost:9090/" );
+        
+        DefaultSelenium s = new DefaultSelenium( "localhost", seleniumPort, browser, serverUrl );
+        s.start(  );
+        s.open( "index.html" );
+        s.type( "who", "foo" );
+        s.click( "send-btn" );
+        // wait a bit ajax response
+        Thread.sleep( 1000 );
+        String text = s.getText( "response" );
+        assertEquals( "Hello foo", text );
+
+    }
+    
+}

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>\${groupId}</groupId>
+    <artifactId>\${rootArtifactId}</artifactId>
+    <version>\${version}</version>
+  </parent>
+
+  <artifactId>\${rootArtifactId}-webapp</artifactId>
+  <packaging>war</packaging>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat6-maven-plugin</artifactId>
+          <configuration>
+            <port>9090</port>
+            <path>/</path>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <configuration>
+            <port>9090</port>
+            <path>/</path>
+          </configuration>
+        </plugin>
+
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <dependencies>
+    <dependency>
+       <groupId>\${groupId}</groupId>
+       <artifactId>\${rootArtifactId}-api</artifactId>
+     </dependency>
+    <dependency>
+       <groupId>\${groupId}</groupId>
+       <artifactId>\${rootArtifactId}-api-impl</artifactId>
+     </dependency>
+    <dependency>
+      <groupId>javax.ws.rs</groupId>
+      <artifactId>jsr311-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle-jaxrs</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-server</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-continuation</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-http</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-io</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-security</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-servlet_3.0_spec</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-javamail_1.4_spec</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-servlet_2.5_spec</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.12</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+
+
+</project>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/resources/log4j.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/resources/log4j.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/resources/log4j.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+  <appender name="console" class="org.apache.log4j.ConsoleAppender">
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
+    </layout>
+  </appender>
+
+  <logger name="org.springframework">
+    <level value="info"/>
+  </logger>
+
+
+  <root>
+    <priority value ="info" />
+    <appender-ref ref="console" />
+  </root>
+
+</log4j:configuration>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/applicationContext.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/applicationContext.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/applicationContext.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~  http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd
+           http://cxf.apache.org/jaxrs
+           http://cxf.apache.org/schemas/jaxrs.xsd">
+
+</beans>

Added: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/web.xml?rev=1369603&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/web.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/src/main/webapp/WEB-INF/web.xml Sun Aug  5 14:30:03 2012
@@ -0,0 +1,58 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+  <display-name>Archetype Created Web Application</display-name>
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+      classpath*:META-INF/spring-context.xml,
+      /WEB-INF/applicationContext.xml
+    </param-value>
+  </context-param>
+
+  <listener>
+    <listener-class>
+      org.springframework.web.context.ContextLoaderListener
+    </listener-class>
+  </listener>
+
+  <servlet>
+    <servlet-name>CXFServlet</servlet-name>
+    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>CXFServlet</servlet-name>
+    <url-pattern>/restServices/*</url-pattern>
+  </servlet-mapping>
+
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+
+</web-app>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message