Maven uses wrong repository to download

If you look at the pom that is references by jersey, it includes some repo from glassfish.org. http://download.java.net/maven/2//com/sun/jersey/jersey-server/1.5/jersey-server-1.5.pom

<repositories>
    <repository>
        <id>glassfish-repository</id>
        <name>Repository for Glassfish</name>
        <url>http://maven.glassfish.org/content/groups/glassfish</url>
    </repository>
</repositories>

When the transitive dependencies are tried to download, the server sends a redirect response, hence you see checksum error in the log that you provided.

try this in browser: http://maven.glassfish.org/content/groups/glassfish/com/sun/jersey/jersey-project/1.5/jersey-project-1.5.pom

I know this is not solution to your problem (and too cumbersome), but can you try to mvn install the dependencies needed for jerser-server 1.5 locally so that it does not try to download those?


Try to add repository of the maven central before others:

<repositories>
    <repository>
        <id>maven-central</id>
        <url>http://repo1.maven.org/maven2</url>
    </repository>
    ...
</repositories>

Better option would be setting up of the nexus server and getting rid of repository sections in pom files: http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/

Tags:

Maven