Ok, I've finally started to sit down and write Ant scripts for the projects
I work on, and I've run into some rough spots.
I've included the scripts I'm using for reference. I'm using the latest
build of Ant from here
http://jakarta.apache.org/builds/ant/release/v1.1/bin/ )
A) FAQ
It bombs out on me when I try to add things to create an account. Whom
should I talk to about this?
B) Seperation of responsibilities
I'm trying to keep Ant's build files seperated out into the data they need,
so they're easier to generate (if I want to build them from an install
script or hand edit them), etc. It's easier for me if they're seperated.
So, I'm trying to seperate project properties into a seperate build file
(properties.xml :) ), and I'd like to be able to just include another XML
file into my project to define properties, etc, but the only thing I've
found to do this works only on java.lang.Properties files, and I don't care
for their structure.
A temporary solution seems to be to just use an Ant script with all
properties in them (ex is in the files attached), although my tests this
morning don't seem to work now... Anyway, I'm trying to have a project
properties file. Any suggestions on how to do this?
I would like to be able to import XML files directly into my project (is
someone working on this, or should I get off my ass and actually write code
to import XML structures from other XML files?).
C) Classpath
The pathlike tags from the example don't seem to work when I include them in
my build files. Is this a known bug (maybe a known user error?)?
D) Proxy username/password
I've set the appropriate flags for using a proxy, but can't seem to figure
out how to send my username/password for our web proxy. Anyway, the flags I
set are
"-Dhttp.proxySet=true -Dhttp.proxyPort=8080 -Dhttp.proxyHost=172.16.91.91".
I pass them into the JVM, and it at least attempts to go grab the files.
However, I know the proxy requires a password/username... where do I specify
this? Any suggestions?
Anyway, any help would be appreciated,
Matt
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- Cosm's Build File -->
<!-- ======================================================================= -->
<project name="cosm" default="buildAll" basedir="..">
<target name="init">
<ant antfile="properties.xml" dir="."/>
</target>
<target name="prepareTree" depends="init,getJars"/>
<target name="getJars">
<ant antfile="jars.xml" dir="."/>
</target>
<target name="clean"/>
<target name="buildAll" depends="prepareTree"/>
<target name="getCode"/>
<target name="cleanBuild" depends="clean,getCode,buildAll"/>
</project>
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- Cosm's Jar File -->
<!-- ======================================================================= -->
<project name="cosm.jars" default="getJars" basedir="..">
<property name="cosm.resource" value="http://foo.e-plagiarism.com/resource/"/>
<!-- Dummy target to specify jars to check -->
<target name="init">
<ant antfile="properties.xml" dir="."/>
<available file="./lib/j3dcore.jar" property="j3d.code.present"/>
<available file="./lib/j3daudio.jar" property="j3d.audio.present"/>
<available file="./lib/j3dutil.jar" property="j3d.util.present"/>
<mkdir dir="${cosm.library}" />
</target>
<target name="getJars" depends="init,j3daudio,j3dutil,j3dcore"/>
<target name="j3daudio" unless="j3d.audio.present">
<get src="${cosm.resource}/j3d/j3daudio.jar" dest="${cosm.library}/j3daudio.jar"/>
</target>
<target name="j3dutil" unless="j3d.util.present">
<get src="${cosm.resource}/j3d/j3dutil.jar" dest="${cosm.library}/j3dutil.jar"/>
</target>
<target name="j3dcore" unless="j3d.core.present">
<get src="${cosm.resource}/j3d/j3dcore.jar" dest="${cosm.library}/j3dcore.jar"/>
</target>
</project>
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- Cosm's Build File -->
<!-- ======================================================================= -->
<project name="cosm.properties" default="setProperties" basedir="..">
<property name="cosm.src" value="./src/"/>
<property name="cosm.sandbox" value="./sandbox/"/>
<property name="cosm.classes" value="./classes/"/>
<property name="cosm.library" value="./lib/"/>
<property name="cvs.server" value="cvs.apache.org"/>
<property name="cvs.username" value="anoncvs"/>
<property name="cvs.repository" value="/public"/>
<target name="setProperties">
<!-- <classpath>
<pathelement path="${classpath}"/>
<pathelement location="${cosm.library}/j3dcore.jar"/>
<pathelement location="${cosm.library}/j3daudio.jar"/>
<pathelement location="${cosm.library}/j3dutil.jar"/>
</classpath> -->
</target>
</project>