Stefan Bodewig | 3 Jul 07:04 2015

[ANN] Apache Ant 1.9.6 Released

The Apache Ant Team is pleased to announce the release of Apache Ant

Version 1.9.6 fixes a regression in Ant's zip package introduced with
Ant 1.9.5.

Apache Ant is a Java library and command-line tool that helps building

Source and binary distributions are available for download from the
Apache Ant download site:

When downloading, please verify signatures using the KEYS file available
at the above location when downloading the release.

Changes in this version include:

Fixed bugs:

 * ArrayIndexOutOfBoundsException when ZIP extra fields are read and
   the entry contains an UnparseableExtraField.

Other changes:
(Continue reading)

xeonmailinglist-gmail | 15 Jun 09:46 2015

Re: confirm unsubscribe from user <at>

On 06/15/2015 08:46 AM, user-help <at> wrote:
> Hi! This is the ezmlm program. I'm managing the
> user <at> mailing list.
> I'm working for my owner, who can be reached
> at user-owner <at>
> To confirm that you would like
>     xeonmailinglist <at>
> removed from the user mailing list, please send a short reply
> to this address:
> <at>
> Usually, this happens when you just hit the "reply" button.
> If this does not work, simply copy the address and paste it into
> the "To:" field of a new message.
> or click here:
> <at>
> I haven't checked whether your address is currently on the mailing list.
> To see what address you used to subscribe, look at the messages you are
> receiving from the mailing list. Each message has your address hidden
> inside its return path; for example, mary <at> receives messages
> with return path: <user-return-≤number> <at>
(Continue reading)

Stefan Bodewig | 14 Jun 19:08 2015

Re: WELCOME to user <at>

[please don't drop the user list from replies]

On 2015-06-14, aalok singhvi wrote:

> When i use verbose to print errors.... its gives certain info as follows...

> It errors out on ant taskdef delete handle
> line 720, 769 765 and 586.

It owuld be better if you could paste the full stack trace - and even
more important - tell us the exact version of Ant you are using (output
of "ant -version")

> I am on Win7.

On Windows files may be locked by processes that have opened it - which
includes Ant itself, so this means you may run into trouble of you try
to remove something that has been touched by Ant before.

> I am deleting this file before it is copied over to the project and used in
> classpath.

If it was part of your CLASSPATH environment variable, Java would load
it when starting Ant and there is no chance for Ant to remove it.

I'm not sure how you copy the file after you've deleted it :-)

If you copy the file (using Ant) before trying to delete it, the file
may still be considered open by Windows.  This is a known problem and
Ant tries to work around it by registering the file as "deleteOnExit".
(Continue reading)

aalok singhvi | 13 Jun 18:29 2015

Re: WELCOME to user <at>


I am working on a project where i am not able to delete certain files using
ant 1.7. I saw some bug with ant 1.7 where the suggestion was to use ant
1.8 version. My project is built out in 1.7 and it will be a big change to
built it out in 1.8. For a test i tried to use ant 1.8 to delete a file but
it is saying " Unable to delete a file.......". When i did -verbose it
fails on ant.taskdef.delete......method in ant. Any work around. The file
name i am trying to delete is aspectj1.6 specifically. Any thoughts.


On Thu, Jun 11, 2015 at 8:51 PM, <user-help <at>> wrote:

> Hi! This is the ezmlm program. I'm managing the
> user <at> mailing list.
> I'm working for my owner, who can be reached
> at user-owner <at>
> Acknowledgment: I have added the address
>    aaloksinghvi <at>
> to the user mailing list.
> Welcome to user <at>!
> Please save this message so that you know the address you are
(Continue reading)

Stefan Bodewig | 4 Jun 06:16 2015

[ANN] Apache Ant 1.9.5 Released

The Apache Ant Team is pleased to announce the release of Apache Ant

Version 1.9.5 is mostly a bug fix release but adds a few new features
like new resource collections allbutlast/allbutfirst that complement the
existing first/last collections.

Apache Ant is a Java library and command-line tool that helps building

Source and binary distributions are available for download from the
Apache Ant download site:

When downloading, please verify signatures using the KEYS file available
at the above location when downloading the release.

Changes in this version include:

Changes that could break older environments:

 * The ReplaceTokens filter can now use token-separators longer than
   one character.
   Bugzilla Report 56584

 * The changes that added <get>'s support for gzip encoding
(Continue reading)

WebServices Development | 25 May 13:58 2015

Extracting individual tokens after using stringtokenizer

