WebServices Development | 2 May 11:16 2014

Ant javac task - error doesn't fail the build

We have an ANT javac task which generates an error like below, but the build doesn't return build failure.  It
shows successful completion.  What change do I have to make so that it will return failure?

558	4/28/14 1:09 PM		EXEC	    [javac] error: error reading
/view/dev_view/vob/comp/project/WebContent/WEB-INF/lib/somejar.jar; zip file is empty


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.

executable="/usr/bin/cp" cannot access PATH/*

Hi all,

I'm a new member of this mailing list.
I'm using ANT in a build.xml of a Hudson Job.

I want to copy several file from one directory to another one. Just the files inside, not the parent directory.
I'm using the next code:

<exec executable="/usr/bin/cp" failonerror="true">
                <arg line="${workspaceView.DOCS }/*"/>
                <arg line="${workspaceView.PDFS}/"/>

The output is:
cp: cannot access /hudson/.hudson/jobs/workspace/DOCS/*

Is it possible to use the (*) to copy several files as you can do by command line?


Alberto García Pérez

Miller, Gerald | 24 Apr 15:36 2014

Silent errors

It turns out I'm not the only one here who simply modifies existing build files, although I have managed to
exclude descendants of an included fileset dir attribute.  When I asked why a non-existent Main-Class
value wouldn't generate an error and, at least on one installation, still allow the correct one (and
others not mentioned) to be accessed by their correct names.  This lack of error messages, in contrast to
compilers that warn about the most trivial things, doesn't help with diagnosing why one workspace is able
to build a valid jar, while another while a copy possibly using different versions of Eclipse and Ant
produces a jar that can't find the main class.  There are all kinds of threads about this problem, all with
different suggestions.  I could spend a lot of time trying them if I were so inclined, but most of their
examples don't even resemble my build file.  Any idea if this is a red herring or not?  Thanks.

This communication, along with its attachments, is considered confidential and proprietary to
Vistronix.  It is intended only for the use of the person(s) named above.  Note that unauthorized
disclosure or distribution of information not generally known to the public is strictly prohibited.  If
you are not the intended recipient, please notify the sender immediately.
Marcel Stör | 19 Apr 23:47 2014

Have junitreport load styles from JAR

Looking at the source of 
I see no way I could pack my style sheets into a JAR file and reference 
them in the junitreport.report.styledir parameter.

Is that assumption correct?

I'd need something like this:
<junitreport todir="...">
   <report styledir="jar://c:/my.jar/foo" format="noframes" todir="..."/>
   <fileset dir="....">
     <include name="**/*.xml" />

Context: I use the junitreport task in a Maven build (similar to 


Marcel Stör, http://frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Edoardo Vacchi | 15 Apr 09:10 2014

ClassLoader classpath of a TaskDef'd task

My taskdef'd task uses
to load dynamically a series of classes *during* the execution of the task
itself. These classes are actually the same jar of the task implementation.

Now, if I put my jars in ~/.ant/lib the task works. If I use
<taskdef ...>

where classpath points to the ./lib/* folder of the project, the task *is*
found, but the classloader fails to load the classes. I suppose that ant is
changing the classloader for the task's thread. How can I pass the
<classpath/> information down to the task's classloader?

hwpstorage | 25 Mar 15:30 2014

Maven Ant Plugin question


Sorry for the crossing post.
I tried to use maven to genterate build.xml for ant.
Use command
 mvn ant:ant
will generate build.xml and maven-build.xml, which can be used by Ant.

my problem is
everytime runs ant compile
it will download everything from every repository.

for example, for this jar file parquet-format-1.0.0.jar
I got error, it tries every repository.
      [get] Getting:
      [get] To:
      [get] Getting:
      [get] To:
      [get] Error opening connection java.io.FileNotFoundException:
      [get] Error opening connection java.io.FileNotFoundException:
      [get] Error opening connection java.io.FileNotFoundException:
      [get] Can't get
(Continue reading)

Tony Anecito | 5 Mar 22:03 2014

Ant on Mac OS X

Hi All,

I am new to Mac OS X. What is the easiest way to get Ant running on OS X? I tried copying my ant folder from Windows
to Mac OS X and it would not run.

Knuplesch, Jürgen | 25 Feb 16:07 2014

create a new fileset in Java and in Ant Task


I want to create a new fileset inside a ANT-Task using this:

      FileSet createdFileset = new FileSet();
      createdFileset.setDir(new File(basedir));

When I do this to get the files:


I get a NPE.

What else do I need to do to set up a new fileset?
Cant find it somewhere else )-:


Juergen Knuplesch


Application Development

icon Systemhaus GmbH

        Tel. +49 711 806098-275

Hauptstätter Straße 70
(Continue reading)

Mahmood Naderan | 23 Feb 12:12 2014

Installation question

I have read the manual on how to install Ant (https://ant.apache.org/manual/install.html). However
there are some confusing steps so I will appreciate any answer for my problem

I have run 


ant -f fetch.xml -Ddest=system
I want to know, is that all? I see that subsequent steps are optional.
 How can I check if
 ant is installed correctly?

Edwin Castro | 13 Feb 22:26 2014

How to merge jars and directories specified by path resource into a single jar

I have a handful of paths defined as

<path id="class.libs">
    <pathelement location="blah/blah.jar"/>

<path id="class.dirs">
    <pathelement location="blah/blah"/>

<path id="class.path">
    <pathelement refid="class.libs"/>
    <pathelement refid="class.dirs"/>

I have a need to merge the .class files in the jars and directories
specified by class.libs and class.dirs into a single jar. I can merge
the jars using

<pathconvert property="class.libs" refid="class.libs"/>

<jar destfile="${jar.file}">
    <fileset dir="${classes.dir}" includes="*.class"/>
        <name name="**/*.class"/>
                <path path="${class.libs}"/>
(Continue reading)

Kimpton, C (Chris | 11 Feb 09:21 2014

Resource collections - Linux vs. windows


I have a target that is trying to delete some directories, all but the last few.  It works as expected (I
believe - it deletes files when expected) on my dev box (windows), but is not deleting anything on the build
server (Linux):

It builds up 2 resource collections - one for all directories and one for the last few and then does a delete
based on the difference.

        <resources id="resource-all-dirs">
            <dirset dir="${release-base-dir}" >
                <filename regex="^\d+$" />

        <resources id="resource-last-3-dirs">
            <last count="4">
                    <dirset dir="${release-base-dir}" >
                        <filename regex="^\d+$" />
                    <date />

        <delete verbose="true">
                <resources refid="resource-all-dirs"/>
                <resources refid="resource-last-3-dirs" />
(Continue reading)