I'm trying to build an open source project in docker and want to save time spent on builds, so I tried using mvn dependency:go-offline
, which does download maven-surefire-plugin itself.
Running mvn -o clean package
afterwards results in
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project oxalis-api: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4 or one of its dependencies could not be resolved: Cannot access apache.snapshots (http://repository.apache.org/snapshots/) in offline mode and the artifact org.codehaus.plexus:plexus-utils:jar:1.1 has not been downloaded from it before. -> [Help 1]
(I've enabled the snapshots repository because maven-dependency-plugin has serious issues with multi module projects otherwise)
The POM includes
<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>
and as described above, that plugin itself does exist in my repository after go-offline.
mvn clean && mvn dependency:go-offline && mvn -o package
? – Galagalactagogueorg.codehaus.plexus:plexus-utils:jar:1.1
from a snapshot repo, which is plain wrong. – Dillionapache.snapshots
that you have in your pom or settings.xml. – Dillion