You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ol...@apache.org on 2012/01/11 14:39:48 UTC

svn commit: r1230026 - in /tomcat/maven-plugin/trunk/tomcat-maven-archetype: ./ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/test-api-impl/ src/main/resources/archetype-resources/test...

Author: olamy
Date: Wed Jan 11 13:39:47 2012
New Revision: 1230026

URL: http://svn.apache.org/viewvc?rev=1230026&view=rev
Log:
fix some properties, configure archetype plugin to run it test on an archetype sample

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/main/resources/archetype-resources/test-api-impl/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/src/main/resources/META-INF/spring-context.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/pom.xml
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/src/main/webapp/WEB-INF/web.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=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/pom.xml Wed Jan 11 13:39:47 2012
@@ -83,5 +83,18 @@
         </plugin>
       </plugins>
     </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-archetype-plugin</artifactId>
+        <version>${archetypeVersion}</version>
+        <configuration>
+          <settingsFile>${basedir}/src/test/test-settings.xml</settingsFile>
+          <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+        </configuration>
+      </plugin>
+    </plugins>
+
   </build>
 </project>

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=1230026&r1=1230025&r2=1230026&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 Wed Jan 11 13:39:47 2012
@@ -20,11 +20,34 @@
 <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.foo</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="artifactId">
+      <defaultValue>basic</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="version">
+      <defaultValue>1.0-SNAPSHOT</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="rootArtifactId">
+      <defaultValue>basic</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>
+  </requiredProperties>
   <fileSets>
     <fileSet encoding="UTF-8">
       <directory></directory>
       <includes>
-        <include>tomcat-archetype.iml</include>
+        <include>pom.xml</include>
       </includes>
     </fileSet>
   </fileSets>
@@ -37,12 +60,6 @@
             <include>**/*.java</include>
           </includes>
         </fileSet>
-        <fileSet encoding="UTF-8">
-          <directory></directory>
-          <includes>
-            <include>test-api.iml</include>
-          </includes>
-        </fileSet>
       </fileSets>
     </module>
     <module id="test-api-impl" dir="test-api-impl" name="test-api-impl">
@@ -59,12 +76,6 @@
             <include>**/*.xml</include>
           </includes>
         </fileSet>
-        <fileSet encoding="UTF-8">
-          <directory></directory>
-          <includes>
-            <include>test-api-impl.iml</include>
-          </includes>
-        </fileSet>
       </fileSets>
     </module>
     <module id="test-webapp" dir="test-webapp" name="test-webapp">
