KARR, DAVID | 30 May 01:11 2014
Picon

How to gracefully not use a feature if the task jar isn't present?

I'm trying to implement an optional feature in a build script that utilizes the "xmltask" jar. To be less
intrusive, I want the feature to be silently disabled if the xmltask jar isn't available.  I initially
assumed that I would check for the presence of the jar in "$HOME/.ant/lib", but that has a few problems.  I
can get this to work, but I realized that "$HOME" doesn't work for Windows, and "$USERPROFILE" doesn't
work for non-windows.  In addition, someone could conceivably install the jar in $ANT_HOME/lib or
somewhere else.

I'm already using "if:set" on a property that I set if the jar is available, but I'd like that check to be a
little more robust.  I don't see a good way to do that.
Markus Wiesenbacher | 19 May 11:42 2014
Picon

Cannot find symbol (CertAndKeyGen) with JDK8

Hi,

I am trying to compile my classes (which make use of sun.security.tools.keytool CertAndKeyGen) but I am
always getting "cannot find symbol". If I add the JRE-lib folder into my build-script it works. I don´t
know why, as the JDK-lib folder also contains the rt.jar containing the needed classes.

With JDK7 it always worked without that. I am using Ant v1.9.4. Any suggestions?

Thanks and best regards
Markus
Tom Cleghorn | 16 May 16:13 2014

http condition in 1.9.x

Is there an easy method of capturing the exact response when using the 
"http" condition? Given a task like this:

<fail message="HTTP error code returned">
  <condition>
    <not>
      <http url="fakehost"/>
    </not>
  </condition>
</fail>

...it'd be nice, in a project I'm working on at the moment, to be able to 
return more granular error messages than "boo, HTTP error!" and "yay, no 
HTTP error!", but it seems as if the actual response code is only visible 
with -d output.

Thanks!
Stefan Bodewig | 14 May 17:45 2014
Picon

[ANN] Apache AntUnit 1.3 Released


The Apache AntUnit Ant Library provides a test framework for Ant tasks
and types.

AntUnit 1.3 adds new assertions that deal with non-file resources better
than the existing ones of 1.2 and provides additional access to the log
created during tests.

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

http://ant.apache.org/antlibs/bindownload.cgi

and

http://ant.apache.org/antlibs/srcdownload.cgi

Please verify signatures using the KEYS file available at the above
location when downloading the release.

For complete information on the AntUnit, including instructions on how
to submit bug reports, patches, or suggestions for improvement, see the
Apache AntUnit website:

http://ant.apache.org/antlibs/antunit/index.html

Stefan Bodewig, on behalf of the Apache Ant community
Roger Whitcomb | 14 May 02:49 2014

Question about Copy task with empty PatternSet

Hi all,
   I was banging my head against the wall for several hours today on this problem and came up with a tolerable
solution. But I thought I would ask to see if others might have a better solution. 
   The situation is: we have a product that can be built to support several different feature sets. There are
properties set (or not) depending on which features to support. Now a new feature requires some new .jar
files which are not needed by any other feature. I have a PatternSet with these .jar files listed:
<PatternSet id="other-jars">
   <include name="abc*.jar" if="support.abc"/>
</PatternSet>

Now there is a Copy task that is putting stuff in the installation directory that looks like this:
<Copy todir="install/lib">
   <FileSet dir="lib">
      <PatternSet refid="other-jars"/>
   </FileSet>
</Copy>

(I'm not doing a copy/paste here, just from memory, so be easy if there are syntax errors--hopefully you get
the drift.)

Now the problem is: if "support.abc" is not defined, the PatternSet is empty and the FileSet thinks it
should copy everything in the source directory to the target. But what I want is to copy nothing. 

So, any thoughts / suggestions as to how to achieve what I want?

Thanks,
~Roger Whitcomb

P.S. Using Ant 1.9.3 if that makes a difference. 
(Continue reading)

KM | 7 May 17:47 2014
Picon

determine a list of class files to delete based on java files

Hi All,

I need to figure out a way to get a list of the java files in my structure and then delete the corresponding
class files.   for example if I have 2 java files a/one.java  and b/two.java, I want to determine that
the list is:

a/one.java
b/two.java

and then delete from my "output" directory:
output/a/one.class
output/b/two.class

How can I do it?     I tried to delete all of the class files based on the list of java files using a mapper
but it keeps telling me that delete doesn't support the nested mapper element.

Is there an easy way to do this?
KM
Antoine Levy Lambert | 6 May 04:15 2014
Picon
Picon

[ANNOUNCE] Apache Ant 1.9.4 released

The Apache Ant Team is proud to announce the 1.9.4 release of Ant.

Apache Ant is a Java based build tool.

Apache Ant 1.9.4 is a release with many bug fixes and improvements, including :

- the initial support for Java 1.9,
- the possibility to run JUnit tests in multiple threads (when they are forked)
- and the refactoring of Ant's own test suite which is now based on JUnit 4.

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

http://ant.apache.org/bindownload.cgi

and

http://ant.apache.org/srcdownload.cgi

Please verify signatures using the KEYS file available at the above
location when downloading the release.

For complete information on Ant, including instructions on how to submit
bug reports, patches, or suggestions for improvement, see the Apache Ant
website:

http://ant.apache.org/index.html

Antoine Levy-Lambert, on behalf of the Apache Ant community
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

Thanks

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}/"/>
</exec>

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?

Regards

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 
org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer#getStylesheet 
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" />
   </fileset>
</junitreport>

Context: I use the junitreport task in a Maven build (similar to 
http://stackoverflow.com/a/2847475/131929).

--

-- 
Marcel Stör, http://frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Gmane