On 20 October 2010 08:38, Andreas Sewe
<s...@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-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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

Reply via email to