--- Sean LeBlanc <[EMAIL PROTECTED]> wrote: > What I want to do is to force at least one "arg" to be present, so > I can define a branch of things to happen. What's the cleanest way > to do this? > > I want something like: > > ant (foo|bar) <other targets...> > > but I want the build to exit if foo or bar do not exist on the command > line.
You'd need to have either a .antrc (if you're *nix-based) file in everyone's $HOME (or modify the 'ant' script to look for an rc file in some more generalized location) that verifies the 'ant' command line, or you'd need to either modify the script to do the verification, or put a wrapper on top of the Ant wrapper script. As an example of an rc file that does arg verification, see: http://marc.theaimsgroup.com/?l=ant-user&m=101364053529833&w=2 > I've tried some things (they didn't seem very elegant to me), but I > ended up having troubles with the <fail> task. It says that unless > is not a supported attribute? What gives with this? I'm not sure how you'd be using <fail> to deal with command-line args in the first place, but as to the error, if/unless for <fail> is new to Ant1.5. Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
