Quoting Jason Dillon <[EMAIL PROTECTED]>:

> I played around with this a little today, very nice.
>
> How does DSMP handle SNAPSHOT updates?

Usually, I just forbid them :-) (see the allow and deny rules).

At work, I don't want SNAPSHOTs to pollute my environment, so I
disabled them. Even if a POM requests them, it won't get them and I'll
see an error so I can make an educated guess if I want them or not.

The default rule in DSMP itself is to download something once and only
once (for example, the metadata file which contains the available
versions). This was the most simple way to implement it and it worked
for me. So basically, DSMP works like a permanent --offline switch to
Maven which can download new artifacts but can't change ones you
already have.

If you need SNAPSHOTs that update, there are these possible solutions:

- When you know there is a new version of something, delete the files
in the cache and DSMP will get them again (no need to restart; just
delete the files).

- I could add a "no cache" option for SNAPSHOT sites so DSMP would
always forward the requests (ie. you would have the default Maven
behavior of updating the files in the local repository once per day
but every developer would download it from him/herself).

- You could setup a timed build on a machine which wipes the cached
SNAPSHOTs and runs a single build in the morning. This way, the cache
would be filled with the most current snapshots before the developers
show up for work.

- Someone (ie. not me; I don't know enough about this) could send me a
patch which replicates the Maven update policy or could tell me a way
to find out that I should update something.

- I have a TODO to activate a cache per IP address. The idea was to
create a new cache at request, fill it with the most recent stuff and
present this as the "current" cache to this single IP while everyone
else sees the "public cache".

This way, I could activate this feature, do a clean build to see that
everything still works and then "commit" the new files to the common
cache for everyone else.

Regards,

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.philmann-dark.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to