Earl Hood | 13 Dec 20:55 2013
Picon

Bug in <uptodate> task? Directory portion of a srcfile does not exist

Ant version: 1.8.4

When using <uptodate>, if I have a <srcfiles file="..."/>, and the
dirname portion of the pathname does not exist, uptodate causes a
project build failure.

For example, if the pathname is "C:\Whatever\Directory\file.txt" and
"C:\Whatever\Directory" does not exists, build failure.

There is no problem if the file itself is not present (the dirname
portion exists, but the base file does not). I believe uptodate should
not fail in the scenario described above.

Is this a legitimate bug?

--ewh
Cyril Sagan | 12 Dec 00:07 2013
Picon

Is it possible to get "location semantics" with <condition/>

I don't think it is possible, but I wanted to confirm here.

My goal is to be platform agnostic, and not get mixed separators in path
names, in order to accomplish this I don't think I can use <condition/>.

While I prefer to use "pure ant", in this case I think the <if/> is better
than lots of ${path.separtor}'s in strings.

Consider this example:

OUTPUT:   (note mixed separators)
C:\temp>ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

C:\temp>ant
Buildfile: build.xml
     [echo] dir.works = C:\temp\false\demo\path
     [echo] dir.fails = C:\temp/false/demo/path

BUILD SUCCESSFUL
Total time: 0 seconds

From this build.xml:

<?xml version="1.0" encoding="utf-8"?>
<project name="condition-property-semantics-test">
    <taskdef resource="net/sf/antcontrib/antlib.xml"/>

    <if>
        <istrue value="${some.property}" />
(Continue reading)

Steele, Richard | 9 Dec 15:22 2013
Picon

New conditional attributes on use of macrodef?

I can't seem to get the new if: and unless: attributes working on uses of
macrodef.  For example:

<project name="conditional-tests" xmlns:if="ant:if"
xmlns:unless="ant:unless">

    <macrodef name="sayhi">
        <sequential>
            <echo>hi</echo>
        </sequential>
    </macrodef>

    <target name="hi">
        <sayhi if:set="verbose" />
    </target>

</project>

If I do "ant hi" from the command line the script runs to completion, and
as expected, there's no output:

C:\conditional-tests>ant hi
Buildfile: C:\conditional-tests\build.xml

hi:

BUILD SUCCESSFUL

However, if I set the property I get an error:

(Continue reading)

Tennis.Smith | 3 Dec 17:39 2013

AntUnit Logging Query

Hi,

I have a routine in 'tearDown' which uses concat to place the test logs in a file:

<concat destfile="${temp.file}">

    <au:logcontent/>

</concat>

This works.  But, everything in the log is one long string. Entries are not separated by cr+lf.

For example, if I have this in a test:

<echo message="foo"/>

<echo message="bar"/>

The log will have:

foobar

How can I make the lines be separated like normal "echo" output would be?

TIA,
-T

jotpe | 3 Dec 09:53 2013
Picon

Slow connection operations with java fork=false

Hello list,

at first my values:
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
java.runtime.version : 1.7.0_45-b18
java.vm.name : Java HotSpot(TM) Client VM
os.name : Windows XP

I've written a Java utility class, that executes some import jobs. If
executed via commandline only OR by ant task with fork="true" parameter, it
runs as it schould: fast and without blocking.

The bottlenecks are retrieving websites
    new URL("xyz").openConnection().getInputStream()
and establishing a database connections
    DriverManager.getConnection(url, props)

With fork="true" OR direct commandline both takes ~ 50 ms +- 25 ms
With fork="false" it takes always 9047 ms +- 13 ms

The ant target looks normal, i think:

<target name="read">
    <java classname="ImportJob" fork="false" failonerror="true">
        <arg value="a" />
        <classpath>
            <pathelement path="dist/classes"/>
            <pathelement location="dist/postgresql-9.1-903.jdbc4.jar" />
            <pathelement location="dist/commons-codec-1.7.jar" />
            <pathelement location="dist/commons-io-2.4.jar" />
