How to handle missing remote resource in my maven assembly due to CHECKSUM FAILED error

I noticed that the maven build does not work, because a specific dependency cannot be loaded. In the build log, I get a lot of error messages like this:

WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '10c2aa7dfc8577cb32ee654d2cd5b270d478b823'; remote = '<!DOCTYPE' - RETRYING Downloading: http://maven.glassfish.org/content/groups/public//org/apache/maven/maven-archiver/2.0.1/maven-archiver-2.0.1.pom 

If I check the URL that I am trying to extract from it, I see that this ineed resource seems to be broken. I guess this is what passes for 404 in Oracle-Land. It is strange that if I look at the parent directory I can see the entry for this missing file, but without the file size.

Obviously, something is wrong on the remote server. This causes all loaded artifacts to contain a load of HTML garbage. Deleting files and re-executing simply force the same set of garbage to load from Oracle.

The question is, how can I get around this? Unfortunately, this is a new project that I just extracted from the gloomy mists of time. None of my colleagues have components on their PCs, otherwise I would just copy them. Can I give maven a command to use some alternative source to get the missing jars?

+4
source share
1 answer

You can probably try one of these three options:

Remove the abusive repository declaration if you can edit the POM in which it is defined. This will solve the problem for anyone who needs to develop a project.

Override the repository URL in your settings.xml file. You will need to find in which POM the repository is located and indicate its name. You can use something like:

 <mirror> <id>temporary-override</id> <url>http://repo1.maven.org/maven2/</url> <mirrorOf>ID_OF_REPO</mirrorOf> </mirror> 

If all else fails to override all repositories:

 <mirror> <id>temporary-override</id> <url>http://repo1.maven.org/maven2/</url> <mirrorOf>*</mirrorOf> </mirror> 

The Maven site has documentation on repository mirrors .

+4
source

All Articles