<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 
/*
 * Copyright 2001-2004 The Apache Software Foundation.
 * 
 * Licensed 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>Properties</title>
    <author email="dion@apache.org">dIon Gillard</author>
  </properties>

  <body>
    <section name="General Application Generation Settings">
      <p>
        In addition to the default property files read while processing a
        plugin, genapp uses on top a template specific property file.  This
        will be read after the plugin has found the template specified by
        the user.  Since all the property files share the same namespace
        you can define any of the properties below anywhere. But typically
        you will have properties specific for each template.
      </p>
      <table>
        <tr><th>Property</th><th>Description</th><th>Default</th></tr>
        <tr>
          <td>maven.genapp.filter</td>
          <td>
            Specifies the files (comma-separated list) that have to be copied
            into the new project after they have been filtered.  The filtering
            replaces placeholders with properties (see below).
          </td>
          <td>java,test</td>
        </tr>
        <tr>
          <td>maven.genapp.param</td>
          <td>
            Specifies the filter parameters (comma-separated list).  See
            filtering rules below and a descitpion of the default parameters.
          </td>
          <td>id,name,package,user</td>
        </tr>
        <tr>
          <td>maven.genapp.repackage</td>
          <td>
            Specifies the directories (comma-separated list) with files to
            build a Java package.  Genapp will copy the files into the new 
            project according the path rules for packages.  The package is
            defined with the property maven.genapp.template.package. The
			files are not only copied, but also filtered.
          </td>
          <td>project.xml</td>
        </tr>
        <tr>
          <td>maven.genapp.template</td>
          <td>
            Specifies the template to use when generating the application.
            If this property is not defined, the user will be prompted with
            the default value from property maven.genapp.default.template.
          </td>
          <td>default</td>
        </tr>
        <tr>
          <td>maven.genapp.template.dir</td>
          <td>
            Specifies the template directory to use when generating the application.
            Usually set based on the maven.template.repository and maven.genapp.template
            chosen.  Users can override this property in order to use a custom template
            directory.  meven.template.repository and maven.genapp.template will then go
            unused.  This can be useful for other plugins.
          </td>
          <td>n/a</td>
        </tr>
        <tr>
          <td>maven.genapp.template.repository</td>
          <td>
            Specifies a directory that has additional templates. If this property
            is not defined, the template will be searched in the local Maven directory
            or in the resources of the plugin itself.
          </td>
          <td>
            ${maven.home.local}/template
          </td>
        </tr>
      </table>
    </section>
    <section name="Application Generation Filter Settings">
      <p>
        Generating a project from a template a lot of parameters can be useful for the
        template depending on the organisation using them.  Genapp has some predefined
        parameters described in the table below.  Each parameter makes usage of some
        properties following a naming scheme and can be declared interactive i.e. the
        user generating an application from a template will be asked for the parameter's
        value.  The property maven.genapp.param declares all available parameters for
        the filtering.  During the project generation the filter uses the properties 
        that follow the naming scheme maven.genapp.template.&lt;param&gt;. It is always
        possible to overwrite these values.  The default value is always defined by a
        property named maven.genapp.default.&lt;param&gt;.  If the value should be
        enetered interactive, you can define the prompt with a property
        maven.genapp.prompt.&lt;param&gt;.  The filter itself is used copying the files
        defined by maven.genapp.repackage and maven.genapp.filter and will replace any
        occurrence of @&lt;PARAM&gt;@ in the files with the value of
        maven.genapp.template.&lt;param&gt;.
      </p>
      <table>
        <tr><th>Property</th><th>Description</th><th>Default</th><th>Prompted</th></tr>
        <tr>
          <td>maven.genapp.template.id</td>
          <td>
            Specifies the id of the application to be generated
            If this property is not defined, the user will be prompted.
          </td>
          <td>app</td>
          <td>Yes</td>
        </tr>
        <tr>
          <td>maven.genapp.template.name</td>
          <td>
            Specifies the name of the application to be generated
            If this property is not defined, the user will be prompted.
          </td>
          <td>Example Application</td>
          <td>Yes</td>
        </tr>
        <tr>
          <td>maven.genapp.template.package</td>
          <td>
            Specifies the name of the Java package that code will be
            generated for.
            If this property is not defined, the user will be prompted.
          </td>
          <td>example.app</td>
          <td>Yes</td>
        </tr>
        <tr>
          <td>maven.genapp.template.user</td>
          <td>
            Specifies the user's account name.
          </td>
          <td>${user.name}</td>
          <td>No</td>
        </tr>
      </table>
    </section>
  </body>
</document>
