Multi-module project with Aggregation and SCM

2007-05-07 Thread Luís Soares
Hi all,

 I was wondering if it is possible the following procedure:
 
I have a multi-module maven project that has, lets say, 3 modules:

Project
 - Module1
 - Module2
 - Module3

In the top-level pom I state that there are several modules aggregated:

modules
  moduleModule1/module
  moduleModule2/module
  moduleModule3/module
/modules


Now, I was wondering if is there a way that I can get maven to, and
given only the root pom, fetch the submodules from a SCM URL (different
for each module).


$ ls -la
pom.xml
$ mvn ...
...
$ ls
Module1  Module2  Module3  pom.xml

-- 
Luís Soares
* [EMAIL PROTECTED] * http://gsd.di.uminho.pt/members/los *
* gpg: C55B F036 E664 AFD3 40C8 7322 1978 6C65 E678 C223 *


signature.asc
Description: This is a digitally signed message part


Re: Multi-module project with Aggregation and SCM

2007-05-07 Thread Olivier Dehon
You can define relative paths to your modules' directories from the 
parent POM's directory:


modules

 module../Module1/module
 module../../Other/Module2/module
 moduleModule3/module
/modules

-Olivier

Luís Soares wrote:

Hi all,

 I was wondering if it is possible the following procedure:
 
I have a multi-module maven project that has, lets say, 3 modules:


Project
 - Module1
 - Module2
 - Module3

In the top-level pom I state that there are several modules aggregated:

modules
  moduleModule1/module
  moduleModule2/module
  moduleModule3/module
/modules


Now, I was wondering if is there a way that I can get maven to, and
given only the root pom, fetch the submodules from a SCM URL (different
for each module).


$ ls -la
pom.xml
$ mvn ...
...
$ ls
Module1  Module2  Module3  pom.xml

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multi-module project with Aggregation and SCM

2007-05-07 Thread Luís Soares
Hi all,

 I was wondering if it is possible the following procedure:
 
I have a multi-module maven project that has, lets say, 3 modules:

Project
 - Module1
 - Module2
 - Module3

In the top-level pom I state that there are several modules aggregated:

modules
  moduleModule1/module
  moduleModule2/module
  moduleModule3/module
/modules


Now, I was wondering if is there a way that I can get maven to, and
given only the root pom, fetch the submodules from a SCM URL (different
for each module).


$ ls -la
pom.xml
$ mvn ...
...
$ ls
Module1  Module2  Module3  pom.xml


-- 
Luís Soares
* [EMAIL PROTECTED] * http://gsd.di.uminho.pt/members/los *
* gpg: C55B F036 E664 AFD3 40C8 7322 1978 6C65 E678 C223 *


signature.asc
Description: This is a digitally signed message part


Re: Multi-module project with Aggregation and SCM

2007-05-07 Thread Roland Asmann
If your complete project is build as a tree (parent contains the modules as 
directories), that is no problem at all. In fact, that's the default that 
Maven will do when checking out your project.

In your example, it appears your directory-structur is okay, so you should be 
ready to go!
Take a look at the scm-plugin (http://maven.apache.org/scm/plugins/) for the 
command to checkout your project from SCM.

On Monday 07 May 2007 13:19, Luís Soares wrote:
 Hi all,

  I was wondering if it is possible the following procedure:

 I have a multi-module maven project that has, lets say, 3 modules:

 Project
  - Module1
  - Module2
  - Module3

 In the top-level pom I state that there are several modules aggregated:

 modules
   moduleModule1/module
   moduleModule2/module
   moduleModule3/module
 /modules


 Now, I was wondering if is there a way that I can get maven to, and
 given only the root pom, fetch the submodules from a SCM URL (different
 for each module).


 $ ls -la
 pom.xml
 $ mvn ...
 ...
 $ ls
 Module1  Module2  Module3  pom.xml

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multi-module project with Aggregation and SCM

2007-05-07 Thread Roland Asmann
On Monday 07 May 2007 15:32, Luís Soares wrote:
 First, Thanks for replying.

 Second, I am not a maven2 guru, but judging from your words, I would
 have to have a full maven tree (and their corresponding poms) in the
 source code management repository. That is precisely what I want to
 avoid. Notice that I wish to:

 1. checkout a maven2 (meta-)project using my favorite SCM.

No problem here, this should work.

 2. use maven and the information in the root pom, checked out in 1.,
 to build its project tree (which, obviously includes creating the
 sub-modules directories and checking out their sources and poms from
 their correspondent SCMs locations).

I think the problem will be to locate the sub-modules in your SCM... For 
creating new projects, you could use the archetype-plugin, but checking out 
modules that are in different locations will not work.

It might be worth a try though, to define the modules in the same way as your 
projects are found in your SCM (../module or ../../project/module), although 
I have never tried something like that, and Maven surely wasn't thought for 
that... But give it a try and see what happens... And report back to us, so 
we know if it can be done! ;-)
If it works, I do fear that the modules will not be found under the current 
project though. I believe the ../-prefixes will be set on the modules as 
well.. They have to be though, since Maven will look for the modules at those 
locations...

Good luck (and sorry to be of so little help)!

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]