Turbine

Sunday November 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] BUILD SUCCESSFUL
[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.

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Search

Hot Blogs (today's hits)

Tag Cloud

Categories

Feeds

Links

Navigation