[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aether-users] Snapshot version resolution
|
Lars Braubach wrote:
What I actually try to achieve is checking if a newer
snapshot is available than that I am currently running on
and restart the application to let it use the new artifacts.
So why not periodically run resolveArtifact() and compare the filename
and last-modified time of the resolved file with what you got last time?
If it is not possible find out the local snapshot version
how does maven itself know when to perform an
autoupdate from a remote repo for a snapshot?
Maven just uses the snapshot that appears most recent according to the
locally cached metadata files, with those metadata files occasionally
being refetched according to configured update policies/intervals. So
Maven doesn't need to "know when to perform an autoupdate", it
ultimately gets told by the user's policies and from there it only needs
to check whether a given timestamped snapshot is already locally cached
or needs to be downloaded. Long story short, providing the most recent
snapshot in the local repo and detecting an update since the last run
are slightly different tasks.
Or is aether the wrong tool for that?
As I already said, Aether provides you with extensions points to craft
your own local repo that timestamps snapshots, if that is really want to
want.
Benjamin