You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefan Fritz <sf...@gmx.at> on 2008/10/14 09:38:04 UTC

SCM URL resolution/calculation by Maven

Hi all,

I want to avoid putting a SCM configuration in every pom.
For modules in a module build I found out that maven adds the 
artifact-id to the module-parent-pom's scm url .
I was not able to find any information about the rules of scm URL 
resolution.

What are the rules for SCM URL calculation/resolution?
What are my options to define generic scm urls in a parent pom maybe 
with placeholders for artifactID and groupID?
What if my svn structure doesn't 100% match groupID/artifactID (e.g. 
groupID=com.mycomp --> com/mycomp/ArtifactID)?

Thanks
Stefan




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


Re: SCM URL resolution/calculation by Maven

Posted by Stefan Fritz <sf...@gmx.at>.
Ok, I tried to test that:

In my parent pom I have defined:

  <properties>
    ...
    <urlPattern>${groupId}/${artifactId}</urlPattern>
  </properties>

  <scm>
    <connection>scm:svn:https://myserver/${urlPattern}/trunk</connection>
    <connection>scm:svn:https://myserver/${urlPattern}/trunk</connection>
  </scm>

In my project I have defined this as the parent and added no additional 
SCM configuration.
Maven just adds the artifactID to the URL but the project uses 
trunk/tags/branches directories.

/groupID/artifactID/trunk/pom.xml
/groupID/artifactID/tags
/groupID/artifactID/branches

Maven resolves the URL to 
https://myserver/groupID/artifactID/trunk/artifactID.
It seems that as soon as I want to adhere to the trunk/tags/branches 
structure (which I need for the release process) the SCM resolution is 
not usable.
Correct or is there a "recognizeTrunkTagsBranches" switch somewhere? ;-)

Thanks
Stefan





Brett Porter wrote:
>
> On 14/10/2008, at 6:38 PM, Stefan Fritz wrote:
>
>> Hi all,
>>
>> I want to avoid putting a SCM configuration in every pom.
>> For modules in a module build I found out that maven adds the 
>> artifact-id to the module-parent-pom's scm url .
>> I was not able to find any information about the rules of scm URL 
>> resolution.
>>
>> What are the rules for SCM URL calculation/resolution?
>
> They are as you've said.
>
>>
>> What are my options to define generic scm urls in a parent pom maybe 
>> with placeholders for artifactID and groupID?
>> What if my svn structure doesn't 100% match groupID/artifactID (e.g. 
>> groupID=com.mycomp --> com/mycomp/ArtifactID)?
>
> At present there's no facility to do this, so you need to redefine 
> them correctly for the POMs that don't match the convention.
>
> - Brett
>
>>
>>
>> Thanks
>> Stefan
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> -- 
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


Re: SCM URL resolution/calculation by Maven

Posted by Brett Porter <br...@apache.org>.
On 14/10/2008, at 6:38 PM, Stefan Fritz wrote:

> Hi all,
>
> I want to avoid putting a SCM configuration in every pom.
> For modules in a module build I found out that maven adds the  
> artifact-id to the module-parent-pom's scm url .
> I was not able to find any information about the rules of scm URL  
> resolution.
>
> What are the rules for SCM URL calculation/resolution?

They are as you've said.

>
> What are my options to define generic scm urls in a parent pom maybe  
> with placeholders for artifactID and groupID?
> What if my svn structure doesn't 100% match groupID/artifactID (e.g.  
> groupID=com.mycomp --> com/mycomp/ArtifactID)?

At present there's no facility to do this, so you need to redefine  
them correctly for the POMs that don't match the convention.

- Brett

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

--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/


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