The basis for update of JAR packages in maven local warehouse

Source: Internet
Author: User

For a jar package, how does maven determine that the remote repository's jar package is newer than the corresponding jar package in the local repository? When I redeploy to a new, the next maven command will automatically download the latest jar package, so how does maven know to update it?

There is no definitive answer to this question on the Internet.

So, I ventured to guess that the new and old extent of the jar package could be judged by timestamps or checksums.

Conjecture 1: Time stamp

When deployed, a current timestamp is logged, and the timestamp of the jar that we download to the local repository is the timestamp of the last update of the jar package. After that, the time stamp of the package deployment is changed, and the timestamp of the local jar package is more than the time stamp of the remote jar package, so it is updated automatically.

Conjecture 2: Checksum (checksum)

After deployment, the checksum of the generated file is updated if the checksum of the local jar package is inconsistent with the remote checksum.


Above, purely personal conjecture, if have more exact answer, hope to enlighten.




This article is from the "ten-li Rice flower" blog, please be sure to keep this source http://5880861.blog.51cto.com/5870861/1695788

The basis for update of JAR packages in maven local warehouse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.