ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: <propertyfile> use cases request
Date Wed, 20 Feb 2002 17:08:20 GMT
Wow... nice trick!  Thanks for that for two reasons.... its slick and it
helps with creating a test case to for my <propertyfile> refactorings.

    Erik


----- Original Message -----
From: "Steve Donie" <SDonie@lgc.com>
To: "'Ant Developers List'" <ant-dev@jakarta.apache.org>
Sent: Wednesday, February 20, 2002 11:55 AM
Subject: RE: <propertyfile> use cases request


> Here's a chunk I use to keep only a weeks worth of builds on my server:
>
>     <!-- need to just keep one week worth on the server -->
>     <propertyfile file="${logs}/DistDeleteList.log"
>         comment="a file containing what the date was a week ago, for use
in
> deleting directories from the build server" >
>       <entry key="olderThanAWeek" type="date" default="now" operation="-"
> value="8" pattern="MMdd"/>
>     </propertyfile>
>     <property file="${logs}/DistDeleteList.log" />
>
>     <delete includeEmptyDirs="true" >
>       <fileset dir="${buildserver}\1-daily"
includes="${olderThanAWeek}*/**"
> />
>     </delete>
>
> The directories on the build server have names like 0219.00, 0219.01, etc.
>
> -----Original Message-----
> From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
> Sent: Wednesday, February 20, 2002 7:23 AM
> To: ant-dev; ant-user@jakarta.apache.org
> Subject: <propertyfile> use cases request
>
>
> I'm knee-deep in refactoring <propertyfile> to actually work in as many
> cases as I can envision. It has been in several states of disrepair in the
> past and I'm trying to fix it so that <entry> defaults and operations all
> work as expected.
>
> There is some odd code in there that allows operations besides "+", "-",
and
> "=" and I'm wondering if anyone ever used these.  They are not documented
> for the 'operation' attribute and I plan on removing them.
>
> Are folks using date operations with <propertyfile>? If so, could you send
> me some samples of how you are using it so that I can roll those into the
> test cases?
>
> I'm not quite sure how the date operations should be specified.  It looks
as
> though if 'value' is used in conjuction with 'type="date"' and 'operation'
> then the value attribute is taken as a date (Calendar to be more precise)
> and then added or subtracted from the actual value.  It seems odd to apply
> those kinds of operations on two dates, but maybe I'm missing something.
You
> don't really add one date to another, you add days, or hours, or years. Is
> there some other API that I should be looking into for date operations so
> that 'value' is not pulled in as a Calendar object when an operation is
> specified?
>
> What does a date of "never" do?  Why would you ever use it?  Is it just a
> placeholder for an unknown date?
>
> Again, send me <propertyfile> use cases, especially if doing date
> operations.  If you don't then risk me breaking it!  :)
>
> Thanks,
>     Erik
>
>
>
> --
> 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>
>
>


--
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