Configuration files

M.E.T.A. generates a few configuration files for your application. These work well for a simple application without security and just a few data sources.

All configuration files, unless stated explicitly otherwise, get deleted and recreated if you re-run turbine:setup. So be careful!

Maven specific configuration files

M.E.T.A. generates and uses the following configuration files in the root directory of your application tree.

If you run the turbine:setup goal and no setup.properties file exists in it, a new file is created with all parameters copied in. An existing setup.properties file is never clobbered!

Name Function Description
setup.properties M.E.T.A. configuration Whenever you run the turbine:setup goal, this file is read and used to generate all other configuration files. It should contain the Setup Properties for generating you application skeleton.
build.properties Application configuration This file is intended to customize your application for a specific installation.
project.properties Application configuration This file is intended to configure your application. It should contain the properties that are the same for all installations.
maven.xml Maven build file This file contains the callbacks from other maven goals into M.E.T.A. If you need to customize your build process, you can add custom goals or callbacks in this file.
project.xml Maven POM file This file contains the maven-specific Project descriptor.

Application specific configuration files

M.E.T.A. generates the following configuration files for your application. These location of these files differ in the various application development modes.

Name and Location in normal Mode name and Location in inplace Mode Function Description
conf/<appname>.properties WEB-INF/conf/<appname>.properties Turbine configuration This file gets included by the TurbineResources.properties file when Turbine is configured.
conf/<appname>-web.xml WEB-INF/web.xml Deployment descriptor This is the deployment descriptor for your application. In Normal mode, it gets copied to WEB-INF/web.xml in your application.
conf/<appname>-intake.xml WEB-INF/conf/<appname>-intake.xml IntakeService This file should contain your intake group definitions.

TurbineResource.properties

This is the main configuration file for Tubine. It contains all the settings for the turbine core. The M.E.T.A. configuration has the following settings which might bite you when you build an application. It is necessary that you review the settings in this file and customize them to match your application needs!

This list is not complete. The full list can be reviewed in the TurbineResources.properties file itself.

Setting Value Description
module.packages org.apache.turbine.modules Contains only the internal package and not the application package. This is loaded from the <appname>.properties file. Unlike normal properties files, Turbine uses ExtendedProperties from Jakarta Commons Configuration which merge together (normal Properties would overwrite, so this might be confusing to newcomers). If you add your own packages to your application tree, do it in <appname>.properties.
action.sessionvalidator sessionvalidator.TemplateSessionValidator A M.E.T.A.-generated application does not use security by default! If you need security, you must change this to sessionvalidator.TemplateSecureSessionValidator.
services.* The default configuration does not activate all the Turbine-supplied services! E.g. the Scheduler is not activated by default. If you need additional services, you must add them to your configuration file. M.E.T.A. activates the following services:

  • AvalonComponentService
  • CryptoService
  • FactoryService
  • PoolService
  • RunDataService
  • ServletService
  • AssemblerBrokerService
  • GlobalCacheService
  • SecurityService
  • PullService
  • IntakeService
  • TemplateService
  • VelocityService
  • UploadService
tool.content.want.relative

tool.link.want.relative
true The tools generate relative links to avoid problems with some web containers. If you need absolute links, you must change these settings.
services.VelocityService.default.screen VelocityScreen Use a screen class that does no security checks as default.
services.VelocityService.velocimacro.library.autoreload true Good for debugging, bad for production. If your macro files no longer change, set this to false.
services.IntakeService.serialize.path none Don't serialize the intake XML files. Good for debugging, bad for performance.
include <appname>.properties Load an additional configuration file and merge it into the main configuration.

Application-specific properties

All application specific parameters are configured in <appname>.properties. This file is loaded by an include property in TurbineResources.properties.

Setting Value Description
module.packages org.apache.turbine.app.<appname>.modules Package path for the application specific modules
services.VelocityService.velocimacro.library macros/<appname>Macros.vm Load application macros into Velocity Service.
services.IntakeService.xml.path WEB-INF/conf/helloworld-intake.xml Application specific intake file.

torque.properties

Some parts of Turbine and probably your web application might use Torque to access databases.

In this configuration file, the various datasources are defined. M.E.T.A. generates a default data source (default) and an application specific data source (<appname>) for you.

At setup time, both data sources are mapped onto the same JDBC data provider.

M.E.T.A. configures Torque to use the org.apache.torque.dsfactory.SharedPoolDataSourceFactory as pool factory.

log4j.properties

For debugging purposes is it very important to get logging information from a running application. M.E.T.A. generated applications write the following log files into the logs subdirectory:

Log fileclassesDescription
turbine.log org.apache.turbine Log messages from the Turbine core
torque.log org.apache.torque Torque logging
scheduler.log SchedulerService Reports and logging from the scheduler
velocity.log VelocityService Velocity messages
avalon.log AvalonService Avalon components (if they don't use their own logging)
application.log ${turbine.app.package}

Everything else
Catchall category. Your application logs its messages here

Avalon specific configuration

Turbine 2.3 uses the AvalonComponentService to load and initialize Torque.

M.E.T.A. provides two minimal Avalon configuration files to allow this:

  • componentConfiguration.xml
  • roleConfiguration.xml
If you don't intend to use Avalon in your application, you should not change anything here.

Using M.E.T.A. is no replacement for looking at the Turbine documentation and the comments in the configuration files!