PapaFreud
PapaFreud

Reputation: 3878

maven-release-plugin: Is the folder relevant in the scm section of the pom.xml?

We're using a standard svn layout (/branches/x.y, /tags, /trunk) and mvn release (i.e. maven-release-plugin) to perform releases, from the branches.

We usually try to make sure the section follows the branch, so it looks like this

<scm>
    <connection>scm:svn:http://DOMAIN/svn/PROJECT/MODULE/branches/1.5</connection>
    <developerConnection>( same as connection )</developerConnection>
</scm>

Can anybody tell me whether the "branches/1.5" at the end is strictly necessary? Or does maven-plugin figure this out anyway? What happens if it's wrong - say I'm on the 1.5 branch and the scm section of the pom say 1.4, or trunk? I have no immediate desire to try it. :-/

Upvotes: 2

Views: 624

Answers (1)

VonC
VonC

Reputation: 1323483

Considering the Maven SCM url used fr Subversion:

scm:svn:http://[username[:password]@]server_name[:port]/path_to_repository
scm:svn:http://svn.apache.org/svn/root/module

, what you need is the path to the right Maven module within your repo.
Maven won't be able to infer that path on its own, so the 'branches/1.5' is necessary.

See for illustrations the SO question "With the maven-release-plugin, how to branch a module and its children?".

Upvotes: 1

Related Questions