extensions/maven-plugin/xdocs/getting_started.xml (96 lines of code) (raw):
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<document>
<properties>
<title>Getting started</title>
<author email="hps@intermeta.de">Henning P. Schmiedehausen</author>
</properties>
<body>
<section name="Getting started">
<subsection name="Prepare your build.properties">
<p>
M.E.T.A can install your application into a servlet container, if you
supply its location (If you're writing web applications with maven,
this is a good idea anyway). To do so, add the following line to your
personal <code>build.properties</code> file which is normally located
in your home directory.
<source><![CDATA[
For Unix:
maven.appserver.home = /opt/jakarta-tomcat-5.0.24
For Windows:
maven.appserver.home = C:/Program Files/Apache Software Foundation/Tomcat-5.0.24
]]></source>
<font color="red">
<ul>
<li>Please make sure that you do not append the <code>webapp</code> subdirectory. This property should contain the root of your application server!</li>
<li>If you are using Windows, you must still use the slash ("/"), not the backslash for the directory paths!</li>
</ul>
</font>
</p>
</subsection>
<subsection name="Hello World">
<p>
<a href="http://www.ultimatequeen.co.uk/Songs/killers.htm#letme">Hello everybody. Feeling good? Are you ready to rock? Are you ready to roll? OK, let's do it.</a><br/>
Enter the following command:
</p>
<a name="singlecommand" />
<source><![CDATA[
maven -Dturbine.app.name=helloworld turbine:setup
]]></source>
<p>
This produces some maven output and creates a
subdirectory in your current directory called
"helloworld". It should have a directory structure like
this:</p>
<source><![CDATA[
helloworld
|-- conf
`-- src
|-- images
|-- java
| `-- org
| `-- apache
| `-- turbine
| `-- app
| `-- helloworld
| `-- modules
| |-- actions
| |-- layouts
| |-- navigations
| |-- pages
| `-- screens
|-- pages
|-- resources
|-- schema
|-- scripts
|-- style
|-- templates
| |-- layouts
| |-- macros
| |-- navigations
| `-- screens
`-- test
]]></source>
<p>
M.E.T.A. has set up the skeleton of your application. It even
contains a welcome page to show you that everything is fine.</p>
<p>
<font color="red">Enter the <code>helloworld</code> directory</font>.<br/>
Compile and deploy the application to your web container:
<source><![CDATA[
maven turbine:deploy
]]></source>
Restart your web container or force it to reload its applications.<br/>
Point your browser to the deployed application (if you use <a href="http://tomcat.apache.org/">Tomcat</a>
running on your local machine, this would be
<a href="http://localhost:8080/helloworld/">http://localhost:8080/helloworld/</a>).</p>
<p>The result should look like this:
<center><img src="images/helloworld.png" width="722" height="525"/><br/></center>
</p>
<p>
You have successfully installed and run your very first Turbine
application! The gory details about the M.E.T.A. plugin are found on the
<a href="using_meta.html">Using M.E.T.A.</a> page.</p>
</subsection>
</section>
</body>
</document>