1. Why are there snapshots?
Before there was no snapshot:
Project A depends on project B, and B gives a new version number every time it changes, and then tells A that I have changed the version, and I have to tell you every change, and sometimes it is troublesome to forget.
It can be seen that the lack of snapshots will bring about the problem of "wasting version numbers" and increasing communication.
With the snapshot:
Project A depends on project B, B will be timestamped every time, A will check B's timestamp when compiling, if it is later than the timestamp of the local repository B, then it will be updated, otherwise it will not be updated.
It can be seen that snapshots eliminate communication costs and version number costs.
2. Snapshot update strategy
Note that snapshots are not updated every time you install, depending on the update policy;Snapshot update policies include daily updates, always check for updates, never check for updates, and custom interval updates,By default, it is updated daily, which means it is updated once a dayIf you want to always be updated, then you can configure it in the settings.xml. Like what:
(always, daily, interval:X (where X is the interval in minutes), or never
You can also force an update by command, mvn clean install -U
|