简体   繁体   English

Maven全新安装奇怪的下载

[英]Maven clean install strange download

I have been using maven for a while, since a couple of weeks I started to notice some downloads every time I execute "clean install".我已经使用 maven 一段时间了,因为几周以来我开始注意到每次执行“全新安装”时都有一些下载。

[INFO] Downloading: https://repo1.maven.org/maven2/org/apache/qpid/proton-jms/0.3.0-fuse-2/proton-jms-0.3.0-fuse-2.pom
[INFO] Downloading: https://code.lds.org/nexus/content/groups/main-repo/org/apache/qpid/proton-jms/0.3.0-fuse-2/proton-jms-0.3.0-fuse-2.pom
[INFO] Downloading: http://repo.spring.io/release/org/apache/qpid/proton-jms/0.3.0-fuse-2/proton-jms-0.3.0-fuse-2.pom
[INFO] Downloading: http://repo.spring.io/release/org/apache/qpid/proton/0.3.0-fuse-2/proton-0.3.0-fuse-2.pom
[INFO] Downloading: http://repo.spring.io/release/org/apache/qpid/proton-api/0.3.0-fuse-2/proton-api-0.3.0-fuse-2.pom

I'm guessing that someone add a new dependency into the POM file (maybe spring) but still, it should download just one time right?我猜有人在 POM 文件(可能是 spring)中添加了一个新的依赖项,但它仍然应该只下载一次,对吗? it is downloading every time for me,它每次都在为我下载,

Any suggestions to get rid of this ?有什么建议可以摆脱这种情况吗?

Its not actually download all the dependency from the Internet.它实际上并没有从 Internet 下载所有依赖项。 If first time issued a mvn command the dependencies mentioned in pom.xml are downloaded from Internet and are saved in your local M2_HOME or local repository.如果第一次发出mvn命令, pom.xml中提到的依赖项会从 Internet 下载并保存在本地 M2_HOME 或本地存储库中。 Then if you don't remove these dependencies from the M2_HOME or local repository every next mvn command get/fetch these dependencies from the M2_HOME or local repository.然后,如果您不从 M2_HOME 或本地存储库中删除这些依赖项,则每个下一个mvn命令都会从 M2_HOME 或本地存储库中获取/获取这些依赖项。

Maven also display this getting/fetching of jar file as download. Maven 还将此 jar 文件的获取/获取显示为下载。 You may notice the the later download takes much less time than the first download.您可能会注意到,较晚的下载比第一次下载花费的时间少得多。 Because the later mvn command download/get/fetch these dependencies from he local repository.因为后面的mvn命令从本地仓库下载/获取/获取这些依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM