How to create portable distributions
[back]
A portable version of the framework is basically a jar file that can be used to execute the framework via command line and without having to install third-party software (except for the java virtual machine). The portable versions are useful for testing or performance evaluation in real or emulated networks (see the tutoriala overview for more information about that). When using gMix in a publication we strongly suggest you create a portable distribution of the code you actually used (more information).
In this tutorial we assume you have already setup a development environment (see this tutorial on how to setup a development environment).
To create a portable distribution, you will have to run an ant script as described below. The script will do the following:
- Download an apache ivy jar file that will be used for the stepps below.
- Retreive third-party libraries used by gMix through apache ivy.
- Compile all sources and create an executable jar file.
- Copy all gMix config files.
- Create a zip file containing all java source files.
- Put all the above in a zip file in folder ./gMix/dist/gMixFramework.zip
Start Eclipse and right klick on buildPortableDist.ant in the Project Explorer and select Run As -> Ant Build:
The script should run through the steps retrieve, compile and dist and finish with the output BUILD SUCCESSFUL, Total time: X seconds.
Unzip the file on the target machine (for example a workstation in an emulated environment or LAN) and run the jar file using java -jar gMixFramework.jar. The GUI or command line options will be displayed and provide further information (see the tutorials section for more information).