ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: repository
Date Thu, 18 Nov 2004 16:28:43 GMT
I've just checked in the much reworked repository. We have to be
somewhat grateful that whoever broke into my house and stole my work
laptop, left the home PC next to it, that being where this code was. 

Features

-now called <libraries> as it does more than just get them.

-now in oata.tasks.repository ; not optional

-LibraryPolicies interface for 'policies'; mostly update policies but
also a slick little bunny <assertdownloaded count="3"/> for self
testing. 

-Files get downloaded into subdirectories.

Policies;
 <force> -fetch everything; verify the fetches worked

 <timestamp> probe timestamps on all; fetch if changed

 <absentfiles> absent ones only

 <noupdate> nothing gets fetched.

 <assertdownloaded count="3" />  //testing; diagnosis

 <schedule days="X" hours="Y" markerFile="somefile" />
   saves complete snapshot to a marker file; updates if that has
   changed or the elapsed time has elapsed. We could do more fine
   tuning here; days should mean 'tuesday, wednesday', not 24
   hours.

You can declare new datatypes and use them as policies; things like
mappers, filesets, signature verification can all go in. You can also
list them in order, semantics follow from the fact they are executed in
forward order before loading, reverse order after loading. 

All policies have an enabled flag; libraries have had if/unless replaced
with an enabled flag; they share a common interface and a list wrapper. 

Tests. 23 so far; could do with more, for things like schedule and just
file renaming. 

Todo: any hint of security. 

I'm also considering a policy that lets you assert that a particular
class exists in the library path:-
<mustexist class"org.apache.jakarta.commons.logging.Log" />
 (with nested resource and class attributes)

Failure to find a resource automatically raises a fault. this can be
done with <available> and <fail> but a more declarative means may make
it more likely to be used. 

I havent done anything towards a common repository, though the use of
subdirs makes that fairly trivial (we add a default dest dir, and change
<get> to save to a temp file with rename afterwards). and I think the
default update policy is already <absentfiles>. 

Comments as usual welcome. I think this stuff is ready to be used, with
the usual caveats about stability. I'm about to start using it at work,
which means we'll see how gump deals with it. 

Also: it needs documentation. More on that next.

-steve 




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


Mime
View raw message