I am trying to extract individual tokens in ANT after using stringtokenizer to separate the tokens out.  Is
it possible? How do I do it without using any other external ant libraries like ant-contrib?

I attempted to do below, but am stuck at extracting individual tokens

<property name="dirlist" value="./src:./.apt_generated:abc" />
<loadresource property="dirseplist">
      <string value="${dirlist}" />
            <stringtokenizer  delims=":" id="dirliststr"/>
            <replaceregex pattern="(.+)" replace="[\1]" />
<echo level="info" message="dirlist: '${dirlist}'" />
<echo level="info" message="dirseplist : '${dirseplist}'" />

And the output is
     [echo] dirlist: './src:./.apt_generated:abc'
     [echo] dirseplist : '[./src]:[./.apt_generated]:[abc]'


This email transmission and any accompanying attachments may contain CSX privileged and confidential
information intended only for the use of the intended addressee. Any dissemination, distribution,
copying or action taken in reliance on the contents of this email by anyone other than the intended
recipient is strictly prohibited. If you have received this email in error please immediately delete it
and notify sender at the above CSX email address. Sender and CSX accept no liability for any damage caused
directly or indirectly by receipt of this email.
(Continue reading)

Christopher BROWN | 16 May 15:38 2015

How should an Ant <fileset> be created programmatically from another (custom) Ant task?


I've developed a few custom Ant tasks over time, but I need a little help
doing something specific to Ant's data types.  I've created a task that
retrieves a set of files from a server, but the names aren't known in
advance, they're determine during execution of the task.  I'd like to
create a fileset that has an ID and can be referred to later on by other
tasks and targets in the build.

This is how I assumed I'd get started:

FileSet fs = new FileSet();

I've some doubts about the "createInclude" logic... but I haven't got that
far yet.  I'm stuck on the "setId()" part which just doesn't exist.

In a build script, I'd write:

<fileset id="someid" dir="somedir">
  <include name="relative/path/to/file" />

... then refer to it later with "refid".

How can I get this to work?
(Continue reading)

Dilini Asanga | 9 May 11:45 2015

Ant does not return after calling org.glassfish.tyrus.client.ClientManager.connectToServer()


