Author: buildbot
Date: Wed Dec 26 14:14:44 2012
New Revision: 843899
Log:
Staging update by buildbot for openejb
Modified:
websites/staging/openejb/trunk/cgi-bin/ (props changed)
websites/staging/openejb/trunk/content/ (props changed)
websites/staging/openejb/trunk/content/tomee-mp-getting-started.html
Propchange: websites/staging/openejb/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Dec 26 14:14:44 2012
@@ -1 +1 @@
-1425659
+1425913
Propchange: websites/staging/openejb/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Dec 26 14:14:44 2012
@@ -1 +1 @@
-1425659
+1425913
Modified: websites/staging/openejb/trunk/content/tomee-mp-getting-started.html
==============================================================================
--- websites/staging/openejb/trunk/content/tomee-mp-getting-started.html
(original)
+++ websites/staging/openejb/trunk/content/tomee-mp-getting-started.html Wed
Dec 26 14:14:44 2012
@@ -147,7 +147,60 @@
</h1>
</div>
+<h1>Generating a TomEE-Project with Maven</h1>
+<p>TomEE provides a maven-archetype for generating a maven based project. This
template-project is preconfigured with <code>javaee-api</code> (scope provided)
and with the <code>tomee-maven-plugin</code> for starting the application with
TomEE.</p>
+
+<p>The current version of the archetype is '1.0.1'. So the needed command to
generate an application is:</p>
+
+<pre><code>mvn archetype:generate -DarchetypeGroupId=org.apache.openejb.maven
-DarchetypeArtifactId=tomee-wapp-archetype -DarchetypeVersion=1.0.1
+</code></pre>
+
+<p>The first time you run this command maven downloads the archetype and some
parts related to it. Afterwards you see a prompt which allows you to specify
the groupId, artifactId, version and package of your application.
+If you are using 'tomee' as groupId, 'tomee-demo' as artifactId, '1.0' as
version and 'myapp' as package, your console should show something like:</p>
+
+<pre><code>Define value for property 'groupId': : tomee
+Define value for property 'artifactId': : tomee-demo
+Define value for property 'version': 1.0-SNAPSHOT: : 1.0
+Define value for property 'package': tomee: : myapp
+Confirm properties configuration:
+groupId: tomee
+artifactId: tomee-demo
+version: 1.0
+package: myapp
+...
+[INFO] BUILD SUCCESS
+...
+</code></pre>
+
+<p>Afterwards you see a new folder with the name you used for the artifactId
(in the previous example 'tomee-demo').
+For starting the application you have to change the current directory to the
directory of the generated application:</p>
+
+<pre><code>cd tomee-demo
+</code></pre>
+
+<h1>Starting a TomEE-Project with Maven</h1>
+
+<p>With using the archetype everything you need is in place already. So you
just have to start TomEE with:</p>
+
+<pre><code>mvn package tomee:run
+</code></pre>
+
+<p>The first time you run this command takes a bit longer, because maven has
to download e.g. TomEE.
+Once those parts are downloaded, starting maven, deploying and starting the
generated application takes less than 10s (depending on your computer).</p>
+
+<h1>Accessing a started application</h1>
+
+<p>The application gets deployed to <code>target/apache-tomee/webapps</code>.
If everything worked correctly, you should see two directories ('tomee' and
'tomee-demo-1.0') as well as a web-archive ('tomee-demo-1.0.war').
+The mentioned directories are also the context-paths you can access. In our
example the generated application contains a servlet mapped to '/index'. So you
can access it via:</p>
+
+<pre><code>http://localhost:8080/[artifactId]-[version]/index
+</code></pre>
+
+<p>e.g.:</p>
+
+<pre><code>http://localhost:8080/tomee-demo-1.0/index
+</code></pre>