Friday Jan 08, 2016

Using annotations in Turbine 4

The Milestone 2 release of Turbine 4 has added support for dependency injection into modules and valves using annotations. This can simplify your code a lot. Consider a screen template thats uses some Turbine service:

protected void doBuildTemplate(RunData data, Context context)
    // Get service instance
    MyService myservice = (MyService) TurbineServices

    // do something

Looks a bit complicated, doesn't it? Now with Turbine annotations, you simply do

private MyService myservice;

protected void doBuildTemplate(RunData data, Context context)
    // do something

In addition to services, the annotations @TurbineConfiguration and @TurbineLoader inject instances of the Turbine configuration or subsets of it and the Assembler loaders for a certain page, screen or action.

See the 

 for the documentation of these features.

Apache Turbine 4.0 Milestone 2 released

The Apache Turbine team is pleased to announce the 4.0-M2 milestone release!

Apache Turbine is a servlet based framework that allows experienced Java developers to quickly build secure web applications. Parts of Turbine can also be used independently of the web portion of Turbine as well. In other words, we strive to make portions of Turbine easily available for use in other applications.

Apache Turbine is a long time citizen of the Apache Software Foundation, the first commits date back to 2000 and 2001. The project has influenced quite a number of other projects such as Apache DB Torque, Apache Maven and a number of Apache Commons components.

This milestone release is made for verification of the new security implementation, the quartz scheduler and the new annotations. Many deprecated methods have been removed. The milestone release is not meant for production use. We hope to get lots of feedback from you.

Note that this version requires JDK 1.6+ to run.

New features

  • Add QuartzSchedulerService
  • Add Annotation @TurbineActionEvent to annotate action methods with arbitrary event names.
  • Add Annotation @TurbineLoader to inject a loader instance into objects.
  • Add Annotation @TurbineConfiguration to inject a configuration instance into objects.
  • Add Annotation @TurbineService to inject Turbine service instance into assemblers such as screens, actions, navigations etc. and pipeline valves. See VelocityActionWithServiceInjection for an example.
  • Add class cache for TurbineRunDataService

Fixed Bugs

  • Fix Velocity logging.
  • Fix possible NPE in TurbinePullService.
  • Use lastIndexOf() to get the template extension in TurbineTemplateService. Issue: TRB-82.
  • Fix TurbineYaafiComponentService to set its applicationRoot properly.
  • Fix TurbineMacros to comply with the implementation of HtmlPageattributes
  • Port the handling of template encoding from Turbine 2.3.3


  • Update dependencies
    • commons-codec to 1.10
    • commons-collections to 3.2.2
    • commons-logging to 1.2
    • commons-beanutils to 1.9.2
    • jython to 2.7.0
    • log4j to 1.2.17
  • Update dependencies
    • fulcrum-security to 1.1.0
    • fulcrum-intake to 1.2.0
  • Update to Torque 4.0.0
  • Update dependencies
    • servlet-api to 2.5 (Tomcat 6.0)
    • commons-codec to 1.8
    • commons-configuration to 1.9
    • commons-email to 1.3
    • fulcrum-parser to 1.0.3
  • Update Turbine Parent POM to version 3
  • Switch to Fulcrum Security API
  • Refactor handling of annotated fields into AnnotationProcessor.
  • Reintroduce VelocityCachedLayout/Screen classes
  • Adjust site for Apache Turbine Parent POM version 2
  • Use Apache Turbine Parent POM version 2
  • Remove duplicate data storage in DefaultTurbineRunData and DefaultPipelineData
  • Services that implement TurbineServiceProvider are inited early by default Issue: TRB-72.
  • Switch from String keys to Class keys for AssemblerBrokerService
  • Refine interface of PipelineData and add user and acl objects to pipelineData.
  • Continue generification


  • Remove all deprecated methods using RunData as a parameter to clean up the API. Further cleanup is needed.

Have fun!
-Apache Turbine team

Sunday Nov 18, 2012

Maven archetypes for Apache Turbine applications - easier startup with Turbine

This is to announce that two Maven archetypes for the creation of Apache Turbine web applications have been released. They have been created to take the hassle out of the process of creating a new working Turbine project.

  • Maven Archetype for the creation of a web application based on Turbine 4.0M1
  • Maven Archetype for the creation of a web application based on Turbine 2.3.3

According to the Central Repository FAQ, the archetype catalog will be updated every Sunday, so with some luck the archetypes will be available tomorrow.

How to use them:

Use "mvn archetype:generate" in interactive mode to select one of (the numbers might be different):

673: remote -> org.apache.turbine:turbine-webapp-4.0 (This archetype sets up a web application project based on Apache Turbine 4.0M1)
674: remote -> org.apache.turbine:turbine-webapp-2.3.3 (This archetype sets up a web application project based on Apache Turbine 2.3.3)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 227: 672

