You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by DI Kurt Edegger <ed...@telbiomed.at> on 2007/04/10 11:18:02 UTC

Project Inheritance reference to parent dependency?

Hi,

I do have a question regarding referencing the parent pom of a multi module project as described in chapter 3 of "Better Builds With Maven".
If a project consists of multiple modules (e.g.: api, core,  model, ..), these modules reside in sub-directories of a top level directory. Each module has it's own pom.xml and the top level directory 
holds a pom.xml where project global settings are defined. Each module's pom sets a reference to the parent, by defining the following snippet:
<parent>
   <groupId/>
   <artifactId/>
   <version/>
</parent>

Is there a way to reference the parent module without explicitly specifying the version? In a scenario where all modules are released at the same time, their version should be the same, so the 
application version is defined in the parent pom.xml. But whenever this version changes, all references in the sub-modules need to be updated.

It's cumbersome to manually edit every pom.xml in every sub-directory, just because the application version has changed.

Do I miss something here?

Thanks for any comments,

Kurt

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


Re: Project Inheritance reference to parent dependency?

Posted by DI Kurt Edegger <ed...@telbiomed.at>.
Hi,

thank you Jerome for your fast response!
I'll check out that plugin.

Take care, Kurt

Jerome Lacoste schrieb:
> On 4/10/07, DI Kurt Edegger <ed...@telbiomed.at> wrote:
>> Hi,
>>
>> I do have a question regarding referencing the parent pom of a multi 
>> module project as described in chapter 3 of "Better Builds With Maven".
>> If a project consists of multiple modules (e.g.: api, core,  model, 
>> ..), these modules reside in sub-directories of a top level directory. 
>> Each module has it's own pom.xml and the top level directory
>> holds a pom.xml where project global settings are defined. Each 
>> module's pom sets a reference to the parent, by defining the following 
>> snippet:
>> <parent>
>>    <groupId/>
>>    <artifactId/>
>>    <version/>
>> </parent>
>>
>> Is there a way to reference the parent module without explicitly 
>> specifying the version? In a scenario where all modules are released 
>> at the same time, their version should be the same, so the
>> application version is defined in the parent pom.xml. But whenever 
>> this version changes, all references in the sub-modules need to be 
>> updated.
>>
>> It's cumbersome to manually edit every pom.xml in every sub-directory, 
>> just because the application version has changed.
>>
>> Do I miss something here?
> 
> Yes: http://maven.apache.org/plugins/maven-release-plugin/
> 
> The plugin will take care if the POM updates for you.
> 
> Jerome
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


-- 
DI Kurt Edegger
Austrian Research Centers GmbH - ARC
Biomedical Engineering / eHealth systems

Reininghausstrasse 13/1
A-8020 Graz, Austria

T: +43 (0)316 586570-58
F: +43 (0)316 586570-12
E: kurt.edegger@arcsmed.at
H: www.arcsmed.at/ehs

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


Re: Project Inheritance reference to parent dependency?

Posted by Jerome Lacoste <je...@gmail.com>.
On 4/10/07, DI Kurt Edegger <ed...@telbiomed.at> wrote:
> Hi,
>
> I do have a question regarding referencing the parent pom of a multi module project as described in chapter 3 of "Better Builds With Maven".
> If a project consists of multiple modules (e.g.: api, core,  model, ..), these modules reside in sub-directories of a top level directory. Each module has it's own pom.xml and the top level directory
> holds a pom.xml where project global settings are defined. Each module's pom sets a reference to the parent, by defining the following snippet:
> <parent>
>    <groupId/>
>    <artifactId/>
>    <version/>
> </parent>
>
> Is there a way to reference the parent module without explicitly specifying the version? In a scenario where all modules are released at the same time, their version should be the same, so the
> application version is defined in the parent pom.xml. But whenever this version changes, all references in the sub-modules need to be updated.
>
> It's cumbersome to manually edit every pom.xml in every sub-directory, just because the application version has changed.
>
> Do I miss something here?

Yes: http://maven.apache.org/plugins/maven-release-plugin/

The plugin will take care if the POM updates for you.

Jerome

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