When using jenkins to build today, the following error was reported
[ERROR] Failed to execute goal on project saas20: Could not resolve dependencies for project com.ipower365.saas:saas20:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.ipower365.saas:messageserviceimpl:jar:0.0.1-SNAPSHOT -> com.ipower365.boss:nacha:jar:1.0.1: Failed to read artifact descriptor for com.ipower365.boss:nacha:jar:1.0.1: Could not transfer artifact com.ipower365.boss:nacha:pom:1.0.1 from/to central (http://repo1.maven.org/maven2/):Failed to transfer file:http://repo1.maven.org/maven2/com/ipower365/boss/nacha/1.0.1/nacha-1.0.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
We found that this dependent file is available in the local warehouse, but during the build process, after downloading the file in the local nexus, it will still request the file download like the central warehouse.
[echoing saas20] Downloading from central: http://repo1.maven.org/maven2/com/ipower365/boss/nacha/1.0.1/nacha-1.0.1.pom
After that, we searched for the problem based on the returned 501 error. The reference link is as follows:
As mentioned above, since January 15, 2020, the central repository no longer supports insecure communication via pure HTTP, and requires all requests to the repository to be encrypted via HTTPS.
So we added the following configuration to the settings file that we relied on during the build process:
But the problem is still not resolved, and then an error is reported, the error is as follows:
Could not transfer artifact com.ipower365.boss:nacha:pom:1.0.1 from/to central (https://repo1.maven.org/maven2/):Received fatal alert: protocol_version -> [Help 1]
This is when using the https protocol to request the central warehouse, the protocol version needs to be specified, and then the following parameters are added when building, the reference link is as follows:
Then when you build again, the request is passed!
Reason: Our Java environment uses 7 and 8, while our mvn version uses 3.5.x.
Therefore, when using mvn packaging in the JAVA8 environment, the above parameters do not need to be specified, but when using the JAVA7 environment, the above error will occur. Later, we will consider updating the version of mvn and unified JAVA environment
- Prompt unknown error in pom.xml of Maven project
- [Maven] Pom.xml error: Cannot detect Web Project version.
- [Solved] Maven Error: The packaging for this project did not assign a file to the build artifact
- Maven package error: [WARNING] The POM for xxx is missing, no dependency inform
- Springboot package error: failed to execute goal org.apache.maven.plugins:maven-resources-plugin: 3.2.0…
- The spring project is normal locally, and the bean cannot be found error is thrown when entering the docker container
- Error:scalac: missing or invalid dependency detected while loading class file ***
- JSP error: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- [Solved] Could not resolve all dependencies for configuration ‘:app:debugRuntimeClass
- hint: Updates were rejected because the remote contains work that you do To XXX
- [Maven Error] Exception in thread “main” java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
- [Solved] Spring cloud config server can’t parse the YML file of the remote warehouse, and it will also report an error
- SharePoint site shows ‘Service Unavailable. HTTP Error 503. The service is unavailable’
- [Solved] There are test failures. Please refer to D:\Java_study\springboot\springboot-sugon-3\target\surefire-reports for the individual test results.
- Start error in maven web project java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
- [Solved] The method getContextPath() from the type HttpServletRequest refers to the missing type String
- Error: XZ compression not available
- Git Push Error: failed to push some refs to ‘[email protected]:
- Maven configuration error: JAVA_HOME not found in your environment