Need Efficient Solution for moving to HTTPS for mvn clean install
build success
- Have project with numerous internal dependencies which use http://repo1.maven.org/maven2 & http://repo.spring.io for dependency download
Tried following solutions at my end
Added following settings.xml in ~/.m2/ folder. Tried Profiling options also.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>${user.home}/.m2/repository</localRepository> <interactiveMode/> <offline/> <pluginGroups/> <servers/> <mirrors> <mirror> <id>central-repository</id> <name>Maven Repository HTTPS</name> <url>https://repo1.maven.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>central-spring-repository</id> <name>Spring Repository HTTPS</name> <url>https://repo.spring.io</url> <mirrorOf>springcentral</mirrorOf> </mirror> <mirror> <id>organisation-repo1</id> <name>org-repo1</name> <url>http://org.maven.com/repo1</url> <mirrorOf>repo1</mirrorOf> </mirror> <mirror> <id>organisation-repo2</id> <name>org-repo2</name> <url>http://org.maven.com/repo2</url> <mirrorOf>repo2</mirrorOf> </mirror> </mirrors> <proxies/> <profiles/> <activeProfiles/> </settings>
Still faced some issues for internal jars dependencies in the project.
Failed to read artifact descriptor for com.netflix.hystrix:hystrix-core:jar:1.5.13: Could not transfer artifact com.netflix.hystrix:hystrix-core:pom:1.5.13 from/to cxf-repo (http://repo1.maven.org/maven2/): Transfer failed for http://repo1.maven.org/maven2/com/netflix/hystrix/hystrix-core/1.5.13/hystrix-core-1.5.13.pom 501 HTTPS Required
Added following in pom.xml
<repositories> <repository> <id>central-maven</id> <name>central https Releases</name> <url>https://repo.maven.apache.org/maven2</url> </repository> <repository> <id>central-spring</id> <name>central spring https Releases</name> <url>https://repo.spring.io</url> </repository> <repositories>
Have read this doc for maven central repo movement to HTTPS https://blog.sonatype.com/central-repository-moving-to-https but couldn't get any proper resolution for internal dependency issue.
Some dependencies in my case are still calling http url's of central and spring maven