The 'Booter' Mechanism


The Booter mechanism is a solution to tame long classpath problems. The idea is to have a small main part which will read the different dependency information via an XML file into Java and create a classpath out of it and start your part afterwards.

How to configure the Booter mechanism

The first thing you have to configure is the main class which contains your main part which should be executed after the booter mechanism has built up the classpath which makes it available to you. The next thing is you have to give the platforms for which your start scripts has to be created. These are the scripts which will start your program from command line. An example how an configuration can look like is shown in the excerpt below:


The next part is to generate your scripts during the execution of the maven lifecycle. The goal generate-daemons is responsible for the creation of the scripts for their appropriate platforms whereas the create-repository goal is responsible to create a repository which contains all the dependencies you need to run your program.


A part which is really important that you define the appassembler-booter artifact as a dependency to your project cause it contains the part which is executed first and will read the XML file which contains the definitions of the dependencies to build the classpath for your program.


Based on the above configuration you will find the created structure under target folder which is described in the booter structure.