Dmitri - Thanks for the response, but this does not work. The problem is that state (properties) set by the target of an will not be available to the calling environment. I'm still looking for an elegant solution. --Cyril ________________________________________ From: Dmitri Farafonov [farafonov@gmail.com] Sent: Thursday, December 13, 2007 8:07 PM To: Ant Users List Subject: Re: How to conditionally run a group of targets? You can use "if" from ant-contrib: http://ant-contrib.sourceforge.net/tasks/tasks/if.html .... All possible "if" conditions are here: http://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" which illustrates what I'd like to > accomplish: > > > > > > > > > > > > > > > > > > > > This does not work. The problem is that any properties set in the > 'd targets will not be visible in the calling environment. > Targets A,B,C,etc -- not all of which I control, so I cannot > restructure -- may have side effects, setting state in properties that > I need to have access to. > > Regarding the " almost solution", I see that there are ways > to pass properties "down to" , but I do not know of a clean > way to "pass back". I found a year+ old question on ant-dev asking > about this, but never saw an answer. > > In any case, we aren't set on using (enhancing?) , it was > just close to a solution. > > Goal is to group the set of targets. I'm hoping to find a solution > less awkward than this: > > > > > > Thanks for any suggestions. > > --Cyril > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org