Edwin Castro | 13 Feb 22:26 2014
Picon

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>

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

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

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"/>
    <restrict>
        <name name="**/*.class"/>
        <archives>
            <zips>
                <path path="${class.libs}"/>
(Continue reading)

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

Resource collections - Linux vs. windows

Hi,

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+$" />
            </dirset>
        </resources>

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

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

Marc Benstein | 11 Feb 01:17 2014

junit skipNotTests zipfileset including inner classes that are not tests

I am using ant 1.9.3 with junit 4.11 with batchtest skipNonTests="true"

What is happening is that inner classes of non-test classes are being
tested. This is resulting in a few failures. Any thoughts on why these
inner classes that are not test classes are being tested?

<junit printsummary="no" fork="yes" forkmode="perBatch"
haltonfailure="no" failureproperty="junit.failure">
    <classpath>
        ...
    </classpath>
    <formatter type="xml" />
    <batchtest skipNonTests="yes" todir="${junit.result.dir}">
        <zipfileset src="foo-testing.jar">
            <exclude name="**/*TestLocal.class" />
        </zipfileset>
    </batchtest>
</junit>

Ultramain Systems, Inc.
8100 Lang Avenue NE
Albuquerque, NM 87109
USA

TEL 505.828.9000
FAX 505.823.1841
www.ultramain.com


Confidentiality Notice: This email message and any files transmitted with it may contain confidential
information intended only for the person(s) to whom this email is addressed. If you have received this
(Continue reading)

Martin Gainty | 5 Feb 16:53 2014
Picon

RE: Nexus Taskdef question

Ant Gurus

The subject says it all: I'm trying to get an artifact from Nexus, and the Ant build job I'm looking at seems to
be unable to retrieve the most recent snapshot artifact from Nexus. 
I suspect that when Ant tries to get the snapshot, there is already one in the local Maven cache and grabs what
is appropriate, instead of getting the absolute latest one.

Is there an ant taskdef to download the most recent (snapshot) artifact from Nexus?

Danke,
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir
hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche
Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer
den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous
te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non
autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas
n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être
sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

From: mgainty <at> hotmail.com
To: mgainty <at> hotmail.com
Subject: 
Date: Tue, 4 Feb 2014 15:52:45 -0500
(Continue reading)

Sander ... | 5 Feb 14:17 2014
Picon

Ant with Dimensions


Hello,

I try search before, but I didn't found the search bar in the site.

 
I'm learning to use apache ant and I would like to know how I can make an extraction (or check out) from the
Serena Dimensions CM 12.2 with an oline repository. I try to use this code above ( provided by Apache), but I
din't be successful. 

 
<?xml version="1.0" encoding="UTF-8"?>   
<project name="test" basedir=".">   
<property file="./build.properties"/>   
<target name="extract">    
    <pvcs repository="${repository}" pvcsproject="${pvcsproject}" userid="${user}" />    
</target>   
</project> 

 
Fail description:

BULD FAILED
Failed executing: pcli lvf -z -aw -pr(repository) -id(userid) (project name). Exception: Cannot run
program "pcli": CreateProcess error=2, The system cannot found the file especified.

 

I would like to know how I can overcome this problem. Maybe if exist a new way or "pcli" program.

(Continue reading)

Stefan Bodewig | 29 Jan 16:57 2014
Picon

[ANN] Apache Compress Antlib 1.4 Released


The Apache Compress Antlib offers tasks and types for the archive and
compression formats like CPIO, XZ, Pack200, LZMA, ARJ, .Z, Snappy, 7z
and AR supported by Apache Commons Compress as well as
re-implementations of the formats already supported by Ant's core.

Version 1.4 catches up with Apache Commons Compress 1.7 and adds
read-only tasks and resources for Snappy and the traditional Unix .Z
compression.

Support for the XZ and LZMA compression formats is based on the XZ for
Java library of the Tukaani Project[1], which is required at runtime in
addition to Commons Compress.  Some 7z archives will require LZMA
support and thus XZ for Java as well.

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 Compress Antlib, including instructions
on how to submit bug reports, patches, or suggestions for improvement,
see the Apache Compress Antlib website:
(Continue reading)

BryanBerg | 29 Jan 01:18 2014
Picon

Problem: failed to create task or type runtarget

Hi,

I am running into the following error when trying to run ant:

Problem: failed to create task or type runtarget

I am building on a mac 10.8.3.

