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
Edoardo Vacchi | 15 Apr 09:10 2014
Picon

ClassLoader classpath of a TaskDef'd task

My taskdef'd task uses
   Thread.currentThread().getContextClassLoader();
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 ...>
   <classpath>...</classpath>
</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?

thanks
hwpstorage | 25 Mar 15:30 2014
Picon

Maven Ant Plugin question

Hello,

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:
http://192.168.2.124:8081/nexus/content/groups/public//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] To:
/home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] Getting:
https://repository.cloudera.com/artifactory/cloudera-repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] To:
/home/usera/.m2/repository/com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] Error opening connection java.io.FileNotFoundException:
https://repository.cloudera.com/artifactory/cloudera-repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] Error opening connection java.io.FileNotFoundException:
https://repository.cloudera.com/artifactory/cloudera-repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] Error opening connection java.io.FileNotFoundException:
https://repository.cloudera.com/artifactory/cloudera-repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jar
      [get] Can't get
https://repository.cloudera.com/artifactory/cloudera-repos//com/twitter/parquet-format/1.0.0/parquet-format-1.0.0.jarto
(Continue reading)

Tony Anecito | 5 Mar 22:03 2014
Picon

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.

Thanks!
-Tony
Knuplesch, Jürgen | 25 Feb 16:07 2014
Picon

create a new fileset in Java and in Ant Task

Hello,

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:

     createdFileset.getDirectoryScanner();

I get a NPE.

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

Juergen
--

Juergen Knuplesch

        http://www.icongmbh.de

Application Development

icon Systemhaus GmbH

        Tel. +49 711 806098-275

Hauptstätter Straße 70
(Continue reading)

Mahmood Naderan | 23 Feb 12:12 2014
Picon

Installation question

Hi,
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?

Regards,
Mahmood
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)


Gmane