Author: tmjee
Date: Sun Sep  3 20:10:56 2006
New Revision: 439912

URL: http://svn.apache.org/viewvc?view=rev&rev=439912
Log:
- fixed situation where -DgroupId=xxx doesn't generate the java files in the 
correct package directory
- changed archetype pom.xml <packaging>...</packaging> from "jar" to 
"maven-plugin"
- make /META-INF/archetype.xml id same as this archetype artifactId 
(struts2-archetype-starter)
- added some missed out resource to archetype.xml
- PROBLEM: the generated resource eg. HelloWorldAction-validation.xml doesn't 
honour -DgroupId argument passed in, due to maven archetype doesn't provide a 
way for this to happened. I guess one will have to manually rename the package 
of those resource if necessary.

Modified:
    struts/maven/trunk/struts2-archetype-starter/README.txt
    struts/maven/trunk/struts2-archetype-starter/pom.xml
    
struts/maven/trunk/struts2-archetype-starter/src/main/resources/META-INF/archetype.xml

Modified: struts/maven/trunk/struts2-archetype-starter/README.txt
URL: 
http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-starter/README.txt?view=diff&rev=439912&r1=439911&r2=439912
==============================================================================
--- struts/maven/trunk/struts2-archetype-starter/README.txt (original)
+++ struts/maven/trunk/struts2-archetype-starter/README.txt Sun Sep  3 20:10:56 
2006
@@ -21,7 +21,7 @@
   
      cd /home/tmjee/projects
   
-- run the following command to generate the sample web app templatem, assuming 
:-
+- run the following command to generate the sample web app template, assuming 
:-
     - root java package -> com.myCompany.mySystem
 
     - the webapp war name   ->  myWebApp
@@ -34,7 +34,20 @@
                        -DarchetypeVersion=2.0.0-SNAPSHOT \
                        
-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
 
-THis will create the sample Web app template
+- The generated template is a runnable webapp, some package renaming is 
necessary if 
+the Struts2 validation, conversion features is to work. In the case above, one 
would
+need to rename the resources under 
+
+src/main/resource/com/myComp/myApp/* 
+
+to
+
+src/main/resource/com/myCompany/mySystem/*
+
+This is due to the fact that I can't find a way to change maven archetype 
resource 
+path dynamically. If anyone knows how kindly let me know 
(tm_jee(at)yahoo.co.uk). 
+Tia 
+
 
 - to compile, execute
   mvn compile

Modified: struts/maven/trunk/struts2-archetype-starter/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-starter/pom.xml?view=diff&rev=439912&r1=439911&r2=439912
==============================================================================
--- struts/maven/trunk/struts2-archetype-starter/pom.xml (original)
+++ struts/maven/trunk/struts2-archetype-starter/pom.xml Sun Sep  3 20:10:56 
2006
@@ -10,7 +10,7 @@
   <modelVersion>4.0.0</modelVersion>
   <artifactId>struts2-archetype-starter</artifactId>
   <version>2.0.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
+  <packaging>maven-plugin</packaging>
   <name>Struts 2 Archetypes - Starter</name>
 
 </project>

Modified: 
struts/maven/trunk/struts2-archetype-starter/src/main/resources/META-INF/archetype.xml
URL: 
http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-starter/src/main/resources/META-INF/archetype.xml?view=diff&rev=439912&r1=439911&r2=439912
==============================================================================
--- 
struts/maven/trunk/struts2-archetype-starter/src/main/resources/META-INF/archetype.xml
 (original)
+++ 
struts/maven/trunk/struts2-archetype-starter/src/main/resources/META-INF/archetype.xml
 Sun Sep  3 20:10:56 2006
@@ -1,16 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <archetype>
-  <id>starter</id>
+  <id>struts2-archetype-starter</id>
   <sources>
-    <source>src/main/java/com/myComp/myApp/HelloWorldAction.java</source>
-    <source>src/main/java/com/myComp/myApp/IndexAction.java</source>
-    <source>src/main/java/com/myComp/myApp/DateConverter.java</source>
+    <source>src/main/java/HelloWorldAction.java</source>
+    <source>src/main/java/IndexAction.java</source>
+    <source>src/main/java/DateConverter.java</source>
   </sources>
   <resources>
        
<resource>src/main/resources/com/myComp/myApp/HelloWorldAction-validation.xml</resource>
        
<resource>src/main/resources/com/myComp/myApp/HelloWorldAction-helloWorld-validation.xml</resource>
        
<resource>src/main/resources/com/myComp/myApp/IndexAction-conversion.properties</resource>
+       
<resource>src/main/resources/com/myComp/myApp/IndexAction.properties</resource>
+       
<resource>src/main/resources/com/myComp/myApp/package.properties</resource>
        <resource>src/main/resources/struts.xml</resource>
        <resource>src/main/resources/xwork-conversion.properties</resource>
        <resource>src/main/resources/struts.properties</resource>
@@ -41,8 +43,8 @@
        <resource>src/main/webapp/index.jsp</resource>          
   </resources>
   <testSources>
-    <source>src/test/java/com/myComp/myApp/HelloWorldActionTest.java</source>
-    <source>src/test/java/com/myComp/myApp/IndexActionTest.java</source>
+    <source>src/test/java/HelloWorldActionTest.java</source>
+    <source>src/test/java/IndexActionTest.java</source>
   </testSources>
   <testResources>
        
<resource>src/test/resources/com/myComp/myApp/HelloWorldActionTest.properties</resource>


Reply via email to