This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20239|Reply: 0

[Source] Maven updatePolicy snapshot update policy

[Copy link]
Posted on 8/10/2021 1:59:31 PM | | |
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 updatesBy 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





Previous:Spring Cloud Filter fetches the requested content via the ContentCachingRequestWrapper
Next:.NET/C# attributes CallerMemberName, CallerFilePath, CallerLineNumber
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com