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,
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.
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 .
SCM stands for Source Code Management and the plugin provides integrations for different SCM systems like git or subversion.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With