Prior research has suggested that I add ant-contrib-0.3.jar to my 
ANT_HOME installation directory, which I have done (that had actually 
gotten rid of another 'failed to create task or type' error)

I used ant-contrib-0.3.jar because research suggested that this jar is 
mapped to the line:

< taskdef resource="net/sf/antcontrib/antcontrib.properties" />
which is in the build.xml file I am using.

The project builds on windows machines ( I even got it to build using 
https://code.google.com/p/winant/ ) but am trying to get it built on a 
mac. I am thus not looking to change the build.xml file.

An example of the run target line is:

<target name="setPASProps" depends="" description="setup the properties">
     <property name="systemname" value="PAS"/>
     <runtarget target="setSystemProps"/>
</target>
Here is some info from running ant -diagnostics

(Continue reading)

Michael Durket | 22 Jan 21:22 2014
Picon

Re: Ant build from source instructions incorrect?

I get what seems to be a clean build and tests if I include the jars contained in the lib/optional directory in
the Subversion repository for Apache Ant. So perhaps those either should be included when making a source
tar bundle or the instructions on the website should indicate all of the jars required.

Thank you for your help.

On Jan 22, 2014, at 9:31 AM, "antoine <at> gmx.de" <antoine <at> gmx.de> wrote:

> Hi,
> It is possible that the two minor jars are required and should be in the source distribution and yes the
instructions should be accurate.
> Please report any gaps you find in the source distribution. I am always building from svn so I do not know more.
> Please reply only to the list going forward.
> 
> Best regards,
> Antoine
> 
> Antoine Levy-Lambert
> 
Michael Durket | 21 Jan 23:52 2014
Picon

Ant build from source instructions incorrect?

I'm attempting to build Ant 1.9.3 from the source distribution on Redhat Linux 5 using Oracle Java 1.7.0. It
seems to build correctly but fails the post-build tests with this error message:

error: package org.junit does not exist.

From my research, this seems to be a common issue in general with Ant.

Here are the exact directions I followed (from this page http://ant.apache.org/manual/install.html#buildingant):

"As of version 1.7.0 Ant has a hard dependency on JUnit. The fetch.xml build script will download JUnit
automatically, but if you don't use this you must install it manually into lib/optional (download it from
JUnit.org) if you are using a source distribution of Ant."

Since I don't have an ant that works with fetch.xml, I went to JUnit.org as indicated in the instructions and
downloaded junit.jar and copied the file to apache-ant-1.9.3/lib/optional.

Given that the instructions for building Ant are incorrect, could you please post the correct
instructions to your website so I could build the current version of Ant please?
Mark Lybarger | 15 Jan 14:36 2014
Picon

using ant for non build tasks

hi,

i'm putting together a simple business "flow" process.  some zip files are
pulled from a vendor.  i need a process to do the following, archive the
input, unzip the zip files, and execute some transformation on some of the
data.

currently, it's on a windows server, but we have linux servers in our
environment too.  i was thinking of using an ant script to handle/drive
most of this execution.  as ant is primarily using for building (java
appliations), does anyone see issues with using ant to drive this file
processing and manipulation?

thoughts/ideas are very welcome!

thanks,
-mark-
Ravi Joshi | 7 Jan 10:51 2014
Picon

Customize JUnit HTML report which is designed JUnit and Ant

Hi,

I found a similar topic (http://stackoverflow.com/a/1733940/1175065) on Stackoverflow and
posted also but that is not figuring me out to find the solution. Below are the requirements to customize
HTML report-

1. Need to add project name (Currently, I have set the project name in my JUnit Test java file.
2. Need to hide some columns i.e. package name and class name
3. Need to modify the display format for Time Stamp
4. Need to increase font size for error trace, which is thrown by test if any exception occrred
5. Need to add a column for each test  case i.e. Test Case priority (Currently, I have set the priority of
each test inside test method, which is one of following "Critical", "High", "Medium", "Low"
6. Need to add a comparison chart, which can show the number of passed Vs failed test cases

As per Stackoverflow post, I think requirements #1-5 can be done by modifying junit-frames.xsl file, but
how? How to modify XSL file?

Also Please help me to fulfil requirement #6.

I am using Java 1.6 on Windows 7 x64. The Apache ant  is ant_1.8.2.v20120109-1030, which comes by default
in Eclipse Indigo.

-
Thanks
Ravi

Gmane