maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TenLeftFingers <jarlathre...@gmail.com>
Subject Re: Making parent pom the absolute authority over it's children's versioning
Date Thu, 15 Aug 2013 15:03:36 GMT
Hi Ziga,

That's very nice. When I omit the <version> for the child, the build adopts
whatever is declared for <parent><version>, which reduces the amount of
work I need to do. Thanks for the tip.

Regards,
Ten


On Thu, Aug 15, 2013 at 3:15 PM, Ziga Gregoric [via Maven] <
ml-node+s40175n5767820h97@n5.nabble.com> wrote:

> Ten,
>
> you might not need version in your child pom.xml files, if child pom.xml
> already have parent pom version.
> In my multi module project, with following structure - 4 pom files, 1 for
> the parent, and 3 for modules:
>
> + parent (pom)
> - child1 (jar)
> - child2 (jar)
> - child3 (war)
>
> I'd define version in parent pom, but in childX poms, there will be no
> version defined, apart from parent's version inside
> //project/parent/vesion
>
> Regards,
> Ziga
>
>
> On Wed, Aug 14, 2013 at 4:18 PM, TenLeftFingers <[hidden email]<http://user/SendEmail.jtp?type=node&node=5767820&i=0>>wrote:
>
>
> > Stephen Connolly, thank you. I'm going to look into that plugin and try
> to
> > automate this process during build-time.
> >
> > Joachim Van der Auwera, thanks. I'll use this solution while I learn how
> to
> > implement Stephen Connolly's idea.
> >
> > Best regards,
> > Ten
> >
> >
> > On Wed, Aug 14, 2013 at 2:32 PM, Joachim Van der Auwera [via Maven] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5767820&i=1>>
> wrote:
> >
> > > Istead of editing the parent pom by hand, you could use a maven to do
> > > this for you. This will change all versions in the child
> > > projects/directories as well:
> > >
> > > mvn versions:set -DnewVersion=1.0.0.20-SNAPSHOT
> > >
> > > Kind regards,
> > > Joachim
> > >
> > > On 08/14/2013 11:01 AM, TenLeftFingers wrote:
> > >
> > > > I have a project laid out like this:
> > > >
> > > > +parent-project
> > > >   -child-project1
> > > >   +child-project2
> > > >    -src
> > > >    -child-project2.pom
> > > >   parent-project.pom
> > > >
> > > > The parent defines its own version:
> > > >    <version>4.4.5-SNAPSHOT</version>
> > > >
> > > > And child-project two has in it's pom:
> > > >    <parent>
> > > >  <groupId>com.company.it.apps</groupId>
> > > >  <artifactId>parent-project</artifactId>
> > > >  <version>4.4.5-SNAPSHOT</version>
> > > >    </parent>
> > > >
> > > > The issue I'm having is that I want the person doing the builds to
> only
> > > have
> > > > to change the <version> in the parent-project. I want the
> > child-projects
> > > to
> > > > *take* their version from there so that he only has to make one
> change.
> > > But
> > > > if I change the child to declare it's own version as:
> > > >
> > > >    <version>${parent.version}</version>
> > > >
> > > > this actually takes it from the version declared in the child .pom.
> > Yet,
> > > if
> > > > I don't delcare the version in the child pom it won't know which
> > version
> > > of
> > > > the parent to go for...
> > > >
> > > > Am I trying to do the impossible? I don't want to have every child's
> > pom
> > > > modified to go from SNAPSHOT to release because in reality the
> projects
> > > are
> > > > much larger.
> > > >
> > > > Thanks & regards,
> > > > Ten
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > >
> >
> http://maven.40175.n5.nabble.com/Making-parent-pom-the-absolute-authority-over-it-s-children-s-versioning-tp5767638.html
> > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5767695&i=0>
> > > > For additional commands, e-mail: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5767695&i=1>
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5767695&i=2>
> > > For additional commands, e-mail: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5767695&i=3>
> > >
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://maven.40175.n5.nabble.com/Making-parent-pom-the-absolute-authority-over-it-s-children-s-versioning-tp5767638p5767695.html
> > >  To unsubscribe from Making parent pom the absolute authority over
> it's
> > > children's versioning, click here<
> >
> >
> > > .
> > > NAML<
> >
> http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://maven.40175.n5.nabble.com/Making-parent-pom-the-absolute-authority-over-it-s-children-s-versioning-tp5767638p5767703.html
>
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://maven.40175.n5.nabble.com/Making-parent-pom-the-absolute-authority-over-it-s-children-s-versioning-tp5767638p5767820.html
>  To unsubscribe from Making parent pom the absolute authority over it's
> children's versioning, click here<http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5767638&code=amFybGF0aHJlaWR5QGdtYWlsLmNvbXw1NzY3NjM4fDEyMDg3OTQ0MDQ=>
> .
> NAML<http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://maven.40175.n5.nabble.com/Making-parent-pom-the-absolute-authority-over-it-s-children-s-versioning-tp5767638p5767823.html
Sent from the Maven - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message