Dav*_*ave 4 artifacts maven maven-metadata
我正在使用Maven 3.2.我在我的pom.xml文件中有这种依赖(一个WAR项目)
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>1.6.2</version>
<scope>provided</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
每当我为我的pom运行任何阶段(例如"mvn install")时,应用程序总是尝试下载有关依赖关系的一些元数据......
Downloading: http://repo.spring.io/milestone/joda-time/joda-time/maven-metadata.xml
Run Code Online (Sandbox Code Playgroud)
我怎么告诉Maven停止这样做?我已经将神器缓存在我当地的Maven回购中.
谢谢, - 戴夫
可能需要明确指定更新策略.看到这个答案:为什么Maven每次都下载maven-metadata.xml?
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://gotoNexus</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
Run Code Online (Sandbox Code Playgroud)
这意味着在您的依赖树中的某个地方使用了 SNAPSHOT 或版本范围(直接或作为传递依赖)。对于这两种情况,解决方案是相同的:将版本锁定到特定版本。您是将其锁定为直接依赖项还是在dependencyManagement 中?
归档时间: |
|
查看次数: |
4534 次 |
最近记录: |