ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49756] Copy doesn't support string resources
Date Tue, 17 Aug 2010 09:58:00 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49756

--- Comment #1 from Stefan Bodewig <bodewig@apache.org> 2010-08-17 05:57:57 EDT ---
Just some notes - regardless of whether there is a bug or not:

I think your usage of sort is wrong for what you are trying to do, in the case
where the file exists, both resources compare equal and I don't think Ant
makes any guarantee as to which one will come out first.

If the file doesn't exist, it is considered smaller than the string (according
to the manual, haven't checked the code) and thus would come before the string.

You probably want something like

    <copy tofile="${dir}/somefile">
        <first>
            <union>
                <restrict>
                    <exists/>
                    <fileset file="${dir}/somefile"/>
                </restrict>
                <string value="default contents"/>
            </union>
        </first>
    </copy>

Re: properties in macrodef - take a look at the local task.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message