Is it possible to get "location semantics" with

2013-12-11 Thread Cyril Sagan
I don't think it is possible, but I wanted to confirm here. My goal is to be platform agnostic, and not get mixed separators in path names, in order to accomplish this I don't think I can use . While I prefer to use "pure ant", in this case I think the is better than lots of ${path.separtor}'s i

"Cloning" macrodef

2013-09-27 Thread Cyril Sagan
I had previously posted a question asking about macro scoping, I thought the community might be interested in my solution, perhaps the Ant experts can tell me how dangerous of a hack it may be? (I'm on Ant 1.7.0, and cannot up-rev) First, restating my question: Subject: "scoping" for macro de

"scoping" for macro definitions?

2013-09-26 Thread Cyril Sagan
Is there a way to override a macro defined from a library I cannot control, my goal is to provide a local implementation, but not have to change all the callers. I'm stuck on Ant 1.7.0, and cannot update. How could I "fake out" a scoping mechanism to accomplish something like: or I tried using

does not "preservelastmodified" on directories.

2011-10-13 Thread Cyril Sagan
My goal is to copy a directory tree, and preserve the last-modified-time of all the files and *directories* in the copied tree. Through my research through the Ant manual, mailing lists, and bug database I find no mention of this being possible, or reported previously as an enhancement request.

Re: Conditional import?

2010-09-16 Thread Cyril Sagan
The only way we've found to accomplish this is with from ant-contrib. Using your example: Hope this helps. --Cyril On Thu, Sep 16, 2010 at 12:03 AM, Stefan Bodewig wrote: > On 2010-09-15, John W. Lewis wrote: > > > Can imports go in targets? > > No. > > Ant needs t

Accessing "components" of fileset refid?

2009-07-02 Thread Cyril Sagan
*SUMMARY: Is there any Ant interface to the "components" of a fileset reference?* Consider this Ant snippet: The "my_files" reference should encompass all the state of the fileset to which it refers. As such, I should be able to get properties of the fil

How can I "conditionall chooise" a target implementation?

2008-05-28 Thread Cyril Sagan
PROBLEM: I'm trying to develop a general build framework. In so doing, I need some mechanism for to provide a "conditional implementation" for a target. We cannot solve this problem using . Can anyone suggest an implementation? Here's a couple ways that I tried,

Using to set a property with "location" semantics?

2008-05-23 Thread Cyril Sagan
Has anyone else ever wished there was a way to specify "location semantics" for values? Given that doesn't exist, can anyone suggest the ideal way to implement: $ cd /tmp/X/Y/script/ $ cat build.xml some.dir: ${some.dir} $ ant -Ds

RE: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Cyril Sagan
You could also use beanshell. Not sure if this works due to a bug or feature. We use it very sparingly in our build process (analagous to like goto in C). inside macro: ${myvalue}

RE: Returning properties

2008-01-02 Thread Cyril Sagan
Troy - You're having *exactly* the same problem I had three weeks ago. Here's the full thread from suggestions I got: http://www.opensubscriber.com/message/user@ant.apache.org/8193149.html The best solution I came up with was to use ant-contrib's , it can take a list of properties to return va

RE: How to conditionally run a group of targets?

2007-12-14 Thread Cyril Sagan
p://ant.apache.org/manual/CoreTasks/conditions.html Hope it helps, Dmitri. Cyril Sagan wrote: > Our build script needs to run an arbitrary *group* of targets based on > a single property. Can you help me find a clean way to do this? > > Here's an "almost solution&q

RE: How to conditionally run a group of targets?

2007-12-14 Thread Cyril Sagan
__ From: Scot P. Floess [EMAIL PROTECTED] Sent: Thursday, December 13, 2007 9:46 PM To: Ant Users List Subject: Re: How to conditionally run a group of targets? Why don't you try this... The point is, the depends attribute acts as your grouping ;) Cyril Sagan wrote: >

How to conditionally run a group of targets?

2007-12-13 Thread Cyril Sagan
Our build script needs to run an arbitrary *group* of targets based on a single property. Can you help me find a clean way to do this? Here's an "almost solution" which illustrates what I'd like to accomplish:

Query definition of target?

2007-09-17 Thread Cyril Sagan
Our Ant build logic would be much cleaner if there was a way to determine if a particular target was overriden. Does anyone know how to check for the existence/definition of a specified target name? Ideally, we'd like to have something like this: I searched all the resouces

RE: replace an entry in a zip file?

2007-06-14 Thread Cyril Sagan
Thanks for your reponse. However, this does not work for me in Ant 1.6.5. Note that my goal is to *replace* a file that's already in the zip. Seems like the best solution would be for the duplicate attribute to support a "replace" option. FWIW, I'm doing this to control my jar manifest. I can'

replace an entry in a zip file?

2007-06-14 Thread Cyril Sagan
GOAL: To replace one entry in a zip file with an updated file. I cannot find an elegant way to do this, short of 'ing the archive, replacing the file of interest and then re-. It seems there should be a better way. Can anyone help? Thanks. --Cyril FWIW, It looks like the Ant 1.6.5 source c

: add arbitrary set of properties?

2006-01-26 Thread Cyril Sagan
In our current java build process, we'd like to be able to allow users to add arbitrary items to the jar manifest. But, 1) we won't know the attribute names, and 2) some builds will have these "extra" manifest, some won't. In the ideal solution, the build.xml would look something like this:

bug of feature?

2005-12-03 Thread Cyril Sagan
I was a bit confused with the behavior of dirname when the file property was that of an unset parameter. QUESTION: Is this a bug of feature? Here's my full example: $ cd /tmp/Ant_Mystery $ ant -version Apache Ant version 1.6.5 compiled on June 2 2005 $ cat build.xml

woes!

2005-02-28 Thread Cyril Sagan
I'm loosing my mind trying to get Ant to delete a directory! I thought this was easy, until I was sent a path property that included multiple directory components. The obvious was working: ...until I was given a path in the form "dirX/dirY". The result was to remove "dirY" and all its con