and follow the steps:

Define value for property 'groupId': : com.mycompany.turbine
Define value for property 'artifactId': : myturbineapp
Define value for property 'version': 1.0-SNAPSHOT:
Define value for property 'package': com.mycompany.turbine:

Maven will now give you a summary of all settings of the new application and ask for confirmation:

[INFO] Using property: turbine_app_name = My Turbine Web Application
[INFO] Using property: turbine_database_adapter = mysql
[INFO] Using property: turbine_database_jndipath = java:comp/env/jdbc/Turbine
[INFO] Using property: turbine_database_name = turbine
[INFO] Using property: turbine_intake_file = intake.xml
Confirm properties configuration:
groupId: com.mycompany.turbine
artifactId: myturbineapp
version: 1.0-SNAPSHOT
package: com.mycompany.turbine
turbine_app_name: My Turbine Web Application
turbine_database_adapter: mysql
turbine_database_jndipath: java:comp/env/jdbc/Turbine
turbine_database_name: turbine
turbine_intake_file: intake.xml
Y: Y

If you respond with Y, Maven generates your project in the directory "myturbineapp" (the artifactId that you chose above):

[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: turbine-webapp-2.3.3:1.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mycompany.turbine
[INFO] Parameter: artifactId, Value: myturbineapp
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.mycompany.turbine
[INFO] Parameter: packageInPathFormat, Value: com/mycompany/turbine
[INFO] Parameter: turbine_database_jndipath, Value: java:comp/env/jdbc/Turbine
[INFO] Parameter: groupId, Value: com.mycompany.turbine
[INFO] Parameter: turbine_app_name, Value: My Turbine Web Application
[INFO] Parameter: turbine_database_name, Value: turbine
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: turbine_intake_file, Value: intake.xml
[INFO] Parameter: turbine_database_adapter, Value: mysql
[INFO] Parameter: package, Value: com.mycompany.turbine
[INFO] Parameter: artifactId, Value: myturbineapp
[INFO] project created from Archetype in dir: /Users/thomas/Dev/myturbineapp
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 25 seconds
[INFO] Finished at: Sun Nov 18 17:11:02 CET 2012
[INFO] Final Memory: 12M/62M
[INFO] ------------------------------------------------------------------------

You can now start to use the project, add your own modules, templates and other resources. Running "mvn package" will create a complete WAR file, ready to be deployed.

Turbine Parent POM 2 released.

The Apache Turbine team is pleased to announce the turbine-parent-2 release!

This is the Parent POM for the Apache Turbine and Fulcrum project. Despite it's version 2 this is the first official release. This POM is supposed to be used as parent for all modules in the Apache Turbine Project.

Changes in this version include:

New features:
  • Add customization of apache-release profile 
  • Move changelog to standard location 
  • Update Apache Parent POM to version 11 and remove all duplicate settings 
  • Remove definition of dummy repository as Nexus now is supposed to handle actual promotion of artifacts. 
  • Remove old release and rc profiles 

It was necessary to create a new set of project configuration to be able to publish artifacts using the Nexus Repository Manager.

Tuesday Mar 31, 2009

Encoding inside of Tomcat

Something to be aware of when switching the encoding to UTF-8 is that tomcat will need to be reconfigured also. The encoding of URL-parameters (for GET-requests) is still  interpreted as ISO-8859-1. You may want to set useBodyEncodingForURI="true" in the connector in use. See http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html on what this does.

Monday Mar 30, 2009

Enable UTF-8 Encoding for your Applications

On the Mailing List I found an interesting Post about how to enable UTF-8 if you are running Turbine 2.3.2 and later



Hudson Zone installed

To everyone who is interested in the current status of our development, please feel free to visit http://hudson.zones.apache.org/hudson/job/Turbine%20Core/ and http://hudson.zones.apache.org/hudson/job/Turbine%20Fulcrum/ 

fulcrum-yaafi-crypto-1.0.6 is released

The fulcrum-yaafi-crypto-team is pleased to announce the fulcrum-yaafi-crypto-1.0.6.jar release! 

Fulcrum YAAFI Crypto Library

Source and binary distributions:


See also the download page at:


The signatures can be downloaded from:


Changes in this version include:

New features:

o Moving the code out of YAAFI and make a standalone library.


o Using the official fulcrum-parent-1 pom.

Have fun!

Turbine Blog Online

Hi Folks,

I am very happy to announce that the Turbine Project has setup its own blog. This blog will keep the users updated about what is happening on the development side of turbine. The ApacheCon in Amsterdam was last week, and as I know Thomas and Siegfried have worked like hell on the turbine core and fulcrum to get it built on maven2.




Hot Blogs (today's hits)

Tag Cloud