ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: I may have found a bug??
Date Wed, 22 May 2002 20:46:54 GMT
As often, I was wrong. I had understood the back-slashes were there even for
the 'ts' ANT property, not just in the properties file, and was furthermore
stating what Ant should have done, which it already did... Oh my! --DD

P:\org_apache\antx>ant -f tstamp.xml
Buildfile: tstamp.xml

test:
   [delete] Deleting: P:\org_apache\antx\tstamp.properties
[propertyfile] Creating new property file:
P:\org_apache\antx\tstamp.properties
     [echo]
     [echo] Before loading properties file:
     [echo] ts1 = 22.05.2002 AD 15:41:18.271
     [echo] ts2 = ${ts2}
     [echo]
     [echo] Properties file content:
     [exec] #Wed May 22 15:41:18 CDT 2002
     [exec] ts2=22.05.2002 AD 15\:41\:18.271
     [echo]
     [echo] After loading properties file:
     [echo] ts1 = 22.05.2002 AD 15:41:18.271
     [echo] ts2 = 22.05.2002 AD 15:41:18.271

BUILD SUCCESSFUL

Total time: 0 seconds
P:\org_apache\antx>

<?xml version="1.0"?>

<!-- ANT build file to test a specific feature or bug of ANT.
     Dominique Devienne <ddevienne@lgc.com>          May 2002
  -->
<project name="tstamp" default="test" basedir=".">

  <target name="test">
    <tstamp>
      <format property="ts1"
              pattern="dd.MM.yyyy G HH:mm:ss.SSS "
              locale="CANADA_FRENCH" />
    </tstamp>

    <property name="propfile"
              location="${ant.project.name}.properties" />
    <delete file="${propfile}" quiet="true" />

    <propertyfile file="${propfile}">
      <entry key="ts2" value="${ts1}" />
    </propertyfile>

    <echo message="" />
    <echo message="Before loading properties file:" />
    <echo message="ts1 = ${ts1}" />
    <echo message="ts2 = ${ts2}" />

    <echo message="" />
    <echo message="Properties file content:" />
    <exec executable="type" vmlauncher="false" os="Windows 2000">
      <arg value="${propfile}" />
    </exec>

    <property file="${propfile}" />

    <echo message="" />
    <echo message="After loading properties file:" />
    <echo message="ts1 = ${ts1}" />
    <echo message="ts2 = ${ts2}" />
  </target>

</project>

-----Original Message-----
From: Steve Loughran [mailto:steve_l@iseran.com] 
Sent: Wednesday, May 22, 2002 3:18 PM
To: Ant Developers List
Subject: Re: I may have found a bug??


----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>
To: "'Ant Developers List'" <ant-dev@jakarta.apache.org>
Sent: Wednesday, May 22, 2002 10:46 AM
Subject: RE: I may have found a bug??


> Huh? Care to elaborate?
>
> And if you don't use that 'ts' ANT property to generate a properties file?
>
> And even if you do, shouldn't it be <propertyfile> or whatever else that
> when generating the properties file from <entry name="" value=""/> (or the
> likes) do the proper escaping for the value!?!?!?
>
> I recently learned that there's no escaping character for ANT, or XML for
> that matter, so why is there one here? --DD

RTM on java.util.Properties.store ...Ant implements the spec, no more, no
less




--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message