ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Ant Principles
Date Tue, 18 Apr 2000 23:01:03 GMT
I have only recently joined this list, so excuse me for asking stupid

Why can't the file seperators in the xml file be specified using
${file.separator} instead of having a standard file separator.

I have a build xml file where I do the following:

  <property name="fs" value="{file.separator}"/>

I then specify file names using the shortened property name, e.g:

<property name="src.dir" value="${base.dir}${fs}src"/>

It isn't pretty, but it is portable.  I don't know how to solve the drive
addressing though.

I also have some feedback from my usage of ANT (over the past week) (I am using
windows NT JDK1.3RC2):

* I had to update bootstrap.bat so the classpath includes tools.jar.
* I had to update build.bat so the classpath includes tools.jar
* I couldn't get compiles to work when using a compile type of modern (no errors
produced and no class files produced).
* The example in the doco for the exec task doesn't work for Windows NT.  For it
to work, I had to specify the full name "Windows NT" as the operating system.
Maybe the doco could be improved to say that the operating system you specify
must be a complete string (not a substring of the operating system name).
* The copyfile task didn't report an error (even with verbose on) when an
invalid src file was specified.
* I couldn't find any mention of what happens when a task fails and if there is
a way to catch that error and perform another task (such as sending an email to
someone notifying them that the build failed).  Maybe there is a way to do this
setting properties??

Unfortunately I don't have the time at the moment to look into the above issues.

FYI.. I also started using a free obfuscator called RetroGuard (open source) and
it can be called during the build process and seems to work well.  I Thought
that some people may want to give it a go if they haven't already.


John Sisson
Insession Labs

"Robin Green" <> on 04/19/2000 08:34:30 PM

Please respond to


Subject:  Re: Ant Principles

Unfortunately, if you use platform-specific file separators, your build.xml
doesn't work on all platforms. If you mandate a standard file representation
for Ant, any characters you choose will probably be a pain for someone, but
at least you can build cross-platform. (In the extremely unlikely case that,
e.g. the path separator was ; and a filename included ;, you would use
character escaping: \; )


260+ Open Source Java links!

Get Your Private, Free Email at

View raw message