ant property file

M

Miguel De Anda

I made a generic build.xml file for my java programs that looks in a
directory lib for jars. It works fine when I set the properties as location:

<property name="lib" location="lib"/>

But when I move those properties to an external properties file, it doesn't
work. I imagine its because properties from the file are being set as value
instead of location. How do I set a property to be a location in a
properties file?
 
M

Miguel De Anda

rkm said:
did you get rid of the original definition above? From what
I remember, you can't redefine an existing property in ant,
and if you don't pass it the -verbose flag or some such
flag, it might not tell you anything's wrong.

I hate ant. I've spent days, after reading the Sam's Ant
book, trying to get some scripts to work. I finally coded
up what I wanted in java in an afternoon and had ant call
it. Way simpler, predictable, and debuggable. Why did
someone think wrapping it all in xml was going to make it so
wonderful? It's the most bloated bunch of tag syntax I've
ever had to deal with. Awful.

Rick

It seems kinda neat when it works. Its slow as hell. I'm not a big fan of
xml in general. I think xml is slow, and bloated as well. It does seem
pretty cool for larger projects (I guess, I you can ever get it to work).
 
J

Jon A. Cruz

Miguel said:
It seems kinda neat when it works. Its slow as hell. I'm not a big fan of
xml in general. I think xml is slow, and bloated as well. It does seem
pretty cool for larger projects (I guess, I you can ever get it to work).

That speed problem is not due to XML. I'm not so familiar with the
internal guts of Ant, but I know that the actual file IO on it is almost
trivial and non-measurable for most things.

For example, a while back I did a quick tool to process some XML. Just
over a thousand files. It only took 3 seconds to read in, process and
summarize all of them. I think Ant usually deals with less than 1,000
files. :)



If you want a little insight into the kind of thing that can slow down a
build process, read "Recursive Make Considered Harmful"
http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html
 
R

Rasputin

It's much better than make though. Don't know the Sams book, the Manning
one is brilliant.
 
R

rkm

Rasputin said:
(e-mail address removed) wrote in comp.lang.java.programmer:

It's much better than make though. Don't know the Sams book, the Manning
one is brilliant.

Can't recommend the Sams book, I have numerous corrections
penciled in. They need to hire better editors or proof
readers, whoever's job it is to find mistakes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top