Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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,

like image 520
Rop Avatar asked Nov 20 '11 08:11

Rop


People also ask

What does maven SCM plugin do?

The SCM Plugin offers vendor independent access to common scm commands by offering a set of command mappings for the configured scm. Each command is implemented as a goal.

What is SCM Developer Connection?

As mentioned in POM Reference: SCM The 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 .

What does SCM stand for maven?

SCM stands for Source Code Management and the plugin provides integrations for different SCM systems like git or subversion.

How does maven release plugin work?

The plugin will extract file revisions associated with the current release. Maven will compile, test and package the versioned project source code into an artifact. The final deliverable will then be released into an appropriate maven repository.


2 Answers

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.

like image 119
matsev Avatar answered Oct 20 '22 03:10

matsev


For our projects we only set the connection and the developerConnection. I think you can ignore the url.

The url is probably for information purposes. You could add a link to your companys or even projects homepage.

like image 34
Udo Held Avatar answered Oct 20 '22 04:10

Udo Held