Tips and tricks
The CLASSPATH string can get very long, in particular if the application is installed deep inside the file system. To solve this problem use the 'booter-windows' and/or the 'booter-unix' platforms.
This problem is most common on Windows, but applies to Unix systems too.
Environment properties are outside the scope of appassembler, but a wrapper script might do the trick. This works for ulimit and other properties, because the shell spawned by JSW inherits the properties of the "parent shell". The wrapper script can look something like:
#!/bin/sh # The following two lines are used by the chkconfig command. Change as is # appropriate for your application. They should remain commented. # chkconfig: 2345 20 80 # description: ${project.name} echo 'Running wrapper for ${project.name}' if [ "$1" = "start" ] || [ "$1" = "console" ]; then ulimit -n 65000 echo "ulimit set to $(ulimit -n)" fi echo 'Calling JSW script' exec ${rpm.path}/bin/${rpm.appname} $1
Remember to enable filtering to have the variables in the script resolved. (The wrapper script is placed in the "bin" directory.)
<build> <resources> <resource> <directory>bin</directory> <filtering>true</filtering> </resource> </resources> ... </build>