maven snapshot updates

Jeff Storey picture Jeff Storey · Jan 27, 2010 · Viewed 9.9k times · Source

I have a maven project with a snapshot dependency. How does maven know if the snapshot needs to be updated? Does it always update? Is it time based? A checksum based update? I know I can force an update but otherwise, how does it check?

thanks, Jeff

Answer

Christophe Herreman picture Christophe Herreman · Jan 27, 2010

According to the docs, the default is that it will only update once a day. That is when the first build of the day is executed. You can override this behavior with the snapshot-policy element.

  • always - always check when Maven is started for newer versions of snapshots
  • never - never check for newer remote versions. Once off manual updates can be performed.
  • daily (default) - check on the first run of the day (local time)
  • interval:XXX - check every XXX minutes

http://maven.apache.org/maven-settings/settings.html