How to configure Atlas Java package with Cmt

Basic configuration of Java packages is handled directly by Cmt. Ant Cmt interface can be used for more sophisticated configuration.

Put all your class hierarchy into directory src

Write requirements file

package MyPackage

# Setup Java
use JavaSDK JavaSDK-XX-* External

# Copy aux files
document installer images net/hep/atlas/MyPackage/images/*.gif \
   install_dir=../classes/net/hep/atlas/MyPackage/images/

# Define target library
library MyJarFile net/hep/atlas/MyPackage/*.java \
                  net/hep/atlas/MyPackage/images/*.gif \
                  net/hep/atlas/MyPackage/Test/*.java

# Export CLASSPATH
path_remove CLASSPATH "/MyPackage/"
path_append CLASSPATH "${MYPACKAGEROOT}/classes/MyPackage.jar"

# Define application
alias mypackage "java net.hep.atlas.MyPackage.Main"

# Define additional package and global Java run options
macro MyPackage_run_options MyOptions1
macro java_run_options      MyOptions2

private

# Reset CLASSPATH
path_remove  CLASSPATH "/MyPackage/" 
path_prepend CLASSPATH "$(src)"
path_prepend CLASSPATH "${MYPACKAGEROOT}/classes"

# Test
application net.hep.atlas.MyPackage.Test.Test -check net/hep/atlas/MyPackage/Test/Test.java
macro       net.hep.atlas.MyPackage.Test.Test_check_args MyArguments
macro       net.hep.atlas.MyPackage.Test.Test_pre_check "rm -f MyResults"

Check results


J.Hrivnac, Jun'03