Installation Guide > Codebeamer Installation Guide > Codebeamer Configuration > Post-installation Configuration > Configuring Ant for Codebeamer: Builds in Separate JVMs
Configuring Ant for Codebeamer: Builds in Separate JVMs
* 
Since Codebeamer 5.7 Builds are not available.
Launching Ant in a Separate JVM
Codebeamer launches Ant in a separate JVM, instead of running it in Codebeamer's JVM. This has the following benefits:
Robust –memory (typically OutOfMemoryError) or other resource problems of the Ant sub-process will not affect Codebeamer at all. Anything can fail, the Codebeamer server will be up and running.
Atomic – each Ant invocation lives in its own sandbox. If you have a build sequence that first runs an Ant script, then calculates metrics with another script, the two steps will run in two separate JVMs.
Secure – you can customize what operating system user account will be used as the owner of the build process. Properly setting up the operating system access rights of this account, any kind of security model is supported.
Customizable – you can fine-tune your Ant environment by modifying the wrapper scripts that lauch Ant.
Better control over the classpath – collisions with Codebeamer's classloader will not affect your builds.
Also See:
Customizing Ant
For your convenience, Ant is included in the standard Codebeamer installation, under its own directory $CODEbeamer_HOME/ant. Customizing Ant (for example, adding optional task definitions) is absolutely possible, but you have to be very careful, because your changes will affect all the builds in all the projects. Beside extending Ant's functionality by adding new JARs to $CODEbeamer_HOME/ant/lib, your primary customization points are the Ant wrapper scripts: $CODEbeamer_HOME/ant/bin/ant.bat on Windows and $CODEbeamer_HOME/ant/bin/ant on Linux (or other Unix-like) platforms. Modifying these, you can add your own loggers, add further project-independent properties or fine-tune the JRE commandline options. Customization happens in the same exact way as with regular Ant installations, so these are not detailed here, please refer to the Ant Manual http://ant.apache.org/manual/index.html.
Environment for Ant Builds
The initial set of runtime properties passed to Ant consists of the following:
CB_INSTALLDIR —“ Codebeamer home directory
CB_USER_ID — identifier of the user who initiated this build
CB_PROJ_ID —“ identifier of the project where this build belongs to
CB_PROJECT_NAME —name of the project that this build belongs to
CB_DOCDIR —directory where Codebeamer stores the documents that belong to this project
CB_SRCDIR —“ directory where Codebeamer stores the source code that belong to this project
CB_PROJECT_DIR —“ root directory of this Codebeamer project
CB_REMOTE_API_URL —connection point for the remote API of this Codebeamer instance (for internal use)
CB_PASSIVE_MODE —communication properties (for internal use)
Of course, all the additional properties that you specify in the "Customize Build" screen will be added, too. You can learn more about the details of invocation by studying the Codebeamer system log.
Codebeamer-specific Custom Ant Tasks
When writing your build scripts, you can use some special task definitions for better integration with Codebeamer. Codebeamer is shipped with the following custom Ant tasks:
CBExportReport —executes a Codebeamer report and saves its result to a local file in MS Excel format.
CBPost —posts a message to a Codebeamer forum.
CBRelease —uploads files from the local file system to the Codebeamer Document Management System.
* 
These task definitions are immediately available for your scripts, there is no need for adding <taskdef> elements.
The <CBExportReport> Task
Attribute
Required
Description
reportid
Yes
Report ID to generate.
filename
Yes
Relative or absolute path of the file where the generated report will be stored.
comments
No
Boolean ("true" or "false"), whether to include tracker item comments in the report. Defaults to "false".
descriptions
No
Boolean ("true" or "false"), whether to Include tracker item descriptions in the report. Defaults to "false".
type
No
Format of the report output file. Supported formats: "pdf", "excel", "wiki", "xml", "csv". Defaults to "excel".
The <CBPost> Task
Attribute
Required
Description
forumid
Yes
Forum ID to post to.
threadid
No
Thread ID when replying to an existing thread.
subject
Yes
Message subject.
description
Yes
Message body.
format
No
'W' for Wiki, 'T' for plain text or 'H' for HTML.
attachment
No
Relative or absolute path of the file to attach.
The <CBRelease> Task
Attribute
Required
Description
file
Yes
Comma-separated list of files to upload.
tofile
Yes
Target filename in the Codebeamer Document Manager if a single file is to copy.
todir
No
Target dirname in the Codebeamer Document Manager. Defaults to the root directory.
description
Yes
Document description for the uploaded file.
descriptionformat
No
'W' for Wiki, 'T' for plain text or 'H' for HTML.
keywords
No
Keywords for the uploaded file.
scccommitmessage
No
Commit message for this particular revision.
scccommitmessageformat
No
'W' for Wiki, 'T' for plain text or 'H' for HTML.
Was this helpful?