Build Tool: Commonbuild/Ant

Please download and install Commonbuild:

Here is the download location: http://asl716.acc.gsi.de/tools/cmmnbuild/cmmnbuild.zip

Here the installation instructions: http://ab-dep-co-ap.web.cern.ch/ab-dep-co-ap/dev/tools/commonbuild/installing.html

You need to place parts of common build in your PATH variable, so extract it to a suitable location to do that.
After extracting edit the <commonbuild path>/repository.properties to remove hard links to abwww.cern.ch and replace them with localhost:10000.
The links inside repository.properties should look like this:
# The remote repositories of jars for downloading the products dependencies
production.repository=http://localhost:${env.CMMNBUILD_PORT}/ap/dist
dev.repository=http://asl716.acc.gsi.de/repository
thirdparty.repository=http://localhost:${env.CMMNBUILD_PORT}/ap/dist/__3rd_PARTY__

production.repository.file=file:///user/pcrops/dist
thirdparty.repository.file=file:///user/pcrops/dist/__3rd_PARTY__
cmd.repository=/user/pcrops/dist

# The remote repositories of jars for publishing
#publish.production.repository=file:///user/pcrops/dist
publish.dev.repository=file:////project-commonbuild.web.cern.ch/project-commonbuild/repositories/dev

# The remote repository to be used with WebDav (platform independent)
#publish.dev.repository=http://test-release.webtest.cern.ch:81/test-release/repositories/dev/

#jnlp.codebase
jnlp.codebase=${production.repository}

#jnlp current directory path for running application locally
jnlp.currentdir=file:.

#cmdscript.codebase
cmdscript.codebase=${cmd.repository}

# the default version to take is no version is specified when doing getjars
repository.default.version=PRO

# the hostname for release
release.hostname=cs-ccr-ap2.cern.ch
release.server.path=/user/pcrops/dist/release/release-server/PRO
release.executable=release.wrapper

# the default setting for resolvealias
release.resolvealias=true

# the default cvs repository
release.cvs.host=isscvs.cern.ch
release.cvs.username=anonymous
release.cvs.repositoryname=acc-co
release.cvs.rootdir=/local/reps
release.cvs.connectiontype=pserver
release.cvs.tag.prepend=V

# the default svn repository
release.svn.url=svn+ssh://svn.cern.ch/reps
release.svn.repositoryname=acc-co
release.svn.dirTrunk=trunk
release.svn.dirTags=tags
release.svn.dirBranches=branches
release.svn.tag.prepend=V

# the default repository, one of: {cvs, svn}
release.source.repository=svn

After applying the changes we suggest to set a write protect flag on repository.properties so the configuration is not replaced during a common-build update.

Windows: For configuring Commonbuild for Windows, see the description on the above mentioned Commonbuild Webpage.

If you run into memory problems please set the following environment variable, it passes to the JVM some additional memory options when running ant:
ANT_OPTS=-Xms128M -Xmx256M

Linux:
export CMMNBUILD_HOME=xxxxxxx (this should be the path pointing to your common-build directory)
export ANT_HOME=$CMMNBUILD_HOME (this should be the path pointing to your common-build directory)
export PATH=$ANT_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ANT_HOME/lib:$LD_LIBRARY_PATH

It is important to use the Ant Runtime supplied by common build because it contains additional libraries that are required.

Eclipse:

After setting environment variables mentioned above, you have to restart Eclipse so they can take effect.

Window -> Preferences -> Ant -> Runtime
On the tab classpath, edit the ant home entries: press the button "Ant Home" and set it to your Commonbuild path, e.g. /usr/local/share/cmmnbuild

Open the Ant view in eclipse to use the Commonbuild ant targets from within eclipse. If the system complains about a missing "tools.jar", add it with the button "Add external JAR" and add the tools.jar from your java installation under <java>/lib/tools.jar

-- JuttaFitzek - 06 Jan 2015<br/>-- RaphaelMueller - 23 Feb 2010
Topic revision: r3 - 13 Apr 2020, JuttaFitzek
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback