users@jersey.java.net

Re: [Jersey] maven problems with the LATEST jersey artifacts

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Mon, 19 Oct 2009 18:56:51 +0200

On Mon, Oct 19, 2009 at 12:41:33PM -0400, Jeanfrancois Arcand wrote:
>
>
> Jakub Podlesak wrote:
> >This is a really strange issue, experienced recently
> >also in Atmosphere project and our Jersey samples.
> >
> >I do not know the exact reason why the following fix worked
> >in the above mentioned cases, but there is a chance
> >it could work for you as well:
> >
> >within repositories section of your pom:
> >
> > i presume, you have
> > <repository>
> > <id>maven2-repository.dev.java.net</id>
> > <name>Java.net Repository for Maven</name>
> > <url>http://download.java.net/maven/2/</url>
> > <layout>default</layout>
> > </repository>
> > presented there, then please try to push it down, so that
> > this is the last repository defined in the repositories section.
>
> The fix I did was:
>
> >Modified: trunk/atmosphere/pom.xml
> >Url:
> >https://atmosphere.dev.java.net/source/browse/atmosphere/trunk/atmosphere/pom.xml?view=diff&rev=553&p1=trunk/atmosphere/pom.xml&p2=trunk/atmosphere/pom.xml&r1=552&r2=553
> >==============================================================================
> >--- trunk/atmosphere/pom.xml (original)
> >+++ trunk/atmosphere/pom.xml 2009-10-16 15:03:15+0000
> >@@ -250,6 +250,11 @@
> > </pluginRepositories>
> > <repositories>
> > <repository>
> >+ <id>glassfish-repository</id>
> >+ <name>Java.net Repository for Glassfish</name>
> >+ <url>http://download.java.net/maven/glassfish</url>
> >+ </repository>
> >+ <repository>
> > <id>scala-tools.org</id>
> > <name>Scala-Tools Maven2 Repository</name>
> > <url>http://scala-tools.org/repo-releases</url>
> >@@ -289,14 +294,6 @@
> > <name>repository.codehaus.org</name>
> > <url>http://repository.codehaus.org</url>
> > </repository>
> >- <repository>
> >- <id>glassfish-repository</id>
> >- <name>Java.net Repository for Glassfish</name>
> >- <url>http://download.java.net/maven/glassfish</url>
> >- <snapshots>
> >- <updatePolicy>never</updatePolicy>
> >- </snapshots>
> >- </repository>
> > </repositories>
> > <distributionManagement>
> > <repository>
> >@@ -370,7 +367,7 @@
>
> Put the repository first in the list...strange solution, but it worked.

Indeed, as for the Jersey samples, the http://download.java.net/maven/glassfish
repository is now in the middle, and http://download.java.net/maven/2 is the last one,
which also works.
I blame maven, that it does not work well with the repositories, but do not have
a simple test case proving it at my hand.

~Jakub

>
> A+
>
> --Jeanfrancois
>
>
> >
> >~Jakub
> >
> >On Mon, Oct 19, 2009 at 06:13:29PM +0200, Felipe Gaúcho wrote:
> >><jersey-version>[1.1.3-ea,)</jersey-version>
> >>
> >>Downloading:
> >>http://download.java.net/maven/glassfish/com/sun/jersey/jersey-project/1.1.5-ea-SNAPSHOT/jersey-project-1.1.5-ea-SNAPSHOT.pom
> >>[INFO]
> >>------------------------------------------------------------------------
> >>[ERROR] BUILD ERROR
> >>[INFO]
> >>------------------------------------------------------------------------
> >>[INFO] Error building POM (may not be this project's POM).
> >>
> >>
> >>Project ID: null:jersey-server:jar:null
> >>
> >>Reason: Cannot find parent: com.sun.jersey:jersey-project for project:
> >>null:jersey-server:jar:null for project null:jersey-server:jar:null
> >>
> >> <dependencyManagement>
> >> <dependencies>
> >> <dependency>
> >> <groupId>com.sun.jersey</groupId>
> >> <artifactId>jersey-server</artifactId>
> >> <version>${jersey-version}</version>
> >> <scope>provided</scope>
> >> </dependency>
> >> <dependency>
> >> <groupId>com.sun.jersey</groupId>
> >> <artifactId>jersey-bundle</artifactId>
> >> <version>${jersey-version}</version>
> >> </dependency>
> >> </dependencies>
> >> </dependencyManagement>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >>For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
Jakub Podlešák
Software Engineer at SUN Microsystems And CZJUG Co-Leader
http://blogs.sun.com/japod