ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Target/flag inconsistency resolution
Date Thu, 27 Jun 2002 13:02:15 GMT

I want ant to ignore the value of a certain flag whenever a particular
target is being built.  E.g., consider this:

  <target name="baz" depends="dist">
  // yadda-yadda-yadda

  <target name="dist" depends="foo">
  // yadda-yadda-yadda

  <target name="foo" unless="nofoo">
  // but the value of nofoo should be ignored if we are in the
  // process of building baz!
  // yadda-yadda-yadda

When I execute plain old "ant" I get foo first and then dist; and when
I execute "ant -Dnofoo=true", I get just dist.  This is fine.  But if
I execute "ant baz -Dnofoo=1", I want to ignore the -Dnofoo=1 flag and
build foo anyway.  In other words the target baz is inconsistent with
a non-null nofoo, and this inconsistency should be resolved in favor
of unsetting nofoo.  How can I implement this?



P.S. Please Cc: me in replies.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message