Oscar Picasso wrote on Wednesday, August 01, 2007 7:31 PM:

> The current Maven behaviour is fine for multimodule projects.
> 
> However I am trying to write a organizational POM that all my projets
> would inherited and wanted to avoid duplication of the scm section.
> 
> So in case of independent projects it does not make sense to put all
> them inside the same trunk.
> 
> I guess currently I cannot avoid this duplication.

Not really, and there's a simple reason: You cannot assume that everyone keeps 
his "organizational POM" in the root of all the projects. Our "organizational 
POM" has SCM URL entries that are used to release the "organizational POM" 
itself. It does not even make sense to inherit them.

However, you may use properties to define the SCM URLs as we do:

<scm>
    <connection>scm|svn|${my.svn.root}${my.svn.tagBase}/trunk</connection>
    
<developerConnection>scm|svn|${my.svn.root}${my.svn.tagBase}/trunk</developerConnection>
    <url>${my.svn.view}${my.svn.tagBase}/trunk</url>
</scm>

while "my.svn.root" and "my.svn.view" are properties that are defined in the 
"organizational POM" and "my.svn.tagBase" is defined in the POM of the project 
root (in case of a multi-module project). But keep in mind, that the 
release-plugin will rewrite the URLs after the first release, so there are no 
properties in the URL anymore anyway. So the whole definition is only useful as 
template for new POMs.

- Jörg

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

Reply via email to