Expected Behavior
mvn compile should succeed.
Actual Behavior
mvn compile produces
[ERROR] Failed to execute goal on project jenkins-spock: Could not resolve dependencies for project com.homeaway.devtools.jenkins:jenkins-spock:jar:2.1.6-SNAPSHOT: Failed to collect dependencies at org.jenkins-ci.main:jenkins-core:jar:2.102: Failed to read artifact descriptor for org.jenkins-ci.main:jenkins-core:jar:2.102: Could not transfer artifact org.jenkins-ci.main:jenkins-core:pom:2.102 from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/jenkins-ci/main/jenkins-core/2.102/jenkins-core-2.102.pom: Connect to 0.0.0.0:80 [/0.0.0.0] failed: Connection refused (Connection refused) -> [Help 1]
Search results suggest this is because maven's config for newest versions automatically blocks http repos, only allowing https.
Steps to Reproduce
- Compile with Java 8. I have
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (Zulu 8.58.0.13-CA-macos-aarch64) (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macos-aarch64) (build 25.312-b07, mixed mode)
on an M1 Mac.
- Compile with mvn 3.8.4 or later. (An earlier mvn may have this problem: I didn't find the earliest version.)
- If you can't reproduce the error above, please try
rm -rf ~/.m2 first.
Additional Information
For me, the change below fixes the problem. Please consider whether changing the repo reference from http to https suffices to fix this in general:
Replacing
http://repo.jenkins-ci.org/releases
with
https://repo.jenkins-ci.org/releases
worked for me.
Expected Behavior
mvn compileshould succeed.Actual Behavior
mvn compileproducesSearch results suggest this is because maven's config for newest versions automatically blocks http repos, only allowing https.
Steps to Reproduce
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (Zulu 8.58.0.13-CA-macos-aarch64) (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macos-aarch64) (build 25.312-b07, mixed mode)
on an M1 Mac.
rm -rf ~/.m2first.Additional Information
For me, the change below fixes the problem. Please consider whether changing the repo reference from http to https suffices to fix this in general:
Replacing
http://repo.jenkins-ci.org/releaseswith
https://repo.jenkins-ci.org/releasesworked for me.