Maven install problem with checksum error or unexpected character markup in xml file

Recently I came over a problem that made me stuck for a while with mvn install

The message that maven had output was:

denispavlov@denis-pavlovs-macbook-pro: /development/projects/java/$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building integration
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-eclipse-plugin

Reason: Error getting POM for 'org.apache.maven.plugins:maven-eclipse-plugin' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/Users/denispavlov/.m2/repository/org/apache/maven/plugins/maven-eclipse-plugin/maven-metadata-custom-plugins.xml': unexpected character in markup   (position: START_TAG seen ...\t};\n\t\t\t\tvar arrSize = bannersizes.length;\n\t\t\t\tfor (var i = 0; i < ... @48:25)
  org.apache.maven.plugins:maven-eclipse-plugin:pom:LATEST


 for project org.apache.maven.plugins:maven-eclipse-plugin

After cleaning the mvn repository and retrying the install I got the following:

denispavlov@denis-pavlovs-macbook-pro: /development/projects/java/$ mvn -up org.apache.maven.plugins:maven-eclipse-plugin
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'org.apache.maven.plugins'.
[INFO] org.apache.maven.plugins: checking for updates from custom-plugins
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '65e455698df961af1b20f93badce7df5cd9b4c07'; remote = '
   
        OpenDNS
   

   
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '65e455698df961af1b20f93badce7df5cd9b4c07'; remote = '
   
        OpenDNS
   

   

Trying all that I could think of, googling (and not finding anything appropriate) and swearing (a lot) I finally undestood what was the problem. Recently we have switched the svn repository that is awailable only from our external network, so our maven repository was only accessible through VPN. After connecting through VPN everything went well. This is not much of a story to tell but the errors above look quite wierd as for errors related to inability to connect to maven repository.

So for all of those who have this problem know that this is due to maven inability to connect to your maven repository.

Hope that this article will save some time for you.

All the best!

This page was last updated on: 22/04/2011 08:06