[Anthill] Problems using -propertyfile param in anthill.build.ant.params

Thompson, Andrew M. DOC Andrew.Thompson at doc.state.wi.us
Thu May 13 22:22:20 CDT 2004


I've been struggling for the past week with trying to specify a property
file for a build.  If I specify each individual property using the
-Dname=value syntax this all works fine, but I don't want to have to do this
for each of our projects, especially if the list of properties in the
central property file beings to grow.  Is this a rights issue?  Is this a
file format issue?

I've set anthill.build.ant.params equal to:
-propertyfile /usr/local/anthill/conf/build.properties

The contents of the property file are the following:

javac.target = 1.3
javac.bootclasspath = /opt/java1.3/jre/lib/rt.jar
user.name = Anthill

The rights are set to:
-rw-rw-rw-   1 www        other           89 May 13 21:54 build.properties

The output to the build log is as follows:

dependency:
     [echo] Dependency Artifact Dir = ${dependency.artifact.dir}
[echoproperties] #Ant properties
[echoproperties] #Thu May 13 21:55:16 CDT 2004
[echoproperties] java.runtime.name=Java(TM) 2 Runtime Environment, Standard
Edition
[echoproperties] sun.boot.library.path=/opt/java1.4/jre/lib/PA_RISC2.0
[echoproperties] java.vm.version=1.4.2 1.4.2.00-031015-16\:52-PA_RISC2.0
PA2.0
[echoproperties] ant.version=Apache Ant version 1.5.1 compiled on October 2
2002
[echoproperties] ant.java.version=1.4
[echoproperties] kit=Anthill_2.4.41
[echoproperties] java.vm.vendor=Hewlett-Packard Company
[echoproperties] java.vendor.url=http\://www.hp.com/go/Java
[echoproperties] path.separator=\:
[echoproperties] java.vm.name=Java HotSpot(TM) Server VM
[echoproperties] file.encoding.pkg=sun.io
[echoproperties] sun.os.patch.level=unknown
[echoproperties] java.vm.specification.name=Java Virtual Machine
Specification
[echoproperties] user.dir=/home/www
[echoproperties] java.runtime.version=1.4.2.00-031015-15\:06
[echoproperties] java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
[echoproperties] basedir=/usr/local/anthill/work/Infrastructure
[echoproperties] java.endorsed.dirs=/opt/java1.4/jre/lib/endorsed
[echoproperties] os.arch=PA_RISC2.0
[echoproperties] java.io.tmpdir=/var/tmp/
[echoproperties] line.separator=\n
[echoproperties] java.vm.specification.vendor=Sun Microsystems Inc.
[echoproperties] os.name=HP-UX
[echoproperties] sun.java2d.fontpath=
[echoproperties] jdbc.driver=../Dependencies/classes12.zip
[echoproperties] build.classes=build/classes
[echoproperties] build.dir=build
[echoproperties] ant.project.name=Infrastructure.jar
[echoproperties]
java.library.path=/opt/java1.4/jre/lib/PA_RISC2.0\:/opt/java1.4/jre/lib/PA_R
ISC2.0/server\:/opt/java1.4/jre/../lib/PA_RISC2.0\:/opt/java1.4/jre/lib/PA_R
ISC2.0\:/opt/java1.4/jre/lib/PA_RISC2.0/server\:/opt/java1.4/jre/../lib/PA_R
ISC2.0\:/usr/lib
[echoproperties] deployDir=/usr/local/anthill/publishDir/Infrastructure
[echoproperties] java.specification.name=Java Platform API Specification
[echoproperties] java.class.version=48.0
[echoproperties] lib.dir=../Dependencies
[echoproperties]
java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFact
ory
[echoproperties] os.version=B.11.11
[echoproperties] ant.file=/usr/local/anthill/work/Infrastructure/build.xml
[echoproperties] user.home=/home/www
[echoproperties] user.timezone=America/Chicago
[echoproperties] java.awt.printerjob=sun.print.PSPrinterJob
[echoproperties] file.encoding=8859_1
[echoproperties] java.specification.version=1.4
[echoproperties] build.compiler=modern
[echoproperties] user.name=www
[echoproperties]
java.class.path=/opt/java1.4/lib/tools.jar\:/usr/local/anthill/lib/ant1.5.1/
jdepend.jar\:/usr/local/anthill/lib/ant1.5.1/ant.jar\:/usr/local/anthill/lib
/ant1.5.1/junit.jar\:/usr/local/anthill/lib/ant1.5.1/optional.jar\:/usr/loca
l/anthill/lib/ant1.5.1/xercesImpl.jar\:/usr/local/anthill/lib/ant1.5.1/xml-a
pis.jar\:
[echoproperties] java.vm.specification.version=1.0
[echoproperties] sun.arch.data.model=32
[echoproperties] java.home=/opt/java1.4/jre
[echoproperties] java.specification.vendor=Sun Microsystems Inc.
[echoproperties] user.language=en
[echoproperties] test.dir=test
[echoproperties] java.vm.info=mixed mode
[echoproperties] java.version=1.4.2.00
[echoproperties] java.ext.dirs=/opt/java1.4/jre/lib/ext
[echoproperties]
sun.boot.class.path=/opt/java1.4/jre/lib/rt.jar\:/opt/java1.4/jre/lib/i18n.j
ar\:/opt/java1.4/jre/lib/sunrsasign.jar\:/opt/java1.4/jre/lib/jsse.jar\:/opt
/java1.4/jre/lib/jce.jar\:/opt/java1.4/jre/lib/charsets.jar\:/opt/java1.4/jr
e/classes
[echoproperties] java.vendor=Hewlett-Packard Co.
[echoproperties] file.separator=/
[echoproperties] src.dir=src
[echoproperties] java.vendor.url.bug=http\://www.hp.com/go/Java
[echoproperties] version=Anthill_2.4.41
[echoproperties] sun.cpu.endian=big
[echoproperties] sun.io.unicode.encoding=UnicodeBig
[echoproperties] sun.cpu.isalist=pa2.0 pa1.2 pa1.1 pa1.0

