The following configuration will generate a daemon daemon-1 and daemon-1.bat script within the ${project.build.directory}/generated-resources/appassembler/jsw/daemon-1/bin/ folder.
<project> ... <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>appassembler-maven-plugin</artifactId> <version>1.10</version> <executions> <execution> <phase>package</phase> <goals> <goal>generate-daemons</goal> </goals> </execution> </executions> <configuration> <daemons> <daemon> <id>daemon-1</id> <mainClass>com.westerngeco.example.App</mainClass> <platforms> <platform>jsw</platform> </platforms> </daemon> </daemons> </configuration> </plugin> </plugins> </build> </project>
Suppose you have created two classes for which you like to create two separate scripts. This can simply be achieved by using the following configuration. There is no limitation how many scripts you can generate through a configuration like this.
<project> ... <build> <plugins> ... <configuration> <daemons> <daemon> <id>daemon-1</id> <mainClass>com.westerngeco.example.App1</mainClass> <platforms> <platform>jsw</platform> </platforms> </daemon> <daemon> <id>daemon-2</id> <mainClass>com.westerngeco.example.App2</mainClass> <platforms> <platform>jsw</platform> </platforms> </daemon> </daemons> </configuration> </plugin> ... </plugins> </build> </project>