You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by dkbe <tm...@hotmail.com> on 2007/09/19 00:41:20 UTC

1.7 Resource Framework accessing lastmodified

Hi,

I would like to accomplish something like the following using the <file>
resource from the ANT 1.7 Resource Framework:

<file name="tlog.resource" basedir="C:\" file="my_patch.txt" > </file>
<echo message="Patch Created: ${tlog.resource.lastmodified}" />

Without delving underneath the XML interface to the Java classes provided by
the ANT 1.7 Resource Framework, can you access the properties of a resource
"readonly", without setting them?

If so, how?

Your help would be greatly appreciated.

-- 
View this message in context: http://www.nabble.com/1.7-Resource-Framework-accessing-lastmodified-tf4477621.html#a12767578
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: 1.7 Resource Framework accessing lastmodified

Posted by Matt Benson <gu...@yahoo.com>.
--- Steve Loughran <st...@apache.org> wrote:

> dkbe wrote:
> > Hi,
> > 
> > I would like to accomplish something like the
> following using the <file>
> > resource from the ANT 1.7 Resource Framework:
> > 
> > <file name="tlog.resource" basedir="C:\"
> file="my_patch.txt" > </file>
> > <echo message="Patch Created:
> ${tlog.resource.lastmodified}" />
> > 
> > Without delving underneath the XML interface to
> the Java classes provided by
> > the ANT 1.7 Resource Framework, can you access the
> properties of a resource
> > "readonly", without setting them?
> > 
> > If so, how?
> > 
> 
> I dont think there is a way (yet)...though I could
> imagine using 
> <scriptdef>to define a task that would do so,
> something to call 
> getLastModified() on a resource.
> 
> Add it as a feature request on bugzilla; I'm doing
> some tweaks to the 
> resource hierarchy this week.

This looks like a good candidate for a
PropertyEvaluator in the Ant 1.8 world... adds
priority to porting the old jexl and jxpath proposals
IMHO...

-Matt

> 
> -- 
> Steve Loughran                 
> http://www.1060.org/blogxter/publish/5
> Author: Ant in Action           http://antbook.org/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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


Re: 1.7 Resource Framework accessing lastmodified

Posted by Steve Loughran <st...@apache.org>.
dkbe wrote:
> Hi,
> 
> I would like to accomplish something like the following using the <file>
> resource from the ANT 1.7 Resource Framework:
> 
> <file name="tlog.resource" basedir="C:\" file="my_patch.txt" > </file>
> <echo message="Patch Created: ${tlog.resource.lastmodified}" />
> 
> Without delving underneath the XML interface to the Java classes provided by
> the ANT 1.7 Resource Framework, can you access the properties of a resource
> "readonly", without setting them?
> 
> If so, how?
> 

I dont think there is a way (yet)...though I could imagine using 
<scriptdef>to define a task that would do so, something to call 
getLastModified() on a resource.

Add it as a feature request on bugzilla; I'm doing some tweaks to the 
resource hierarchy this week.

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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