users@jersey.java.net

Re: [Jersey] Continue mavenization of jersey

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Thu, 05 Jun 2008 11:08:04 +0200

On Wed, 2008-06-04 at 11:11 -0700, Jeanfrancois Arcand wrote:
> Paul Sandoz wrote:
> > Grizzly still retains the <version> element, i am not sure why. In any
> > case all artifacts are kept in sync.
>
> I would be interested to learn a fix for that problem, as I failed to
> find a clean solution in Grizzly :-)
AFAIK a child pom can specify the version in the parent element and does
not have to specify it's own version again, as the version is inherited
from the child pom.

This should be sufficient when all poms shall share the same version.

The example is this:

     <parent>
         <groupId>com.sun.jersey</groupId>
         <artifactId>jersey-contribs</artifactId>
         <version>0.8-ea-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <!-- no version element required here -->

When I started with maven I also struggled with the
multi-project/-module version issue, and also thought that it should not
be necessary to specify the version in each artifacts pom again and
again. But from the viewpoint of a (static) dependency (inheritance)
IMHO it makes sense that the version _must_ be specified.

Cheers,
Martin

>
> >
> >
> >> we can just have
> >>
> >> <parent>
> >> <groupId>com.sun.jersey</groupId>
> >> <artifactId>jersey-contribs</artifactId>
> >> <version>0.8-ea-SNAPSHOT</version>
> >> <relativePath>../pom.xml</relativePath>
> >> </parent>
> >> <artifactId>jersey-spring</artifactId>
> >> <packaging>jar</packaging>
> >>
> >> as the version is inherited.
> >>
> >
> > Do you know if it is possible to have this:
> >
> > <parent>
> > <groupId>com.sun.jersey</groupId>
> > <artifactId>jersey-contribs</artifactId>
> > <relativePath>../pom.xml</relativePath>
> > </parent>
> > <artifactId>jersey-spring</artifactId>
> > <packaging>jar</packaging>
> >
> > or even this:
> >
> > <parent>
> > <relativePath>../pom.xml</relativePath>
> > </parent>
> > <artifactId>jersey-spring</artifactId>
> > <packaging>jar</packaging>
> >
> > or this:
> >
> > <parent>
> > <groupId>com.sun.jersey</groupId>
> > <artifactId>jersey-contribs</artifactId>
> > <relativePath>../pom.xml</relativePath>
> > <version>${jersey.version}</version>
> > </parent>
> > <artifactId>jersey-spring</artifactId>
> > <packaging>jar</packaging>
> >
> > i.e. why do we have to duplicate information of the parent pom in the
> > child pom? if we can avoid duplication it would mean we don't have to
> > update every pom file when the version changes.
> >
> > IIRC when i asked about the Grizzly release process Jean Francois said
> > he could not avoid the duplication because "maven is broken"...
>
> Yes, that what I think :-) But I might be the broken component :-)
>
> A+
>
> -- Jeanfrancois
>
>
>
> >
> > Paul.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net