You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2009/03/24 15:13:46 UTC

Multi Module Setup

Hi,

i have a large project which contains multiple modules and sub-modules.


   Base (packaging: POM)
    +--- M1 (parent: Base)
    +--- M2 (parent: Base)
    +--- M3 (packaging: POM; parent: Base)
          +--- M3.1 (parent: M3)
          +--- M3.2 (parent: M3)
    +--- M4(packaging: POM; parent: Base)
          +--- m4.1 (parent: M4)
          +--- M4.2 (parent: M4)
    +--- M5 (parent: Base)


Ater some fixup's in the pom (missing version numbers of plugin etc.)...

I tried to do a mvn install ....but
i got the message Cannot find parent M3...for project M3.1...

As supplemental information i use as a version for the modules

<version>${parent.version}</version> instead of writing it explicit 
there...(not in the parent declaration).

Does anybody has a hint ?

Thanks in advance...

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

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


Re: Multi Module Setup

Posted by Stephen Connolly <st...@gmail.com>.
2009/3/24 Karl Heinz Marbaise <kh...@gmx.de>

> Hi Stephen,
>
>  If you are doing that you'd be better omitting the version entirely as it
>> will be inherited from the parent...
>>
> Yeah i changed that and it worked...great...
>
>  <project>
>>  <parent>
>>    <groupId>foo</groupId>
>>    <artifactId>bar</artifactId>
>>    <version>1.0-SNAPSHOT</version>
>>  </parent>
>>  <artifactId>manchu</artifactId>
>> </project>
>>
>> is exactly equivalent to
>>
>> <project>
>>  <parent>
>>    <groupId>foo</groupId>
>>    <artifactId>bar</artifactId>
>>    <version>1.0-SNAPSHOT</version>
>>  </parent>
>>  <groupId>${project.parent.groupId}</groupId>
>>
> I use different groups...
>

That's fine, I was just illustrating the inheritance

>
>
>   <artifactId>manchu</artifactId>
>>  <version>${project.parent.version}</version>
>>
> I just removed the <version> entries....
> That's what the problem solved...
>
> Many thanks...
>

Grand so


>
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
> Hauptstrasse 177                         USt.IdNr: DE191347579
> 52146 Würselen                           http://www.soebes.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Multi Module Setup

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Stephen,

> If you are doing that you'd be better omitting the version entirely as it
> will be inherited from the parent...
Yeah i changed that and it worked...great...

> <project>
>   <parent>
>     <groupId>foo</groupId>
>     <artifactId>bar</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
>   <artifactId>manchu</artifactId>
> </project>
> 
> is exactly equivalent to
> 
> <project>
>   <parent>
>     <groupId>foo</groupId>
>     <artifactId>bar</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
>   <groupId>${project.parent.groupId}</groupId>
I use different groups...

>   <artifactId>manchu</artifactId>
>   <version>${project.parent.version}</version>
I just removed the <version> entries....
That's what the problem solved...

Many thanks...

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

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


Re: Multi Module Setup

Posted by Stephen Connolly <st...@gmail.com>.
2009/3/24 Karl Heinz Marbaise <kh...@gmx.de>

> Hi,
>
> i have a large project which contains multiple modules and sub-modules.
>
>
>  Base (packaging: POM)
>   +--- M1 (parent: Base)
>   +--- M2 (parent: Base)
>   +--- M3 (packaging: POM; parent: Base)
>         +--- M3.1 (parent: M3)
>         +--- M3.2 (parent: M3)
>   +--- M4(packaging: POM; parent: Base)
>         +--- m4.1 (parent: M4)
>         +--- M4.2 (parent: M4)
>   +--- M5 (parent: Base)
>
>
> Ater some fixup's in the pom (missing version numbers of plugin etc.)...
>
> I tried to do a mvn install ....but
> i got the message Cannot find parent M3...for project M3.1...
>
> As supplemental information i use as a version for the modules
>
> <version>${parent.version}</version> instead of writing it explicit
> there...(not in the parent declaration).
>

If you are doing that you'd be better omitting the version entirely as it
will be inherited from the parent...

thus

<project>
  <parent>
    <groupId>foo</groupId>
    <artifactId>bar</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>manchu</artifactId>
</project>

is exactly equivalent to

<project>
  <parent>
    <groupId>foo</groupId>
    <artifactId>bar</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <groupId>${project.parent.groupId}</groupId>
  <artifactId>manchu</artifactId>
  <version>${project.parent.version}</version>
</project>



>
> Does anybody has a hint ?
>
> Thanks in advance...
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
> Hauptstrasse 177                         USt.IdNr: DE191347579
> 52146 Würselen                           http://www.soebes.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>