maven scm plugin - what is the url config-value?

Rop picture Rop · Nov 20, 2011 · Viewed 7.1k times · Source

Question re. the Maven scm-plugin: http://maven.apache.org/scm/plugins/usage.html

Example, in pom.xml:

  <scm>
    <connection>scm:svn:http://somerepository.com/svn_repo/trunk</connection>
    <developerConnection>scm:svn:https://somerepository.com/svn_repo/trunk</developerConnection>
    <url>http://somerepository.com/view.cvs</url>
  </scm>

What exactly is the <url> tag used for?

The other two I found explained here: http://maven.apache.org/pom.html

"connection, developerConnection: The two connection elements convey to how one is to connect to the version control system through Maven. Where connection requires read access for Maven to be able to find the source code (for example, an update), developerConnection requires a connection that will give write access."

But I cant find anywhere what is the purpose of the <url> tag?

In particular, does <url> have any effect on the deploy-cycle or the

mvn release:prepare
mvn release:perform

commands?

Thanks,

Answer

matsev picture matsev · Nov 20, 2011

From Maven's xsd (scroll down to Scm and then url close to the end):

The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.

In other words, if you have setup your project so that the developer can browse the source using a web browser (without checking out the code), the <url> tag points to the browsable root directory of the project's source code.

The <url> tag is not used by mvn release:prepare or mvn release:perform. It is used by tools such as Sonar so that the source code can be easily accessed from someone that reads the tool's report.