ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Location attribute in property not resolving correctly
Date Tue, 26 Sep 2006 15:44:58 GMT

Hi,

still don't get it, sorry. I've tried with =

    <target name="depends">

        <timestampselector 
            outputsetid="mypath"
            count="1"
            age="eldest" >
        <path>
            <fileset dir="Y:/bla">
                <include name="*.jar" />
            </fileset>
        </path>
        </timestampselector>

        <pathconvert refid="mypath" property="myfixedpath"
targetos="unix"/>

        <echo>myfixedpath === ${myfixedpath}</echo>

        <echo
file="Y:/bla/foobar.properties">filepath=${myfixedpath}</echo>
    </target>

    <target name="main" depends="depends">
        <propertyfile file="Y:/bla/foobar.properties" />
        <echo>Targetfile === ${filepath}</echo>
    </target>

Result =

[pathconvert] Set property myfixedpath = Y:/bla/corba.jar
Setting project property: myfixedpath -> Y:/bla/corba.jar
     [echo] myfixedpath === Y:/bla/corba.jar
main:
[propertyfile] Updating property file: Y:\bla\foobar.properties
Property ${filepath} has not been set
     [echo] Targetfile === ${filepath}

 The foobar.properties looks like =

#Tue Sep 26 17:40:31 CEST 2006
filepath=Y\:/bla/corba.jar


The pathconvert works but when echoing to a file it
gets Y\: ?!

hm, any ideas ? 

Regards, Gilbert

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com] 
Sent: Tuesday, September 26, 2006 3:49 PM
To: Ant Users List
Subject: Re: Location attribute in property not resolving correctly

> ...
> <pathconvert refid="mypath" property="myfixedpath" targetos="unix"/>

Create a text property, not a referenceable path.

> <timestampselector property="targetfile" pathref="${myfixedpath}"
> count="1" age="eldest"/>
> ...

Use your selector first, then convert the final path into a string
before <echo>. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message