maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: scm connection in parent pom
Date Wed, 20 Oct 2010 07:51:54 GMT
On 20 October 2010 08:38, Andreas Sewe
<sewe@st.informatik.tu-darmstadt.de> wrote:
> Hi Phillip,
>
>> Does it make sense and will it work to define the scm connection in a
>> parent pom if all my projects follow the same layout in SVN?
>>
>> i.e.,
>> <connection>scm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk</connection>
>
> in theory, the above makes sense, but in practice you will encounter a
> problem: if scm/connection is inherited by a child POM, Maven automatically
> appends the equivalent of "/${project.artifactId}" to your SCM URL.
>

IIRC the appending is controlled by the presence of a / at the end of the URI

if the URI ends with a slash then it will not append the module name in children

if the URI does not end with a slash then it will append the module
name in children

of course I could be mistaken and this might only apply to
/project/url but I thought it also applied to /project/scm/*

Another thing is that the use of ${artifactId} is deprecated and you
should reference those properties with the project. prefix, e.g.
${project.artifactId}

-Stephen

> Thus, you end up with
> "scm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/${project.artifactId}",
> which is in all likelihood not what you intended. (You are aiming for a flat
> repository layout here, which parent and child on the same level, right?)
>
> Unfortunately, Maven is extremely prejudiced in favour of a hierarchical
> layout. But if there are any good workarounds other than copy-and-pasting
> scm/connection in all the child POMs I would love to hear about them.
>
> I hope this helps.
>
> Andreas
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message