ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject Call-Stack of a target (WAS Ant property ant.java.version how does Ant detect this property?)
Date Tue, 18 Mar 2008 06:00:55 GMT
So something like that?
   <project>
      <target name="foobar" depends="foo,bar"/>

      <target name="foo" depends="-one,-two"/>
      <target name="bar" depends="-one,-two"/>

      <target name="-one">
          <!-- from which target was I called? -->
      </target>
      <target name="-two"/>
   </project>

$ant foo     --> -one,-two,foo
$ant bar     --> -one,-two,bar
$ant foo bar --> -one,-two,foo,-one,-two,bar
$ant bar foo --> -one,-two,bar,-one,-two,foo
$ant foobar  --> -one,-two,foo,bar,foobar


Jan 

> -----Ursprüngliche Nachricht-----
> Von: David Weintraub [mailto:qazwart@gmail.com] 
> Gesendet: Montag, 17. März 2008 19:26
> An: Ant Users List
> Betreff: Re: Ant property ant.java.version how does Ant 
> detect this property?
> 
> You know, there's one that I'd really love to have, but Ant doesn't
> seem to have: What target was Ant itself executing when called. For
> example, I have an build.xml with two external targets: "foo" and
> "bar". Both "foo" and "bar" are dependent upon targets "barfu" and
> "fubar". It would be nice to be able to find out when the tasks
> "barfu" or "fubar" are being executed whether the original task was
> "foo" or "bar".
> 
> I can get around this by using the <antcall> task, but that destroys
> the way Ant automatically determines the build order.
> 
> On Mon, Mar 17, 2008 at 1:32 AM,  <Jan.Materne@rzf.fin-nrw.de> wrote:
> > Ant retrieves all system properties - means all properties 
> System.getProperties() returns.
> >
> >   http://ant.apache.org/manual/using.html#built-in-props
> >   "Ant provides access to all system properties ... For a 
> list of system properties see
> >   the Javadoc of System.getProperties."
> >
> >
> >  Jan
> >
> >  > -----Ursprüngliche Nachricht-----
> >  > Von: David Brown [mailto:david@davidwbrown.name]
> >  > Gesendet: Montag, 17. März 2008 03:34
> >  > An: user@ant.apache.org
> >  > Betreff: Ant property ant.java.version how does Ant detect
> >  > this property?
> >
> >
> > >
> >  > Hello Steve and all the Ant gurus and users. I know the Ant
> >  > built-in property: ant.java.version is an property detected
> >  > by Ant. Does Ant detect this property from some ubiquitous
> >  > environment variable such as: JAVA_HOME? I have several JDKs
> >  > installed: 1.4.x, 1.5.x, 1.6.x etc. What is needed to get Ant
> >  > to detect a different Java version? Please advise, David.
> >  >
> >  > 
> ---------------------------------------------------------------------
> >  > 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
> >
> >
> 
> 
> 
> -- 
> --
> David Weintraub
> qazwart@gmail.com
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message