dev@jersey.java.net

Re: Maven POM File Issues

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Tue, 08 May 2012 02:19:41 +0200

Hello Greg,

this is known issue and we can't do anything about that (unfortunately).
Actually I'm little surprised that maven 3.x do handle 301 redirects
properly, I don't have same experience with it myself - in my case it
just downloaded html files and saved it as pom files into my local
repository.

You should be able to overcome it by following instructions from
https://wikis.oracle.com/display/GlassFish/FullBuildInstructions#FullBuildInstructions-Unabletobuildbecausemaven.glassfish.orgisoffline
but I presume you won't like the idea. The easiest way would be upgrade
to some newer Jersey version (1.11+, latest stable is 1.12), which
should not have the dependency on maven.glassfish.org repository at all
(everything is present in maven central), also project structure was
refactored and poms cleaned, so it should be compatible with maven 2.x
and any future versions.

I actually had some spare time and looked more closely to your
dependency and .. looks like you are using only jersey-server for tests
in modules/matterhorn-ingest-service-impl and I was able to build it
with simple change in pom file:

Index: modules/matterhorn-ingest-service-impl/pom.xml
===================================================================
--- modules/matterhorn-ingest-service-impl/pom.xml (revision 12195)
+++ modules/matterhorn-ingest-service-impl/pom.xml (working copy)
@@ -165,7 +165,7 @@
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
- <version>1.1.5</version>
+ <version>1.12</version>
<scope>test</scope>
</dependency>
<dependency>

You are using only JAX-RS API (no Jersey proprietary extensions) so it
is not likely that this change will introduce any regressions. And all
your issues with maven dependencies should be resolved..

Let me know if it works for you.

Regards,
Pavel

On 5/8/12 12:38 AM, Greg Logan wrote:
> Hi folks,
>
> I'm one of the release managers over at Opencast Matterhorn
> (opencastproject.org), and we are hitting a little snag with your POM
> files. Older versions of Maven (2.x branch) do not follow the http to
> https redirect your repositories are using, and get an exception like
> the following when trying to build:
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building matterhorn-ingest-service-impl
> [INFO] task-segment: [clean, install]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set:
> /home/gdl420/trunk/modules/matterhorn-ingest-service-impl/target
> (included: [**], excluded: [])
> Downloading:
> http://repository.opencastproject.org/nexus/content/groups/public/com/sun/jersey/jersey-server/1.1.5/jersey-server-1.1.5.pom
> 7K downloaded (jersey-server-1.1.5.pom)
> Downloading:
> http://maven.glassfish.org/content/groups/glassfish/com/sun/jersey/jersey-project/1.1.5/jersey-project-1.1.5.pom
> 185b downloaded (jersey-project-1.1.5.pom)
> [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
> '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote ='<html>
> <head><title>301' - RETRYING
> Downloading:
> http://maven.glassfish.org/content/groups/glassfish/com/sun/jersey/jersey-project/1.1.5/jersey-project-1.1.5.pom
> 185b downloaded (jersey-project-1.1.5.pom)
> [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
> '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote ='<html>
> <head><title>301' - IGNORING
> [1:05:05 PM CST] Greg Logan:
> http://repository.opencastproject.org/nexus/content/groups/public/com/sun/jersey/jersey-server/1.1.5/jersey-server-1.1.5.pom
>
> Newer versions of Maven handle the redirect properly, which makes me
> think that this is likely a bug of some kind. Unfortunately, Ubuntu
> ships with 2.2.1 as the default so we see a lot of people reporting this
> issue. Is there any chance you could change your pom files to default
> to the https side of things rather than serving up a 301 redirect in
> html? I *think* that would solve the issue, although I will admit that
> I'm not a Maven expert!
>
> G
>