Yes you just put it in the <parent> part. The module doesn't need to
redefine it. You inherit it from the parent.
Each pom need to have the version at least one version defined in
project/parent/version or in project/version

Cheers,

Arnaud Héritier
Software Factory Manager
eXo platform - http://www.exoplatform.com
---
http://www.aheritier.net


On Mon, Nov 30, 2009 at 11:06 PM, Baptiste MATHUS <[email protected]> wrote:

> Err, this is exactly what we do.
>
> I might be wrong, but the only thing that's compulsory is the version of
> the
> referenced parent pom.
> If the child project has the same version (or the same groupId) you can
> just
> remove it from the child pom.
>
> This is what we have been doing for something like 6 or seven releases of a
> multimodules project (20+ modules) with same version for the whole tree
> without any problem, but I have might have missed something.
>
> Cheers.
>
> 2009/11/30 Arnaud HERITIER <[email protected]>
>
> > Not in Maven 2.X
> > Will be possible in Maven 3.x
> > But personally I don't see the problem to have them if you use the
> release
> > plugin and if required the versions plugin to update them.
> >
> > Arnaud Héritier
> > Software Factory Manager
> > eXo platform - http://www.exoplatform.com
> > ---
> > http://www.aheritier.net
> >
> >
> > On Mon, Nov 30, 2009 at 4:27 PM, laredotornado <[email protected]
> > >wrote:
> >
> > >
> > > Hi,
> > >
> > > I'm using Maven 2.2.  In my maven project, I have this fragment in my
> > > pom.xml at the project root ...
> > >
> > >  <name>Myco GA Capitol Tours</name>
> > >  <description>Myco GA Capitol Tours</description>
> > >  <inceptionYear>2009</inceptionYear>
> > >
> > >  <groupId>Myco.galc.capitol.tours</groupId>
> > >  <artifactId>Myco-galc-capitol-tours</artifactId>
> > >  <version>1.0-SNAPSHOT</version>
> > >  <packaging>pom</packaging>
> > >
> > > Then I have a webapp sub-folder and I have this in the webapp/pom.xml
> ...
> > >
> > >
> > >  <parent>
> > >    <groupId>Myco.galc.capitol.tours</groupId>
> > >    <artifactId>Myco-galc-capitol-tours</artifactId>
> > >    <version>1.0-SNAPSHOT</version>
> > >  </parent>
> > >
> > >  <name>Myco GA Capitol Tours Webapp</name>
> > >  <description>Myco GA Capitol Tours Webapp</description>
> > >  <artifactId>Myco-galc-capitol-tours-webapp</artifactId>
> > >  <version>1.0-SNAPSHOT</version>
> > >  <packaging>war</packaging>
> > >
> > >
> > > You'll notice I have "1.0-SNAPSHOT" hard-coded a couple of times in my
> > > webapp/pom.xml.  Is there any way I can replace that with something
> that
> > > will be automatically inherited from the parent?
> > >
> > > Thanks, - Dave
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://old.nabble.com/Maven-2%3A--How-can-I-avoid-hard-coding-the-version-multiple-times--tp26576290p26576290.html
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> > >
> >
>
>
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>

Reply via email to