ant property file

Discussion in 'Java' started by Miguel De Anda, Jun 27, 2003.

  1. 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?
     
    Miguel De Anda, Jun 27, 2003
    #1
    1. Advertising

  2. "rkm" <> wrote in message
    news:...
    > Miguel De Anda wrote:
    > > 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?
    > >
    > >

    >
    > 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).
     
    Miguel De Anda, Jun 28, 2003
    #2
    1. Advertising

  3. Miguel De Anda

    Jon A. Cruz Guest

    Miguel De Anda wrote:
    > 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
     
    Jon A. Cruz, Jun 28, 2003
    #3
  4. Miguel De Anda

    Rasputin Guest

    wrote in comp.lang.java.programmer:

    >
    > "rkm" <> wrote in message
    > news:...
    >> Miguel De Anda wrote:
    >> > 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?
    >> >
    >> >

    >>
    >> 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.


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

    --
    Rasputin :: Jack of All Trades - Master of Nuns
     
    Rasputin, Jul 3, 2003
    #4
  5. Miguel De Anda

    rkm Guest

    Rasputin wrote:
    > 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.
     
    rkm, Jul 4, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Bedford
    Replies:
    6
    Views:
    2,245
  2. john martin
    Replies:
    2
    Views:
    2,221
    john martin
    Apr 7, 2005
  3. Replies:
    1
    Views:
    509
    Larry
    Mar 7, 2006
  4. Replies:
    6
    Views:
    877
  5. kevin  cline
    Replies:
    2
    Views:
    2,401
    Gilbert Rebhan
    Jul 26, 2008
Loading...

Share This Page