Maven2 在每次构建时检查 stax-ex 的更新。而且它只是检查这个单一的依赖项,所有其他依赖项每天只更新一次。
Maven2 输出:
artifact org.jvnet.staxex:stax-ex: checking for updates from java.net
stax-ex(groupid:org.jvnet.staxex,版本:1.2)包含在 jaxws-rt(groupid:com.sun.xml.ws,版本:2.1.3)中。我们有一个 Artifactory 存储库作为中介。
我能做什么? (离线构建将是一种不受欢迎的解决方法。)
最佳答案
我遇到了同样的问题,想弄个水落石出!
问题出在pom.xml file of streambuffer (jaxws-rt 的依赖项),它没有指定 stax-ex 的版本。相反,它使用 RELEASE
,表示最新发布的版本:
<dependency>
<groupId>org.jvnet.staxex</groupId>
<artifactId>stax-ex</artifactId>
<version>RELEASE</version>
</dependency>
这迫使 Maven 通过下载相应的 maven-metadata.xml
不断检查最新版本的 stax-ex(即使 jaxws-rt 本身要求版本 1.2)。
一个简单的解决方法是在 pom.xm 的 dependencyManagement
部分中强制使用 stax-ex 的版本:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jvnet.staxex</groupId>
<artifactId>stax-ex</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</dependencyManagement>
然后 Maven 将不再为这个警告打扰你......
https://stackoverflow.com/questions/4243701/