incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Spicar <>
Subject Launcher script for Clerezza
Date Tue, 26 Oct 2010 12:16:40 GMT
Hello everyone,

I created a launcher script for the trialox CMS TDB launcher that starts the
platform with default parameters (JVM memory settings, file encoding, etc.).
I thought this script would be useful for Clerezza as well. The script is
automatically generated during the maven build process and can be configured
in the POM file of the launcher project. Scripts are generated for Windows
(batch script) and UNIX (shell script). To use the script it needs to be
located in the same directory as the executable JAR file of the platform
launcher (this happens automatically during the build process). All
additional arguments given to the script are used forwarded to the JVM.

script name:
configured parameters: -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=utf-8
executed as: -DlocalMode=true
resulting command: java -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=utf-8
-DlocalMode=true <launcher>.jar

This script is useful to make people's life easier ;) But mainly it has been
made for trialox customers that don't want to bother with command line
arguments and to provide a convenient method of launching a binary
distribution (if the script is given execution permission, it can be
executed by double clicking on the script file in a desktop environment).

My solution for the trialox CMS can be found here:
The changes needed to make this work for a Cerezza launcher are:
1. copy the properties section and the maven resource plugin configuration
into the POM file of a launcher project.
2. create the directory src/launcher-scripts
3. place the script templates (shell and batch script) in
src/launcher-scripts (rename the scripts appropriately)

When the project is built (mvn install), the usable scripts are placed in
the target directory.

The whole thing is inspired by the Maven AppAssembler plugin, however that
plugin didn't support all the features I was looking for. I used the script
generated by AppAssembler as a template for my solution.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message