on ‎2020 Jan 16 12:14 PM
Hi There,
we are using SAP Commerce 1808 and getting the following error today (15.01)
Unable to get resource 'org.apache.maven:apache-maven:pom:3.2.5' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.5/apache-maven-3.2.5.pom
[null] An error has occurred while processing the Maven artifact tasks.
It was announced that from today maven central will not support http just https and the url https://repo1.maven.org/maven2/ must be updated everywhere.
Is there a way to overwrite the "m2.repo" property?
Unfortunately changing it in the libraries.properties file does not help.
Thanks!
Request clarification before answering.
You can create a "settings.xml" file into ~/.m2 folder with this:
<mirrors>
<mirror>
<id>centralhttps</id>
<mirrorOf>central</mirrorOf>
<name>Maven central https</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
However, on the SAP Commerce Cloud build, it won't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks that solved the problem. We had to do this on Jenkins to be able to build again (on-premise project).
<settings></settings>is missing. See answer from aaron.brill
lszabados & s.cremer when creating a "settings.xml" file in the ~/.m2 folder make sure to enclose the above code Rafa provided in a <settings/> tag, like this:
<settings>
<mirrors>
<mirror>
<id>centralhttps</id>
<mirrorOf>central</mirrorOf>
<name>Maven central https</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
</settings>I had the same exact issue and tried this solution myself and my build succeeds now 🙂
Thank you rafacastelblanque for helping to point us in the right direction!
Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did wrap the <mirrors/> tag within a <settings/> tag, at least I thought so.
However, I tried again and it seems to work for now. Thanks rafacastelblanque and aaron.brill .
For those who are using CCV2. SAP documented a solution here: https://jira.hybris.com/browse/ECP-466
Workaround for CCV2
Tell the Customers to not use this functionality (usemaven=true) and commit the libraries into the repository with source code (extension's lib directory and web/webroot/WEB-INF/lib directory if web module is enabled)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For those with CCV2: you have to contact SAP about this. As far as I heard from other teams, it will take about 1-2weeks until ccv2 is fixed, but they are trying to find a workaround.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi we have same problem, is possilble use the maven dependencies in ccv2. Our project is before migration from on-prem to CCV2. I'm afraid of CCV2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We're experiencing the same problem. Is there a fix available or in the pipeline?
A fix by creating a "settings.xml" file in ~/.m2 doesn't work for us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.