@@ -89,12 +100,6 @@
             <include>**/*.java</include>
           </includes>
         </fileSet>
-        <fileSet encoding="UTF-8">
-          <directory></directory>
-          <includes>
-            <include>test-webapp.iml</include>
-          </includes>
-        </fileSet>
       </fileSets>
     </module>
   </modules>

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml Wed Jan 11 13:39:47 2012
@@ -22,7 +22,7 @@
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
+  <artifactId>${rootArtifactId}</artifactId>
   <version>${version}</version>
   <packaging>pom</packaging>
 
@@ -60,13 +60,13 @@
   <dependencyManagement>
     <dependencies>
       <dependency>
-        <groupId>org.apache.tomcat.maven.archetype</groupId>
-        <artifactId>test-api</artifactId>
+        <groupId>${groupId}</groupId>
+        <artifactId>${artifactId-api}</artifactId>
         <version>${project.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.apache.tomcat.maven.archetype</groupId>
-        <artifactId>test-api-impl</artifactId>
+        <groupId>${groupId}</groupId>
+        <artifactId>${artifactId-api-impl}</artifactId>
         <version>${project.version}</version>
       </dependency>
       <dependency>

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/pom.xml?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/pom.xml Wed Jan 11 13:39:47 2012
@@ -26,15 +26,15 @@
     <version>${version}</version>
   </parent>
 
-  <artifactId>${artifactId}</artifactId>
+  <artifactId>${artifactId-api-impl}</artifactId>
 
   <name>test-api-impl</name>
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.tomcat.maven.archetype</groupId>
-      <artifactId>test-api</artifactId>
-    </dependency>
+       <groupId>${groupId}</groupId>
+       <artifactId>${artifactId-api}</artifactId>
+     </dependency>
     <dependency>
       <groupId>javax.ws.rs</groupId>
       <artifactId>jsr311-api</artifactId>

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-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/test-api-impl/src/main/resources/META-INF/spring-context.xml?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/src/main/resources/META-INF/spring-context.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api-impl/src/main/resources/META-INF/spring-context.xml Wed Jan 11 13:39:47 2012
@@ -40,7 +40,7 @@
 
   <context:annotation-config />
   <context:component-scan
-    base-package="${package}.tomcat.api.impl"/>
+    base-package="${package}"/>
 
   <jaxrs:server id="testServices" address="/testServices">
 

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api/pom.xml?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-api/pom.xml Wed Jan 11 13:39:47 2012
@@ -26,7 +26,7 @@
     <version>${version}</version>
   </parent>
 
-  <artifactId>${artifactId}</artifactId>
+  <artifactId>${artifactId-api}</artifactId>
 
   <name>test-api</name>
 

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/pom.xml?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/pom.xml Wed Jan 11 13:39:47 2012
@@ -26,7 +26,7 @@
     <version>${version}</version>
   </parent>
 
-  <artifactId>${artifactId}</artifactId>
+  <artifactId>${artifactId-webapp}</artifactId>
   <packaging>war</packaging>
 
   <properties>
@@ -127,7 +127,7 @@
               <path>/</path>
               <port>${tomcat.port}</port>
               <uriEncoding>UTF-8</uriEncoding>
-              <warDirectory>target/test-webapp-${project.version}</warDirectory>
+              <warDirectory>target/${artifactId-webapp}-${project.version}</warDirectory>
               <fork>true</fork>
             </configuration>
           </execution>
@@ -162,13 +162,15 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.tomcat.maven.archetype</groupId>
-      <artifactId>test-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat.maven.archetype</groupId>
-      <artifactId>test-api-impl</artifactId>
-    </dependency>
+       <groupId>${groupId}</groupId>
+       <artifactId>${artifactId-api}</artifactId>
+       <version>${project.version}</version>
+     </dependency>
+    <dependency>
+       <groupId>${groupId}</groupId>
+       <artifactId>${artifactId-api}</artifactId>
+       <version>${project.version}</version>
+     </dependency>
     <dependency>
       <groupId>javax.ws.rs</groupId>
       <artifactId>jsr311-api</artifactId>
@@ -216,6 +218,11 @@
       </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>

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-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/test-webapp/src/main/webapp/WEB-INF/web.xml?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/test-webapp/src/main/webapp/WEB-INF/web.xml Wed Jan 11 13:39:47 2012
@@ -51,7 +51,7 @@
   </servlet-mapping>
 
   <welcome-file-list>
-    <welcome-file>index.jsp</welcome-file>
+    <welcome-file>index.html</welcome-file>
   </welcome-file-list>
 
 </web-app>

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/archetype.properties
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/archetype.properties?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/archetype.properties (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/archetype.properties Wed Jan 11 13:39:47 2012
@@ -1,4 +1,9 @@
-package=it.pkg
+package=org.apache.tomcat.maven.archetype.it.pkg
 version=0.1-SNAPSHOT
-groupId=archetype.it
+groupId=org.apache.tomcat.maven.archetype.archetype.it
 artifactId=basic
+artifactId-api=basic-api
+artifactId-api-impl=basic-api-impl
+artifactId-webapp=basic-webapp
+rootArtifactId=basic
+

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/goal.txt
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/goal.txt?rev=1230026&r1=1230025&r2=1230026&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/goal.txt (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/test/resources/projects/basic/goal.txt Wed Jan 11 13:39:47 2012
@@ -0,0 +1 @@
+clean,verify
\ No newline at end of file



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