[我正在尝试在docker中构建一个开源项目,并希望节省构建时间,因此我尝试使用mvn dependency:go-offline
,它[[确实本身下载了maven-surefire-plugin。
mvn -o clean package
将导致[[错误]]无法在项目oxalis-api上执行目标org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test(默认测试):目标org.apache的执行默认测试.maven.plugins:maven-surefire-plugin:3.0.0-M4:test失败:插件org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4或其依赖项之一无法解析:脱机模式下无法访问apache.snapshots(http://repository.apache.org/snapshots/),并且以前从未从其下载工件org.codehaus.plexus:plexus-utils:jar:1.1。 -> [帮助1]
(我启用了快照存储库,因为maven-dependency-plugin在多模块项目中存在严重问题,否则]
POM包括
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</pluginManagement>
并且如上所述,该插件本身在离线后确实存在于我的存储库中。