Customizing Plex 6.0 ANT builds

From The CA Plex Wiki

Jump to: navigation, search

Plex 6.0 uses Apache ANT 1.6.5 for Java builds. Plex C# builds use MSBuild which is conceptually similar to ANT. In both cases, the output from the build is displayed within Plex in the Shell Build window. Plex 6.0 is designed so that you do not need to know anything about ANT or MSBuild, but you can fully exploit their features if you want to.

Getting Started

To get Plex 6.0 Java builds to work you need to set the JAVA_HOME environment variable. It needs to point to the top-level folder where Java is installed (for example, C:\Program Files\Java\jdk1.5.0_06)

The key to customizing the build process lies with the XML files in the Objava\Bin folder.

A Simple Example

In plexjavabuild.xml, setting the listfiles property for the javac task means that Shell Build window outputs the name of each .java file as it is compiled.

<target name="buildjavasource">
 <javac
  srcdir="${src.dir}"
  destdir="${build.dir}"
  includesfile="${src.dir}/${jobname}.txt"
  fork="true"
  memoryInitialSize="128m"
  memoryMaximumSize="256m"
  target="${javac_target}"
  source="${javac_source}"
  classpath="${classpath}"
  debug="${debug}"
  failonerror="${javac_failonerror}"
  compiler="${compiler}"
  listfiles="true"
  />
</target>

External Links

CA Support TEC426928: Why am I getting an out of memory error message when building a large Java application?

Apache ANT

Personal tools