ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Concatenate strings?
Date Fri, 23 Jul 2004 18:37:04 GMT
> From: Matt Benson []
> --- "Alexey N. Solofnenko" <>
> 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);

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

View raw message