You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Williams <an...@handyande.co.uk> on 2006/07/01 00:47:16 UTC

Re: Project structure and releasing

I may be wrong, but if your parent is, as in the book, a pom packaged
artifact with a module list then doing a release at that level should
prompt (with sensible defaults) the release of all the modules.

Andy

On Fri, 2006-06-30 at 21:29 +0200, Martijn Dashorst wrote:
> All,
> 
> I've updated the structure of my projects that depend on one another
> to the structure as proposed in the better builds with maven book.
> 
> The one problem I have with this way of building is the link to the
> parent project:
> 
> <parent>
>     <groupId>wicket</groupId>
>     <artifactId>wicket-parent</artifactId>
>     <version>1.2-SNAPSHOT</version>
> </parent>
> 
> Now I have to update all projects to perform a release of say version
> 1.2.1. Or is there a better way?
> 
> BTW. All projects use snapshot dependencies as adviced earlier on this
> mailinglist.
> 
> Martijn
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Project structure and releasing

Posted by Andrew Williams <an...@handyande.co.uk>.
very good point, yes - it raises 2 questions

1) Do we need to start pushing the continuum heirarchy build idea
faster? (trygvis, kenny and I had a brief talk about this yesterday)
2) should ${project.version} for SNAPSHOT perhaps insert SNAPSHOT rather
than the dated stamp, perhaps providing ${project.snapshotversion} for
the origional system?

Thoughts anyone?

Andy

On Sat, 2006-07-01 at 21:41 +0930, Barrie Treloar wrote:
> > of course in your parent pom.xml you can happily use ${project.version}
> > to specify the dependencies on child modules which saves you worrying
> > about that part :)
> 
> I had problems with using ${project.version} as when the artifacts are
> deployed to a snapshot repository the pom metadata is using the
> resolved timestamped snapshot version and not just the latest snapshot
> available.
> 
> I have continuum re-building the system hourly and since the parent
> pom and modules are built individually by continuum I had to change
> from ${project.version} in the parent pom dependency management
> section to -SNAPSHOT and all started working as I expected.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Project structure and releasing

Posted by Barrie Treloar <ba...@gmail.com>.
> of course in your parent pom.xml you can happily use ${project.version}
> to specify the dependencies on child modules which saves you worrying
> about that part :)

I had problems with using ${project.version} as when the artifacts are
deployed to a snapshot repository the pom metadata is using the
resolved timestamped snapshot version and not just the latest snapshot
available.

I have continuum re-building the system hourly and since the parent
pom and modules are built individually by continuum I had to change
from ${project.version} in the parent pom dependency management
section to -SNAPSHOT and all started working as I expected.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Project structure and releasing

Posted by Andrew Williams <an...@handyande.co.uk>.
yes and yes.

When running a release cycle a parent pom's upgrading version will be
cascaded to the "parent" section of child modules, replacing the current
version with the new one.
It is currently necessary to specify the parent version in your child
pom.xml, however, this will be removed in the next major release, I
believe.

of course in your parent pom.xml you can happily use ${project.version}
to specify the dependencies on child modules which saves you worrying
about that part :)

Andy

On Sat, 2006-07-01 at 11:29 +0200, Stefan Hübner wrote:
> Andy,
> 
> are you saying, that deploying the multiproject-pom as 1.2.1 would
> automatically update the submodule's dependency on their parent from
> 1.2-SNAPSHOT to 1.2.1? Is it even necessary to declare the parent's
> version the submodules refer to?
> 
> -Stefan
> 
> 2006/7/1, Andrew Williams <an...@handyande.co.uk>:
> > I may be wrong, but if your parent is, as in the book, a pom packaged
> > artifact with a module list then doing a release at that level should
> > prompt (with sensible defaults) the release of all the modules.
> >
> > Andy
> >
> > On Fri, 2006-06-30 at 21:29 +0200, Martijn Dashorst wrote:
> > > All,
> > >
> > > I've updated the structure of my projects that depend on one another
> > > to the structure as proposed in the better builds with maven book.
> > >
> > > The one problem I have with this way of building is the link to the
> > > parent project:
> > >
> > > <parent>
> > >     <groupId>wicket</groupId>
> > >     <artifactId>wicket-parent</artifactId>
> > >     <version>1.2-SNAPSHOT</version>
> > > </parent>
> > >
> > > Now I have to update all projects to perform a release of say version
> > > 1.2.1. Or is there a better way?
> > >
> > > BTW. All projects use snapshot dependencies as adviced earlier on this
> > > mailinglist.
> > >
> > > Martijn
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Project structure and releasing

Posted by Stefan Hübner <st...@googlemail.com>.
Andy,

