You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mark Struberg <st...@yahoo.de> on 2010/08/19 11:53:25 UTC

[DISCUSS] [SCM] dynamic URL modification in child modules

Hi!

I'd like to get your opinion about slightly tweaking the current magic of 
dynamically adopting scm URLs.

The CURRENT situation:

If you have a multi module project (parent + child modules with other childs) 
and specify the <scm><connection> and <developerConnection> URLs only in the 
root pom.xml then some magic appears and adds the artifactId/childModule path to 
this URLs.

So if you have an URL like 

scm:git:git://github.com/olamy/scm-git-test.git
and execute a 
$> mvn help:effective-pom
in a child module (cd my-app-webapp)
then you will see the following effective URL in your child projects Model:
scm:git:git://github.com/olamy/scm-git-test.git/my-app-webapp

The reason is that a long time ago some special mechanism to fix an issue with 
SVN and CVS was hacked into 

DefaultModelInheritanceAssembler#assembleModelInheritance which calls
childScm.setDeveloperConnection( appendPath( parentScm.getDeveloperConnection(), 
child.getArtifactId(), childPathAdjustment, appendPaths ) );

But this solution is not a golden bullet for many other SCMs (especially GIT).


PROPOSAL:

Possible solutions:

1.) let the defined maven-scm-provider decide whether the URL needs to be 
extended or not. 

Sadly this might not work since we are way too early in the lifecycle to 
determine and ask any scm-provider

2.) extend the pom schema and define a attribute or tag to specify if this 
dynamic childPathAdjustment should be applied

3.) do this childPathAdjustment only for SVN, CVS and other SCMs which need this 
mechanism for now. 

The list is pretty much static but should be configurable (e.g. via modello) to 
allow future extensions. 


Read http://jira.codehaus.org/browse/MRELEASE-457 for more background 
information.

txs and LieGrue,
strub



      

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