I have a main class which I want to run using an ant script. 
(I have attached the project, which includes this main class: WebsocketLocalClient; and the ant script I'm referring to)

This main class executes fully, when I'm running it through the command line.

But when I run it using the ant script, it executes upto,
System.out.println("Starting Websocket-local publisher");

but does not execute beyond the line:
client.connectToServer(new WebsocketLocalEndpoint(), cec, new URI(socketServerUrl));

Ant output is given in attachment-1. 
It does not execute anything after printing the log '[java] Starting Websocket-local publisher'

It seems that,
ant does not return after calling org.glassfish.tyrus.client.ClientManager.connectToServer() method.

Any clues as to why this is happening?

Appreciate any help.

dilini <at> dilini-Latitude-E6540:~/github/product-cep/modules/samples/producers/websocket-local-client$ ant
Buildfile: /home/dilini/github/product-cep/modules/samples/producers/websocket-local-client/build.xml


    [javac] /home/dilini/github/product-cep/modules/samples/producers/websocket-local-client/build.xml:58: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
     [copy] Copying 1 file to /home/dilini/github/product-cep/modules/samples/producers/websocket-local-client/temp/classes

     [echo]  Configure -Durl=xxxx -Dtopic=xxxx and (-DfilePath=xxxx and/or -Dsn='sample number') 
     [java] Starting Websocket-local publisher

To unsubscribe, e-mail: user-unsubscribe <at>
For additional commands, e-mail: user-help <at>
John J. Hughes II | 27 Apr 18:26 2015

tools.jar not found


I have searched online and can't fine and answer so please bear with me.

When I run ANT it says it can't find tools in the JRE lib, why is it looking

If I copy tools.jar from the JDK to the JRE lib it works fine but that will
break on the next update so I would prefer to fix it correctly.

I have rebooted and retested.

There are no extra JDK or JRE values in the path, path simplified to only
show useful values.

I dumped the SET values to text files and search and don't fine any
references to JRE there either.

In settings: 

PATH = .;%JAVA_HOME%\bin;%ANT_HOME%\bin;

Converts to: 

PATH  = .;C:\Program


JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05

C:\Projects>SET ANT_HOME



C:\Projects>ant -version

Unable to locate tools.jar. Expected to find it in C:\Program

Apache Ant(TM) version 1.9.4 compiled on April 29 2014 

So what am I doing wrong, thanks.


Stranzenbach, Ralf | 14 Apr 10:50 2015

Acessing ANTs execution graph


i have a fairly complex build system that recently introduces some additional compexity. To describe my
problem, i'll sketch a very simplified Ant build:


    <target name="clean" depends="-clean" />

    <extension-point name="-clean" />

    <target name="init" depends="-init" />

    <extension-point name="-init" />

    <target name="compile" depends="-compile" />

    <extension-point name="-compile" depends="-init" />

    <target name="install" depends="-install" />

    <extension-point name="-install" depends="-compile" />

    <target name="recompile" depends="-recompile" />

    <extension-point name="-recompile" depends="-clean, -compile" />


This basic structure of the ANT file is required, because all extension-points are extended by specific
implementatiosn for various implementation languages (including PL/I and COBOL).

This way i was able to maintain structured and standardized procedures, to generate the artifacts based on
the varous sources.

Recently we tried to include that "recompile" step, that introduces a different "clean" semantic.
Therefore i've implemented the "clean semantics as follows:

    <target name="std-clean" extensionOf="-clean">

        <echo>Std. Clean</echo>


    <target name="recompile-clean" extensionOf="-clean" if="is.Recompile" >

        <echo>Additional behaviour for recompile</echo>


    <target name="-recompile-switch">

        <property name="is.Recompile" value="true" />


And the "-recompile" Target was extended this way:

    <target name="recompile" depends="-recompile-switch, -recompile" />

While this solution - in principle - activates "-recompile-switch" just before executing "-clean", this
is not guaranteed by ANT. The ANT documentation states, that this dependcy declaration just states, that
"-recompile-switch" will be activated BEFORE recompile executes, but it does not guarantee the order of
execution for "-recompile-switch" and "-recompile".

In my case, the "-clean" targets activates, before "-recompile-switch" has any chance to execute.
(Sometime it works, sometime it fails. But it's backed by ANTs definition.)

Now my question(s):


    Are there any ways to define the order of execution to guarantee an optional task just like
"-recompile-switch" to execute at the right moment?

    Is there any way using the Java API to the ANT core to inspect the execution graph?
    Instead of injecting a target setting switch into the execution graph, it might by suitable to look up the
chain of target execution to get an idea wich main target is active.

Unfortunately it is impossible to manipulate the execution graph at runtime, conditionally <import>ing
different extesions.

A interim solution using <antcall> is in place.

    <target name="recompile">

        <antcall target="-recompile" inheritAll="true">

            <param name="is.Recompile" value="true" />



But ths solution requires a complete re-evaluation of the complete set of ANT build filles which takes a
long time and is not applicable in any case.

Mit freundlichen Grüßen,

Ralf Edmund Stranzenbach
Manager, FS-Technology

Management & Technology Consultants

Karl-Arnold-Platz 1
Düsseldorf 40474

T + 49 211 17143 6038
C + 49 174 3075 211
F + 49 211 17143 6060
BearingPoint GmbH
Geschäftsführer: Marcel Nickler (Vorsitzender), Hans-Werner Wurzel (stellv. Vorsitzender),
Kiumars Hamidian, Matthias Loebich, Kai Wächter, Dr. Robert Wagner
Vorsitzender des Aufsichtsrats: Beat Leimbacher
Sitz: Frankfurt am Main
Registergericht: Amtsgericht Frankfurt am Main HRB 55490

The information in this email is confidential and may be legally privileged. If you are not the intended
recipient of this message, any review, disclosure, copying, distribution, retention, or any action
taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended
recipient, please reply to or forward a copy of this message to the sender and delete the message, any
attachments, and any copies thereof from your system.
Joseph Kesselman/Watson/IBM | 27 Mar 14:26 2015

Wishlist item: Resource macros

Macrodef very explicitly says that the macro invocation is treated as a 

Unfortunately, I need macros to simplify gathering resources, so macrodef 
doesn't help me.

So I'm requesting <resource-macrodef> and <resource-macro> -- just working 
names, I'm sure something better exists -- which are isomorphic with 
Macrodef but have invocations that are typed as Resource Collections. 
Syntax could be almost identical, but use <union> in place of <sequential> 
as the body element.

Or, perhaps better, just modify macrodef so it recognizes when its body is 
a union rather than a squential and changes its type (and the type of its 
invocation) appropriately.

(Personally, I really wish that you'd left macros as pure syntactic 
operations rather than constraining them to be tasks in the first place... 
but since that decision was made, I think you need to "drop the other 
shoe" and give us the resources equivalent.)

"Everything should be as simple as possible. But not simpler." -- 
attributed to Albert Einstein