From: Scott H. <sk...@eo...> - 2002-06-27 20:13:36
|
True. I can add this test to the new 'if' task (named 'if' until a new names is found). It would work something like this: <if targetexists="targetname"> <do.stuff/> </if> The other attribute tests I have are propertytrue, and propertyexists. I also plan to add fileexists, fileempty, directoryexists, directoryempty, etc. Are there any others that make sense? > -----Original Message----- > From: nan...@li... [mailto:nant-developers- > ad...@li...] On Behalf Of Kevin Dente > Sent: Thursday, June 27, 2002 11:54 AM > To: Scott Hernandez > Cc: 'Nant developer's list' > Subject: RE: [nant-dev] Calling a target if it exists > > Hmm, true, but then if the target does exists, gets > called, and fails, the build won't fail, right? > > > > --- Scott Hernandez <sk...@eo...> wrote: > > There is no way to check but this should work > > > > <call target="name" failonerror="false"/> > > > > This will call, but not fail... :) > > > > > -----Original Message----- > > > From: nan...@li... > > [mailto:nant-developers- > > > ad...@li...] On Behalf Of Kevin > > Dente > > > Sent: Thursday, June 27, 2002 11:24 AM > > > To: Nant developer's list > > > Subject: [nant-dev] Calling a target if it exists > > > > > > Sorry if I'm missing something obvious, but is > > there a > > > way to call a target only if it is defined? Most > > of > > > the conditional stuff seems to be around property > > > values set to true or false. > > > > > > What I'm doing is creating a build file which sets > > up > > > some default targets and will get included via the > > > Include task. I'd like to call a target if it's > > > defined in the merged project, but skip it if it > > isn't > > > there. I can fall back to setting a property if I > > have > > > to, but I'd rather not if there's a cleaner way. > > > > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Yahoo! - Official partner of 2002 FIFA World Cup > > > http://fifaworldcup.yahoo.com > > > > > > > > > > > > ------------------------------------------------------- > > > Sponsored by: > > > ThinkGeek at http://www.ThinkGeek.com/ > > > _______________________________________________ > > > Nant-developers mailing list > > > Nan...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/nant-developers > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > > ------------------------------------------------------- > Sponsored by: > ThinkGeek at http://www.ThinkGeek.com/ > _______________________________________________ > Nant-developers mailing list > Nan...@li... > https://lists.sourceforge.net/lists/listinfo/nant-developers |