There is more than just one version of Turbine. You might have to build one application using a released version of Turbine (currently 2.3.2) and the next should use a developer version or even a "bleeding edge" snapshot release of the Turbine code. Whatever you want to use, the M.E.T.A. plugin helps you selecting the right skeleton for your code.
The default flavor for a new application in ad hoc setup mode is the current stable Turbine release ("turbine-2.3.2"). If you want to use a different flavor, you must either supply it on the command line or in your setup.properties file.
Generate a Turbine 2.3 skeleton: maven -Dturbine.app.name=<application name> -Dturbine.app.flavor=turbine-2.3 turbine:setup
This is a section for advanced users that are reasonably familiar with maven and the Turbine framework. If you're just starting to use Turbine and M.E.T.A., you can skip this section.
Flavors are built from templates in the flavor
subdirectory of the M.E.T.A. plugin. If you want to add a new flavor, you
must modify the plugin source and then rebuild and deploy the plugin
to your maven installation.
The plugin source contains a subdirectory
src/plugin-resources/flavor
. Here are the setup files for
each flavor stored, that are used by the turbine:setup goal. Each flavor
has its own subdirectory which can in turn contain the following
directories:
Path | Description |
---|---|
maven | Files for the application setup. |
conf | Turbine configuration file. |
schema | Schema files for Application and Security OM classes. |
templates | Default templates for your application. |
images | Images to be copied into your application. |
resources | General resources needed for your application. |
pages | Other files, e.g. HTML pages, that should be put into your application root. |
props | Files that should go in the application classpath (the
WEB-INF/classes directory). e.g. the
commons-logging.properties that can be used with
Turbine 2.3.1 and beyond.
|
common
which contains
files that are the same for all flavors.
turbine:setup copies all the
files from the common
directory into the new application
skeleton and then the files from the respective flavor
directory. Files from the latter will overwrite files from the
common
tree.
Subdirectories can be omitted if there are no flavor specific files.
To add a new flavor, you must add at least a flavor specific maven
subdirectory as flavor/<your flavor name>/maven
which contains the
template for the maven POM (project.xml
).
The tricky part of setting up a new flavor happens when you do
not need a file from the common
directory for your
new flavor. In that case, you must copy this file from the common
sub-tree into all other flavors and then remove it from there.