You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2014/03/06 17:33:50 UTC
svn commit: r900308 - in /websites/staging/isis/trunk: cgi-bin/ content/
content/contributors/recreating-an-archetype.html
Author: buildbot
Date: Thu Mar 6 16:33:50 2014
New Revision: 900308
Log:
Staging update by buildbot for isis
Modified:
websites/staging/isis/trunk/cgi-bin/ (props changed)
websites/staging/isis/trunk/content/ (props changed)
websites/staging/isis/trunk/content/contributors/recreating-an-archetype.html
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Mar 6 16:33:50 2014
@@ -1 +1 @@
-1574947
+1574952
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Mar 6 16:33:50 2014
@@ -1 +1 @@
-1574947
+1574952
Modified: websites/staging/isis/trunk/content/contributors/recreating-an-archetype.html
==============================================================================
--- websites/staging/isis/trunk/content/contributors/recreating-an-archetype.html (original)
+++ websites/staging/isis/trunk/content/contributors/recreating-an-archetype.html Thu Mar 6 16:33:50 2014
@@ -323,9 +323,8 @@
<p>Switch to the directory containing the example application; this page uses <code>quickstart_wicket_restful_jdo</code>:</p>
-<pre>
-cd example/application/quickstart_wicket_restful_jdo
-</pre>
+<pre><code>cd example/application/quickstart_wicket_restful_jdo
+</code></pre>
<p>Make sure that the app's <code>pom.xml</code>:</p>
@@ -334,21 +333,26 @@ cd example/application/quickstart_wicket
<li>references <em>released</em> versions of Isis core and the other components</li>
</ul>
-<p>Check for and fix any missing license header notices:</p>
+<p>It's probably easiest to load up each <code>pom.xml</code> and inspect manually:</p>
-<pre>
-mvn org.apache.rat:apache-rat-plugin:check -D rat.numUnapprovedLicenses=50 -o
+<pre><code>vi `/bin/find . -name pom.xml | grep -v target`
+</code></pre>
+
+<p>... and search for <code>SNAPSHOT</code>.</p>
+
+<p>Next, check for and fix any missing license header notices:</p>
+
+<pre><code>mvn org.apache.rat:apache-rat-plugin:check -D rat.numUnapprovedLicenses=50 -o
for a in `/bin/find . -name rat.txt -print`; do grep '!???' $a; done
-</pre>
+</code></pre>
<p>Finally, double check that the app is running satisfactorily:</p>
-<pre>
-mvn clean install
+<pre><code>mvn clean install
mvn antrun:run # runs as standalone app using webconsole
cd webapp
mvn jetty:run # runs as mvn jetty plugin
-</pre>
+</code></pre>
<h3>Create the archetype</h3>
@@ -356,30 +360,26 @@ mvn jetty:run # runs as mvn jetty p
<p>Start by doing the regular <code>mvn clean</code>:</p>
-<pre>
-mvn clean
-</pre>
+<pre><code>mvn clean
+</code></pre>
<p>To view the remaining files/directories that needs removing, use:</p>
-<pre>
-for a in .project .classpath .settings bin target-ide; do /bin/find . -name $a -print; done
+<pre><code>for a in .project .classpath .settings bin target-ide; do /bin/find . -name $a -print; done
/bin/find . -name "*.log" -print
-</pre>
+</code></pre>
<p>To actually delete these files, use:</p>
-<pre>
-for a in .project .classpath .settings bin target-ide; do /bin/find . -name $a -exec rm -r {} \;; done
+<pre><code>for a in .project .classpath .settings bin target-ide; do /bin/find . -name $a -exec rm -r {} \;; done
/bin/find . -name "*.log" -exec rm {} \;
-</pre>
+</code></pre>
<p>Now we can create the archetype:</p>
-<pre>
-mvn archetype:create-from-project
+<pre><code>mvn archetype:create-from-project
groovy ../../../scripts/updateGeneratedArchetypeSources.groovy -n quickstart -v 1.2.3
-</pre>
+</code></pre>
<p>where:</p>
@@ -392,16 +392,14 @@ groovy ../../../scripts/updateGeneratedA
<p>First, build the archetype:</p>
-<pre>
-cd target/generated-sources/archetype
+<pre><code>cd target/generated-sources/archetype
mvn clean install
cd ../../..
-</pre>
+</code></pre>
<p>Then, <em>in a different session</em>, create a new app from the archetype:</p>
-<pre>
-mkdir /tmp/test
+<pre><code>mkdir /tmp/test
cd /tmp/test
mvn archetype:generate \
-D archetypeCatalog=local \
@@ -409,17 +407,16 @@ mvn archetype:generate \
-D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype \
-D groupId=com.mycompany \
-D artifactId=myapp
-</pre>
+</code></pre>
<p>Build the newly generated app and test:</p>
-<pre>
-cd myapp
+<pre><code>cd myapp
mvn clean install
mvn antrun:run # runs as standalone app using webconsole
cd webapp
mvn jetty:run # runs as mvn jetty plugin
-</pre>
+</code></pre>
<h3>Check the archetype source code into git</h3>
@@ -427,42 +424,37 @@ mvn jetty:run # runs as mvn jetty p
<p>If this is an update to an existing archetype:</p>
-<pre>
-git rm -rf ../../archetype/quickstart_wicket_restful_jdo
+<pre><code>git rm -rf ../../archetype/quickstart_wicket_restful_jdo
rm -rf ../../archetype/quickstart_wicket_restful_jdo
-</pre>
+</code></pre>
<p>Make sure that the <code>archetype/quickstart_wicket_restful_jdo</code> directory was fully removed, otherwise the next command will not copy the regenerated source into the correct location.</p>
<p>Then, copy over the generated source of the archetype:</p>
-<pre>
-cp -r target/generated-sources/archetype \
+<pre><code>cp -r target/generated-sources/archetype \
../../archetype/quickstart_wicket_restful_jdo
git add ../../archetype/quickstart_wicket_restful_jdo
-</pre>
+</code></pre>
<p>Next, confirm that the <code>-SNAPSHOT</code> version of the archetype is correct:</p>
-<pre>
-vi ../../archetype/quickstart_wicket_restful_jdo/pom.xml
-</pre>
+<pre><code>vi ../../archetype/quickstart_wicket_restful_jdo/pom.xml
+</code></pre>
<p>If this a new archetype, then add a reference to the archetype to the root <code>pom.xml</code>, eg:</p>
-<pre>
-<modules>
+<pre><code><modules>
...
<module>example/archetype/quickstart</module>
...
</modules>
-</pre>
+</code></pre>
<p>Finally, commit the changes:</p>
-<pre>
-git commit -am "ISIS-nnn: updating archetype"
-</pre>
+<pre><code>git commit -am "ISIS-nnn: updating archetype"
+</code></pre>
<h3>Setting up Eclipse IDE</h3>
@@ -474,11 +466,10 @@ git commit -am "ISIS-nnn: updating arche
<p>The procedure for releasing the archetype is the same as for any other releasable module; in essence:</p>
-<pre>
-cd example/archetype/quickstart_wicket_restful_jdo
+<pre><code>cd example/archetype/quickstart_wicket_restful_jdo
mvn release:prepare -P apache-release
mvn release:perform -P apache-release
-</pre>
+</code></pre>
<p>See the <a href="release-process.html">release process</a> for full details.</p>