You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Mang Jun Lau <Ma...@otpp.com> on 2006/02/23 21:52:28 UTC

How are modules specified in parent POM for recursive build?

Hi,

I have a multi-module project with one parent pom.  In my parent pom I 
have something like this:

<modules>
    <module>../moduleA</module>
    <module>../moduleB</module>
    <module>../moduleC</module>
    <module>../moduleD</module>
</modules>

In Continuum, I took off the -N parameter in the parent project so that it 
can build recursively from the parent, just like command line Maven 2.  I 
don't want the projects built individually.  I did a "Build Now" on the 
parent project and I got the following error:

[ERROR] FATAL ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: unknown

Reason: Could not find the model file 
'C:\testapps\221\..\moduleA\pom.xml'.

This is obviously because in my parent POM I've specified the module name 
but Continuum needs to find the pom referenced by the project ID number 
that gets assigned.  So how do you get around this issue?  How do you 
specify the modules properly in the parent POM so that Continuum can find 
it?

For those who have gotten a recursive build to work, could I please know 
what your parent pom looks like and what the directory structure is?

Thanks.


_Mang

Re: How are modules specified in parent POM for recursive build?

Posted by dan tran <da...@gmail.com>.
Here is what I think you have

root
   parent
   moduleA
   moduleB
   moduleC

You need create a shell project where URL points to root and issue a build
definition

    mvn -f parent/pom.xml

-D

On 2/23/06, Mang Jun Lau <Ma...@otpp.com> wrote:
>
> Hi,
>
> I have a multi-module project with one parent pom.  In my parent pom I
> have something like this:
>
> <modules>
>    <module>../moduleA</module>
>    <module>../moduleB</module>
>    <module>../moduleC</module>
>    <module>../moduleD</module>
> </modules>
>
> In Continuum, I took off the -N parameter in the parent project so that it
> can build recursively from the parent, just like command line Maven 2.  I
> don't want the projects built individually.  I did a "Build Now" on the
> parent project and I got the following error:
>
> [ERROR] FATAL ERROR
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: unknown
>
> Reason: Could not find the model file
> 'C:\testapps\221\..\moduleA\pom.xml'.
>
> This is obviously because in my parent POM I've specified the module name
> but Continuum needs to find the pom referenced by the project ID number
> that gets assigned.  So how do you get around this issue?  How do you
> specify the modules properly in the parent POM so that Continuum can find
> it?
>
> For those who have gotten a recursive build to work, could I please know
> what your parent pom looks like and what the directory structure is?
>
> Thanks.
>
>
> _Mang
>

Re: How are modules specified in parent POM for recursive build?

Posted by Yann Le Du <le...@gmail.com>.
Hi Mang,

You can't add a project with modules by upload, you need to provide an URL.
[1]

Moreover, your directory structure won't work, at least for the moment. [2]
You need to stick to the standard layout :
parent
|-- moduleA
|-- moduleB
|-- moduleC
`-- moduleD

[1] http://maven.apache.org/continuum/faqs.html#How-can-I-add-my-maven-2-project-with-modules

[2] http://jira.codehaus.org/browse/MNG-2006

- Yann

2006/2/23, Mang Jun Lau <Ma...@otpp.com>:
>
> Hi,
>
> I have a multi-module project with one parent pom.  In my parent pom I
> have something like this:
>
> <modules>
>     <module>../moduleA</module>
>     <module>../moduleB</module>
>     <module>../moduleC</module>
>     <module>../moduleD</module>
> </modules>
>
> In Continuum, I took off the -N parameter in the parent project so that it
> can build recursively from the parent, just like command line Maven 2.  I
> don't want the projects built individually.  I did a "Build Now" on the
> parent project and I got the following error:
>
> [ERROR] FATAL ERROR
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: unknown
>
> Reason: Could not find the model file
> 'C:\testapps\221\..\moduleA\pom.xml'.
>
> This is obviously because in my parent POM I've specified the module name
> but Continuum needs to find the pom referenced by the project ID number
> that gets assigned.  So how do you get around this issue?  How do you
> specify the modules properly in the parent POM so that Continuum can find
> it?
>
> For those who have gotten a recursive build to work, could I please know
> what your parent pom looks like and what the directory structure is?
>
> Thanks.
>
>
> _Mang
>