You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthew Vanbiervliet <ma...@gmail.com> on 2005/11/24 14:17:55 UTC

multi-module project - automatic checkout

Hi,

I have a question regarding multi-modules projects with Maven 2.
I have the following multi-module project structure :

Top project
   pom.xml
|--------------------> module1 (pom.xml)
|--------------------> module2 ( pom.xml)
|--------------------> module3 (pom.xml)
                             |---------------------------------->module3.1 (
pom.xml)
                             |---------------------------------->module3.2 (
pom.xml)
|--------------------> module4 (pom.xml)


An important requirement is that each module needs to be stored on a
separate cvs module.

What I want to achieve is that anyone who has got the top project's pom.xml
only would be able to build the whole project. That means that it should be
smart enough to first check out (automatically) all submodules in order to
get the sources as well as the pom.xml for each module. And this recursively
(for example, when it's module3's turn to be built, module3.1 and
module3.2would be checked out first, and then built).

Would this be feasable with Maven 2 or do I have to have all the
subprocjects as subdirectories on the same cvs module (the top project's cvs
module) ?

I am currently writing a plugin that, in the 'validate' lifecycle phase,
does the checkout of all modules listed between top project's pom.xml's
<modules> tag.
However, when executing 'mvn  validate' , Maven fails directly because, at
first, it doesn't find subdirectories (and the pom.xml) corresponding to the
listed modules.

Is there a way to 'hook' a plugin on a parent project and having it executed
before mvn looks at the modules ?

Thank you for your help and ideas.

Matthew

Re: multi-module project - automatic checkout

Posted by Brett Porter <br...@gmail.com>.
On 11/25/05, Matthew Vanbiervliet <ma...@gmail.com> wrote:
> Would this be feasable with Maven 2 or do I have to have all the
> subprocjects as subdirectories on the same cvs module (the top project's cvs
> module) ?

This particular feature is planned for Maven 2.1 or 2.2 (workspaces).

> Is there a way to 'hook' a plugin on a parent project and having it executed
> before mvn looks at the modules ?

You may be better off operating this on a separate pom that doesn't
have the modules, then checking out the other pom along with the rest.

- Brett

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