...
No Format |
---|
<dependency> <groupId>freehep</groupId> <artifactId>freehep-run-plugin</artifactId> <version>1.1.1</version> <url>http://java.freehep.org/maven/freehep/plugins</url> <type>plugin</type> </dependency> |
Maven needs to know what which class to be executed by the run script should execute. This goes into the project.properties file.
No Format |
---|
maven.jar.mainclass=org.lcsim.example.classpath.ExampleMain
|
To build the script, execute the following target.
No Format |
---|
maven -Drun.install=$(pwd) run:install |
A Two run script scripts named after your project should now be found in the bin directory.
There is a Unix/Linux script
No Format |
---|
bin/ExampleProject
|
and also one for Windows.
No Format |
---|
bin/ExampleProject.bat
|
These scripts will setup This script sets up the classpath and executes execute the main function of the specified class.
No Format |
---|
public static void main(String[] args) |
The On Linux, the script can be run from the current directory, as follows.
...
The command line syntax of the script is completely up to you.
JAS
When http://jas.freehep.org/jas3 starts, it can automatically load your project JAR.
This target will copy the project's JAR into JAS3's extensions directory, located at ~/.JAS3/extensions.
No Format |
---|
maven jas:install |
Warning |
---|
The version number will be stripped out of the JAR name, and any existing JAR by the same name will be overwritten. |
When JAS loads, it will automatically load this JAR, making your project classes available from within JASThe class should now be available using the File -> Load command within JAS3.
Build Script
A full build command for your project, incorporating all of the above features from above, would look something like this.
...