Help with ant.bat under Linux

Okay, I smacked the ant.bat around to make a simple bash script which appears to do all the same stuff. Here’'s what I get when I run it. Help?


$ ./ant

Buildfile: build.xml

BUILD FAILED

‘’ does not exist in this project.

Total time: 2 seconds


My script looks like this:


export CP=$CLASSPATH:$JAVA_HOME/lib/tools.jar:./ant.jar:

(cont) ./xmltask.jar

$JAVA_HOME/bin/java -Xms32m -Xmx128m -classpath $CP

(cont) -Dant.home=. org.apache.tools.ant.Main $1 $2 $3


$CP seems to be setting fine, here’'s what it looks like:

.:/home/dave/java/jaxp-1.1/jaxp.jar:

(cont)/home/dave/java/jaxp-1.1/crimson.jar:

(cont)/home/dave/java/jaxp-1.1/xalan.jar:

(cont)/usr/share/j2sdk1.4.0//lib/tools.jar:

(cont)./ant.jar:./xmltask.jar

I’‘m an ant noob, so feel free to make me fell dumb if there’‘s some simple way to get this working. I don’'t see an xmltask.jar file in the build directory tho. Is this missing in the .tar file?

Cheers,

dave

Did you follow the readme to setup your environment correctly, such as setting JAVA_HOME?

Regards,

Matt

Yup. $JAVA_HOME is pointing to my JDK. The xmltask.jar file doesn’'t seem to be in the .tar or .zip for 1.0beta1.1 – is that file necessary and missing or is that reference in ant.bat a leftover?

Thanks for you speedy followup, btw!

dave

Dave,

The xmltask.jar shouldn’‘t be in the classpath. I think that was left in there accidentally (I borrowed the Ant script from another project). I’‘ve updated the ant.bat and ant shell script in CVS. However, I doubt this is what was causing your build problems. BTW, why aren’‘t you using the shell script that we distribute with Smack? There shouldn’'t be any need to create your own.

Regards,

Matt

Hrm… the only script I saw with the .tar file in ./build was ant.bat – no shell script. I saw mention of the ant shell script in docs, but no file.

I’‘m not sure why it might have been missing, I’‘ll look into it. In any case, I’'m attaching the file to this message.

Regards,

Matt
ant (2151 Bytes)

Thanks, I’‘ll give this a try and let you know if it doesn’'t work out. By the way, you guys make nice forum software too. I like the attachments and watch features.