ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Concatenate strings?
Date Fri, 23 Jul 2004 18:37:04 GMT
> From: Matt Benson [mailto:gudnabrsam@yahoo.com]
> 
> --- "Alexey N. Solofnenko" <A.Solofnenko@mdl.com>
> wrote:
> > Why would not they use <scriptdef> instead?
> >
> 
> Guess he didn't think of that?  ;) IIRC <scriptdef>
> was tacked onto 1.6.0 fairly late, so maybe it just
> didn't receive proper acclaim...

<script>, <scriptdef>, <macrodef> it's all pretty much the same. The only
time I ever needed the current target name is in <subant>, and it's built-in
to my <subant> version if an explicit target name is not specified (but
absent from the Ant <subant>, removed by Steve). --DD

With bsh.jar and rhino.jar in Ant's classpath, you can do:

  <script language="javascript">
    name = self.getOwningTarget().getName();
    self.getProject().setNewProperty("targetname", name);
  </script>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message