build:

init:
    [mkdir] Created dir: /usr/local/anthill/work/Infrastructure/build
    [mkdir] Created dir:
/usr/local/anthill/work/Infrastructure/build/classes
     [copy] Copying 6 files to
/usr/local/anthill/work/Infrastructure/build/classes

compile:
    [javac] Compiling 36 source files to
/usr/local/anthill/work/Infrastructure/build/classes
    [javac] javac: invalid target release: ${javac.target}
    [javac] Usage: javac <options> <source files>
    [javac] where possible options include:
    [javac]   -g                        Generate all debugging info
    [javac]   -g:none                   Generate no debugging info
    [javac]   -g:{lines,vars,source}    Generate only some debugging info
    [javac]   -nowarn                   Generate no warnings
    [javac]   -verbose                  Output messages about what the
compiler is doing
    [javac]   -deprecation              Output source locations where
deprecated APIs are used
    [javac]   -classpath <path>         Specify where to find user class
files
    [javac]   -sourcepath <path>        Specify where to find input source
files
    [javac]   -bootclasspath <path>     Override location of bootstrap class
files
    [javac]   -extdirs <dirs>           Override location of installed
extensions
    [javac]   -d <directory>            Specify where to place generated
class files
    [javac]   -encoding <encoding>      Specify character encoding used by
source files
    [javac]   -source <release>         Provide source compatibility with
specified release
    [javac]   -target <release>         Generate class files for specific VM
version
    [javac]   -help                     Print a synopsis of standard options
    [javac]   -file <filename>          Specify a file containing a list of
Java source files


Finally here's what we get in the catalina.out:

21:55:15:244 [Thread - AnthillBuildDaemon] INFO
com.urbancode.anthill.util.Execute  - [ANT Build] /opt/java1.4/bin/java
-classpath
/opt/java1.4/lib/tools.jar:/usr/local/anthill/lib/ant1.5.1/jdepend.jar:/usr/
local/anthill/lib/ant1.5.1/ant.jar:/usr/local/anthill/lib/ant1.5.1/junit.jar
:/usr/local/anthill/lib/ant1.5.1/optional.jar:/usr/local/anthill/lib/ant1.5.
1/xercesImpl.jar:/usr/local/anthill/lib/ant1.5.1/xml-apis.jar:
org.apache.tools.ant.Main
-DdeployDir=/usr/local/anthill/publishDir/Infrastructure
-Dversion=Anthill_2.4.41 -Dkit=Anthill_2.4.41 -buildfile
/usr/local/anthill/work/Infrastructure/build.xml -logfile
/usr/local/anthill/publishDir/Infrastructure/buildLogs/Infrastructure-Anthil
l_2.4.41-build.log -propertyfile
/usr/local/anthill/work/Infrastructure/build.properties
-Ddependency.artifact.dir=/usr/local/anthill/publishDir/depDir/All_Dependenc
ies dependency

21:55:22:025 [Thread - AnthillBuildDaemon] ERROR
com.urbancode.anthill.BuildManager  - Failed to Build project. Error: 1
java.lang.Exception: Failed to Build project. Error: 1
        at
com.urbancode.anthill.BuildManager.buildProject(BuildManager.java:497)
        at
com.urbancode.anthill.BuildManager.runBuild(BuildManager.java:403)
        at com.urbancode.anthill.BuildManager.build(BuildManager.java:187)
        at
com.urbancode.anthill.AnthillProject.releaseProject(AnthillProject.java:231)
        at
com.urbancode.anthill.BuildDefinition.run(BuildDefinition.java:158)
        at
com.urbancode.anthill.DependencyGroup$Member.build(DependencyGroup.java:572)
        at
com.urbancode.anthill.DependencyGroup.run(DependencyGroup.java:384)
        at com.urbancode.anthill.BuildDaemon.run(BuildDaemon.java:73)



More information about the Anthill mailing list