A Seemingly pointless target
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Eamonn_Costello
Posted On:   Monday, September 3, 2007 08:10 AM

I'm working on a buildfile with the following target in it: if="strict" name="strict" unless="file.application.model.xml" > All this seems to do is run itself if "file.application.model.xml" is NOT set. "strict" only appears a a target name, and not a property. The target doesn't do anything else, so why does it exist int the first place? Other targets in the build file have it as a dependency. What gives? If anybody has seen this type of construct I would appreciate some feedback!! TIA Eamonn    More>>

I'm working on a buildfile with the following target in it:



if="strict"
name="strict"
unless="file.application.model.xml"
>


All this seems to do is run itself if "file.application.model.xml" is NOT set.
"strict" only appears a a target name, and not a property.
The target doesn't do anything else, so why does it exist int the first place?
Other targets in the build file have it as a dependency.
What gives? If anybody has seen this type of construct I would appreciate some feedback!!
TIA

Eamonn

   <<Less

Re: A Seemingly pointless target

Posted By:   Robert_Lybarger  
Posted On:   Monday, September 3, 2007 09:24 PM

I'm guessing someone thought that if they depend'ed lots of other targets on this one, and the 'if' wasn't satisfied, then those other targets wouldn't get run. But I don't think that's the way Ant behaves. But Ant never works how I expect, even after years of banging my head against it... so I'd have to try a mock/demo project (full of echo tasks) to really see what was happening. So that's just my guess.
About | Sitemap | Contact