(Continue reading)

David Coleman | 30 Nov 12:55 2013
Picon

list maint

not sure who should handle this but every mail i send to the list generates a "cannot deliver" email bouncing
back to me from Kola.Oyedeji <at> columbusinsurance.co.uk 		 	   		  
David Coleman | 30 Nov 07:23 2013
Picon

appologies

I apologize to Jan.  

I expressed my frustration with his troubleshooting approach inappropriately.

It was unprofessional, and a horrible first way to present myself.

I will try to phrase my questions better in the future so that such questions can be avoided.

I will politely share my knowledge with those who have questions which I can answer, if you will allow me to
remain on the list.

I hope that at some point I can at least partially redeem myself.

thank you,
good night.
 		 	   		  
David Coleman | 28 Nov 20:35 2013
Picon

problem with ftp

hello list!

I have an issue with my ftp task in ANT 1.9.1

here is my ftp task:

    <macrodef name="deployHoftest" description="Deploy lobby to hoftest">
        <sequential>
            <antcall target="checkAntCommons"/>
            <antcall target="checkJakartaOro"/>
            <ftp userid="dave" password="*******" 
                server="164.177.*********" 
                remotedir="/hoftest/assets/lobby"
                port="21"
                verbose="true"
                action="send"
                passive="yes"
                systemTypeKey="UNIX"
                >
                <fileset dir="./deploy">
                    <includesfile name="deploy/Lobby.swf"/>
                </fileset>
            </ftp>
        </sequential>
    </macrodef>
    <target name="deploy" description="deploy lobby files">
        <deployHoftest/>
    </target>

I know that i successfully connect to my server because I get a login error if i change the password, and i get
(Continue reading)

Steele, Richard | 27 Nov 14:09 2013
Picon

Unexpected <augment> behavior

I've run into an odd behavior that I'm assuming is a defect but I'd like to
confirm.

With this build file:

<project name="augment-test">

    <target name="init">
        <path id="inner"/>

        <path id="outside">
            <path refid="inner"/>
        </path>
    </target>

    <target name="update-paths">
        <augment id="inner">
            <fileset dir="lib"/>
        </augment>
    </target>

    <target name="a" depends="init, update-paths">
        <echo message="${toString:inner}" />
    </target>

    <target name="b" depends="init, update-paths">
        <echo message="${toString:outside}" />
    </target>

</project>
(Continue reading)

Ed Mansky | 12 Nov 15:32 2013
Picon

Ant get-m2.xml question

Hi all,

I am trying to upgrade my PowerMac G4 from ant 1.6.5/JDK 1.5 to ant 
1.7.0 and am running the command:

ant -f fetch.xml -Ddest=system

to get and build dependencies for the new ant and am getting an error 
from get-m2.xml at Line #70

The error is:

Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the 
nested "typefound" element.

I have seen blog entries that indicate that error message is seen in 
Ant 1.6.x but not in Ant 1.7.x and later. Is this correct?

The fetch.xml file imports get-m2.xml which I think is installing 
needed Maven tasks in Ant. Is this correct?

I already have Maven 2.2.1 installed. Do I need to set any 
environmental variables for the Ant build to find the maven already 
installed? I have JAVA_HOME, ANT_HOME and M2_HOME all set correctly.

Finally, I see there is a Maven-Ant task project at Apache.

I downloaded that source code and tried building it but get 3 errors 
in post-build tests.

(Continue reading)

Stefan Bodewig | 7 Nov 13:12 2013
Picon

[ANN] Apache Compress Antlib 1.3 Released


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

Version 1.3 catches up with Apache Commons Compress 1.6 and adds tasks
and resources for LZMA compression and ARJ as well as 7z archives.  The
LZMA and ARJ formats are read-only and ARJ doesn't support compression.
The 7z tasks and types only work on files but not on arbitrary
resources.

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
(Continue reading)


Gmane