Daemon JVM Settings

JvmSettings

You can also use a complete JvmSettings with different parameters per daemon if you need to do that.

<project>
  ...
  <build>
    <plugins>
      <plugin>
        ...
        <configuration>
          <daemons>
            <daemon>
              <id>daemon-1</id>
              <mainClass>org.codehaus.mojo.appassembler.example.helloworld.HelloWorld</mainClass>
              <commandLineArguments>
                <commandLineArgument>argument_one</commandLineArgument>
              </commandLineArguments>
              <jvmSettings>
                <initialMemorySize>20M</initialMemorySize>
                <maxMemorySize>200M</maxMemorySize>
                <maxStackSize>128M</maxStackSize>
                <systemProperties>
                  <systemProperty>test=this</systemProperty>
                  <systemProperty>xyz=those</systemProperty>
                </systemProperties>
                <extraArguments>
                  <extraArgument>-DTest</extraArgument>
                  <extraArgument>-DXXX</extraArgument>
                </extraArguments>
              </jvmSettings>
                <platforms>
                  <platform>jsw</platform>
                </platforms>
            </daemon>
          </daemons>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

The generated daemon in its wrapper.conf file contains now the parameters for the above information in the following manner (currently the maxStackSize is not supported in that direct way. This can be solved by using -DXms=.. instead):

# Java Additional Parameters
#wrapper.java.additional.1=
wrapper.java.additional.1=-Dtest=this
wrapper.java.additional.2=-Dxyz=those
wrapper.java.additional.3=-DTest
wrapper.java.additional.4=-DXXX

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
wrapper.java.initmemory=20M

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
wrapper.java.maxmemory=200M