are you saying, that deploying the multiproject-pom as 1.2.1 would
automatically update the submodule's dependency on their parent from
1.2-SNAPSHOT to 1.2.1? Is it even necessary to declare the parent's
version the submodules refer to?

-Stefan

2006/7/1, Andrew Williams <an...@handyande.co.uk>:
> I may be wrong, but if your parent is, as in the book, a pom packaged
> artifact with a module list then doing a release at that level should
> prompt (with sensible defaults) the release of all the modules.
>
> Andy
>
> On Fri, 2006-06-30 at 21:29 +0200, Martijn Dashorst wrote:
> > All,
> >
> > I've updated the structure of my projects that depend on one another
> > to the structure as proposed in the better builds with maven book.
> >
> > The one problem I have with this way of building is the link to the
> > parent project:
> >
> > <parent>
> >     <groupId>wicket</groupId>
> >     <artifactId>wicket-parent</artifactId>
> >     <version>1.2-SNAPSHOT</version>
> > </parent>
> >
> > Now I have to update all projects to perform a release of say version
> > 1.2.1. Or is there a better way?
> >
> > BTW. All projects use snapshot dependencies as adviced earlier on this
> > mailinglist.
> >
> > Martijn
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Re: Project structure and releasing

Posted by Barrie Treloar <ba...@gmail.com>.
On 7/3/06, Martijn Dashorst <ma...@gmail.com> wrote:
> Though I read on a separate thread on this list
> (http://www.nabble.com/Top-level-POM-behaviour-t1825699.html#a4980080)
> that doing a module based build is not working for separated projects.
> That is why I didn't put a modules section in the parent project.
>
> Here's the quote from Alexandre:
>
> ---- begin quote ----
> Modules are meant to be built from the top project so you can work on
> all of them at the same time. Don't try to build them separatly
> because it won't work. If it's not what you want and you prefer
> compiling each project separately, you should stick to normal SNAPSHOT
> dependencies.
> ---- end quote ----
>
> In our case, each project may have a separated build: wicket-spring is
> a self contained project with its own website etc.
>
> Am I not grokking something here? Should I add a modules section to my
> parent project?

I'm no expert, I can only speak from what I have made work.

The problem is that Continuum doesn't do a multi-module build.
If you load in a pom that contains modules Continuum will create a new
project, one for each module definition. I'm not even sure I want
Continuum to do a multi-module build as I'd rather it rebuild only the
parts that require rebuilding because of a change rather than the
entire system.  I haven't analysed this enough to work out what makes
sense.

I have not found adding modules to the pom to be a problem, except if
you try to use ${project.version} in the dependency management
sections because the dependency management section will get bound to
the timestamped snapshot version of the parent project's build. Since
the other modules are not being built at the same time you will get
errors that maven can not locate the modules with the same timestamped
snapshot version to download.

It was simple to resolve by replacing ${project.version} with -SNAPSHOT.
Then you have two choices, both of which will work fine in building
your application.
You can build from the top level pom and all the modules at once, or
you can build them individually.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Re: Project structure and releasing

Posted by Martijn Dashorst <ma...@gmail.com>.
Though I read on a separate thread on this list
(http://www.nabble.com/Top-level-POM-behaviour-t1825699.html#a4980080)
that doing a module based build is not working for separated projects.
That is why I didn't put a modules section in the parent project.

Here's the quote from Alexandre:

---- begin quote ----
Modules are meant to be built from the top project so you can work on
all of them at the same time. Don't try to build them separatly
because it won't work. If it's not what you want and you prefer
compiling each project separately, you should stick to normal SNAPSHOT
dependencies.
---- end quote ----

In our case, each project may have a separated build: wicket-spring is
a self contained project with its own website etc.

Am I not grokking something here? Should I add a modules section to my
parent project?

Martijn

On 7/1/06, Andrew Williams <an...@handyande.co.uk> wrote:
> I may be wrong, but if your parent is, as in the book, a pom packaged
> artifact with a module list then doing a release at that level should
> prompt (with sensible defaults) the release of all the modules.
>
> Andy
>
> On Fri, 2006-06-30 at 21:29 +0200, Martijn Dashorst wrote:
> > All,
> >
> > I've updated the structure of my projects that depend on one another
> > to the structure as proposed in the better builds with maven book.
> >
> > The one problem I have with this way of building is the link to the
> > parent project:
> >
> > <parent>
> >     <groupId>wicket</groupId>
> >     <artifactId>wicket-parent</artifactId>
> >     <version>1.2-SNAPSHOT</version>
> > </parent>
> >
> > Now I have to update all projects to perform a release of say version
> > 1.2.1. Or is there a better way?
> >
> > BTW. All projects use snapshot dependencies as adviced earlier on this
> > mailinglist.
> >
> > Martijn
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Download Wicket 1.2 now! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org