You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/07/19 13:35:01 UTC

svn commit: r1611891 - /isis/site/trunk/content/contributors/recreating-an-archetype.md

Author: danhaywood
Date: Sat Jul 19 11:35:00 2014
New Revision: 1611891

URL: http://svn.apache.org/r1611891
Log:
updating docs

Modified:
    isis/site/trunk/content/contributors/recreating-an-archetype.md

Modified: isis/site/trunk/content/contributors/recreating-an-archetype.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/contributors/recreating-an-archetype.md?rev=1611891&r1=1611890&r2=1611891&view=diff
==============================================================================
--- isis/site/trunk/content/contributors/recreating-an-archetype.md (original)
+++ isis/site/trunk/content/contributors/recreating-an-archetype.md Sat Jul 19 11:35:00 2014
@@ -4,15 +4,19 @@ Isis archetypes are reverse engineered f
 
 ### Check the example app
 
-Switch to the directory containing the example application; this page uses `simpleapp`:
+Switch to the directory containing the example application.
+
+If recreating the *simpleapp* archetype:
 
     cd example/application/simpleapp
 
-Update the parent `pom.xml` to reference the *released* version of Isis core and the other components.  As of v1.6.0 this means:
+If recreating the *todoapp* archetype:
+
+    cd example/application/todoapp
 
-    vi example/application/simpleapp/pom.xml
-   
-and update the appropriate `<properties>`:
+Update the parent `pom.xml` to reference the *released* version of Isis core and the other components.  
+
+As of v1.6.0 this means updating the appropriate `<properties>`:
 
     <properties>
         <isis.version>1.6.0</isis.version>
@@ -39,10 +43,15 @@ first, as self-hosted webconsole (browse
     mvn clean install
     mvn antrun:run -P self-host
 
-then using mvn jetty plugin (browse to [http://localhost:8080/simpleapp-webapp/](http://localhost:8080/simpleapp-webapp/)) etc:
+then using mvn jetty plugin:
 
     cd webapp
     mvn jetty:run     
+
+If recreating the *simpleapp* archetype, browse to [http://localhost:8080/simpleapp-webapp/](http://localhost:8080/simpleapp-webapp/).
+    
+If recreating the *todoapp* archetype, browse to [http://localhost:8080/todoapp-webapp/](http://localhost:8080/todoapp-webapp/).
+
     
 Check the about page and confirm built against non-SNAPSHOT versions of the Isis jars.
 
@@ -70,14 +79,22 @@ Quickly check that the remaining files a
 
     /bin/find .
 
-Now we can create the archetype:
+Now we can create the archetype.
 
     mvn archetype:create-from-project
+
+and then update the generated files.  
+
+If recreating the *simpleapp* archetype:
+
     groovy ../../../scripts/updateGeneratedArchetypeSources.groovy -n simpleapp -v 1.2.3
 
+If recreating the *todoapp* archetype:
+
+    groovy ../../../scripts/updateGeneratedArchetypeSources.groovy -n todoapp -v 1.2.3
+
 where:
 
-- `simpleapp` is the name of the source application, and 
 - `1.2.3` is the version of isis core that is to be the parent of the generated archetype.
 
 ### Test the archetype
@@ -90,8 +107,10 @@ First, build the archetype:
 
 Then, *in a different session*, create a new app from the archetype:
 
-    mkdir /tmp/test
-    cd /tmp/test
+If recreating the *simpleapp* archetype:
+
+    mkdir /tmp/test-simpleapp
+    cd /tmp/test-simpleapp
     mvn archetype:generate  \
         -D archetypeCatalog=local \
         -D groupId=com.mycompany \
@@ -99,6 +118,17 @@ Then, *in a different session*, create a
         -D archetypeGroupId=org.apache.isis.archetype \
         -D archetypeArtifactId=simpleapp-archetype
 
+If recreating the *todoapp* archetype:
+
+    mkdir /tmp/test-todoapp
+    cd /tmp/test-todoapp
+    mvn archetype:generate  \
+        -D archetypeCatalog=local \
+        -D groupId=com.mycompany \
+        -D artifactId=myapp \
+        -D archetypeGroupId=org.apache.isis.archetype \
+        -D archetypeArtifactId=todoapp-archetype
+
 Build the newly generated app and test:
 
     cd myapp
@@ -109,29 +139,47 @@ Build the newly generated app and test:
 
 ### Check the archetype source code into git
 
-Back in the *original session* (at `example/application/simpleapp`), we are ready to check the archetype source code into git.
+Back in the *original session* (at `example/application/simpleapp` or `example/application/todoapp`), we are ready to check the archetype source code into git.
 
-If this is an update to an existing archetype:
+If recreating the *simpleapp* archetype:
 
     git rm -rf ../../archetype/simpleapp
     rm -rf ../../archetype/simpleapp
 
-Make sure that the `archetype/simpleapp` directory was fully removed, otherwise the next command will not copy the regenerated source into the correct location.
+If recreating the *todoapp* archetype:
+
+    git rm -rf ../../archetype/todoapp
+    rm -rf ../../archetype/todoapp
+
+In either case make sure that the `archetype/xxxapp` directory was fully removed, otherwise the next command will not copy the regenerated source into the correct location.
 
-Then, copy over the generated source of the archetype:
+Then, copy over the generated source of the archetype.
+
+If recreating the *simpleapp* archetype:
 
     mv target/generated-sources/archetype ../../archetype/simpleapp
     git add ../../archetype/simpleapp
 
+If recreating the *todoapp* archetype:
+
+    mv target/generated-sources/archetype ../../archetype/todoapp
+    git add ../../archetype/todoapp
+
 Next, confirm that the `-SNAPSHOT` version of the archetype is correct:
 
+If recreating the *simpleapp* archetype:
+
     vi ../../archetype/simpleapp/pom.xml
 
+If recreating the *todoapp* archetype:
+
+    vi ../../archetype/todoapp/pom.xml
+
 If this a new archetype, then add a reference to the archetype to the root `pom.xml`, eg:
 
     <modules>
         ...
-        <module>example/archetype/simpleapp</module>
+        <module>example/archetype/newapp</module>
         ...
     </modules>