- Newest
- Most votes
- Most comments
The Maven build failure you're experiencing since October 4, 2024, appears to be related to a repository issue, specifically with the maven-restlet repository. The error message indicates a checksum validation failure when trying to download a dependency from https://maven.restlet.org.
To resolve this issue, you can try the following steps:
-
Remove the maven-restlet repository from your Maven settings if it's explicitly defined. This repository seems to be causing issues and may not be necessary for your build.
-
Ensure that your project is using the secure central Maven repository (https://repo1.maven.org/maven2) as its primary source for dependencies. CodeBuild-provided Java build environments typically include a settings.xml file that directs Maven to use this repository.
-
If you need to override the default Maven settings in CodeBuild, you can add a custom settings.xml file to your source code and instruct CodeBuild to use it. Here's how you can do this:
a. Create a settings.xml file in your project with the repositories you want to use. b. In your buildspec.yml file, add a command in the install phase to copy this file to the correct location:
version: 0.2 phases: install: commands: - cp ./settings.xml /root/.m2/settings.xml
-
If the issue persists, you may need to update your project's dependencies, particularly the Spring Cloud dependencies, to ensure you're using versions that are compatible with your Spring Boot version and available in the central Maven repository.
-
As a temporary workaround, you could try disabling checksum validation in your Maven settings, but this is not recommended for security reasons and should only be used as a last resort for debugging.
By implementing these changes, you should be able to resolve the Maven build failure in your CodeBuild project.
Sources
Troubleshooting AWS CodeBuild - AWS CodeBuild
Hi,
You have this problem because the mentioned dependency https://maven.restlet.org/org/springframework/cloud/spring-cloud-commons-dependencies/3.1.4/spring-cloud-commons-dependencies-3.1.4.pom doesn't seem to publish (anymore ?) its checksum for content validation / authentication.
You can work around this by adding the option -DcreateChecksum=fals until the problem on gets fixed on spring-cloud-commons-dependencies-3.1.4.pom
Best,
Didier
Relevant content
- asked 2 years ago

I had to use option 3 to resolve the problem.