extensions/maven-plugin/xdocs/tree.xml (263 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>Directory tree reference</title>
<author email="hps@intermeta.de">Henning P. Schmiedehausen</author>
</properties>
<body>
<section name="Development tree">
<p>
The actual tree layout is different in each M.E.T.A. <a href="modes.html">Mode</a>.
</p>
<table>
<tr>
<th>normal Mode</th>
<th>inplace Mode</th>
<th>Skip Property</th>
<th>Function</th>
<th>Description</th>
</tr>
<a name="conf"/>
<tr>
<td>conf</td>
<td>WEB-INF/conf</td>
<td>turbine.plugin.config.skip</td>
<td>Configuration data for your web application</td>
<td>This directory contains all the configuration files for your
application. All files in this directory with the exception of
<appname>-web.xml and commons-logging.properties are copied to
the <code>WEB-INF/conf</code> location of your application.<br/> The
<appname>-web.xml file will be copied to
<code>WEB-INF/web.xml</code> and the commons-logging.properties file
will be put into the <code>WEB-INF/classes</code> directory.
</td>
</tr>
<a name="src_images"/>
<tr>
<td>src/images</td>
<td>images</td>
<td>turbine.plugin.images.skip</td>
<td>Graphics and Images for your application</td>
<td>All files in this directory will be copied to the <code>images</code>
subdirectory in the root of your application. The plugin creates two image
files where, which are referenced from the sample default screen</td>
</tr>
<tr>
<td>src/java</td>
<td>WEB-INF/src</td>
<td>-</td>
<td>Java source files</td>
<td>All files ending on .java in this directory tree get compiled by the
java compile into class files. All other files get copied as is into the
<code>WEB-INF/classes</code> tree</td>
</tr>
<a name="src_resources"/>
<tr>
<td>src/resources</td>
<td>resources</td>
<td>turbine.plugin.resources.skip</td>
<td>Misc. Turbine resource files</td>
<td>All files in this directory will be copied to the <code>resources</code>
subdirectory in the root of your application.</td>
</tr>
<a name="src_pages"/>
<tr>
<td>src/pages</td>
<td>.</td>
<td>turbine.plugin.pages.skip</td>
<td>HTML pages</td>
<td>All files in this directory will be copied to the root directory of your application.</td>
</tr>
<a name="src_scripts"/>
<tr>
<td>src/scripts</td>
<td>scripts</td>
<td>turbine.plugin.scripts.skip</td>
<td>JavaScript files for your application</td>
<td>All files in this directory will be copied to the <code>scripts</code>
subdirectory in the root of your application.</td>
</tr>
<tr>
<td>src/schema</td>
<td>src/schema</td>
<td>-</td>
<td>XML source files for Torque</td>
<td>This directory contains the definition files for generating the
peer and object classes for Torque and also DTD and data files to
populate the tables. See the <a href="schema.html">Default
schema files description</a> for details.</td>
</tr>
<a name="src_style"/>
<tr>
<td>src/style</td>
<td>style</td>
<td>turbine.plugin.style.skip</td>
<td>Cascading style sheet files for your application</td>
<td>All files in this directory will be copied to the <code>style</code>
subdirectory in the root of your application.</td>
</tr>
<a name="src_templates"/>
<tr>
<td>src/templates/layouts</td>
<td>templates/layouts</td>
<td>turbine.plugin.templates.skip</td>
<td>Layout templates for your application</td>
<td>The templates in this directory are used to position screens and
navigations on a reponse page. The M.E.T.A. plugin adds a default layout
page here which just returns the current screen. If you want to use
navigation elements with your application, you must either add your
own custom layout pages or change the default layout to contain
navigation elements. See the <a
href="http://turbine.apache.org/turbine/turbine-2.3.1/howto/velocityonlylayout-howto.html">Velocity
Only Layout</a> documentation for an example with navigation.</td>
</tr>
<tr>
<td>src/templates/macros</td>
<td>templates/macros</td>
<td>turbine.plugin.templates.skip</td>
<td>VelociMacros for your application</td>
<td>Files in this directory should be loaded by the Velocity Service
to be used as <a
href="http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacros">VelociMacros</a>.
There is a dummy file called <appname>Macros.vm which you should use, because it is correctly configured in
TurbineResources.properties to load at Turbine startup time.</td>
</tr>
<tr>
<td>src/templates/navigations</td>
<td>templates/navigations</td>
<td>turbine.plugin.templates.skip</td>
<td>Navigation templates for your application</td>
<td>Put your navigation templates here. If you want to use navigation,
you need layouts that reference these files. The default configuration
of a M.E.T.A.-generated Turbine application does not use navigation.</td>
</tr>
<tr>
<td>src/templates/screens</td>
<td>templates/screens</td>
<td>turbine.plugin.templates.skip</td>
<td>Screen templates for your application</td>
<td>Put your screen templates to be rendered as output of your application into this
subdirectory. M.E.T.A. creates a sample index screen, which is displayed when you
deploy the application without changing this page.</td>
</tr>
<tr>
<td>src/test/</td>
<td>WEB-INF/test/</td>
<td>-</td>
<td>Java test code</td>
<td>Maven expects java classes that contain unit tests in this
directory tree. All tests are run after compilation to ensure the
correct function of your application. See the <a
href="http://maven.apache.org/maven-1.x/reference/plugins/test/">Maven test
plugin</a> for further information.</td>
</tr>
<tr>
<a name="web_inf_lib"/>
<td><font color="red">Deployment is used</font></td>
<td>WEB-INF/lib</td>
<td>-</td>
<td>libs directory</td>
<td>All jar files in the project.xml file of your application, that
have the <code>war.bundle</code> property set to true will be copied
into this directory.</td>
</tr>
<tr>
<td><font color="red">Deployment is used</font></td>
<td>WEB-INF/classes</td>
<td>-</td>
<td>classes directory</td>
<td>All class files and all non-java files from the source tree are
copied into this sub directory. This is defined in the <a href="http://java.sun.com/products/servlet/docs.html">Sun Servlet API</a>.</td>
</tr>
<tr>
<a name="logs"/>
<td><font color="red">Deployment is used</font></td>
<td>logs</td>
<td>-</td>
<td>Log files</td>
<td>A M.E.T.A. generated application writes logfiles for debugging and runtime diagnosis. These files are put here.</td>
</tr>
</table>
</section>
<section name="Deployment tree">
<p>
This is the layout of a compiled M.E.T.A. application in the web container when
deployed to a web container. This applies only to modes where deployment is used,
not to inplace development modes.
</p>
<table>
<tr>
<th>Path</th>
<th>Function</th>
<th>Description</th>
</tr>
<tr>
<td>WEB-INF/lib</td>
<td>libs directory</td>
<td>All jar files in the project.xml file of your application, that
have the <code>war.bundle</code> property set to true will be copied
into this directory.</td>
</tr>
<tr>
<td>WEB-INF/conf</td>
<td>Configuration directory</td>
<td>This is the target directory for the files from the <a
href="#conf">configuration directory in the source tree</a></td>
</tr>
<tr>
<td>WEB-INF/classes</td>
<td>classes directory</td>
<td>All class files and all non-java files from the source tree are
copied into this sub directory. This is defined in the <a href="http://java.sun.com/products/servlet/docs.html">Sun Servlet API</a>.</td>
</tr>
<tr>
<a name="logs"/>
<td>logs</td>
<td>Log files</td>
<td>A M.E.T.A. generated application writes logfiles for debugging and runtime diagnosis. These files are put here.</td>
</tr>
<tr>
<td>templates</td>
<td>Application template files</td>
<td>This is the target directory for the files from the <a
href="#src_templates">templates directories in the source tree</a></td>
</tr>
<tr>
<td>scripts</td>
<td>JavaScript files for your application</td>
<td>This is the target directory for the files from the <a
href="#src_scripts">scripts directory in the source tree</a></td>
</tr>
<tr>
<td>style</td>
<td>Cascading style sheet files for your application</td>
<td>This is the target directory for the files from the <a
href="#src_style">style directory in the source tree</a></td>
</tr>
<tr>
<td>images</td>
<td>Graphics and Images for your application</td>
<td>This is the target directory for the files from the <a
href="#src_images">images directory in the source tree</a></td>
</tr>
</table>
</section>
<section name="Skipping parts of the deployment">
<p>
When writing an application using this plugin, it is sometimes
necessary to skip parts of the deployment process.
The M.E.T.A. plugin allows you to skip parts of the
deployment by using <a href="properties.html#skip_properties">skip
properties</a>.
</p>
<p>You can run your custom deployment or web application generation by
using a <code>postGoal</code> to the <a
href="goals.html#turbine_deploy">turbine:deploy</a> or <a
href="goals.html#turbine_war">turbine:war</a> goal. In a <a
href="goals.html#turbine_deploy">turbine:deploy</a> postGoal you can
access the <a href="properties.html#turbine_target_dir">turbine.target.dir</a> property as the deployment
location of your application.
</p>
</section>
</body>
</document>