Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scm connection vs developerConnection

Can anyone tell me the difference between scm connection and developerConnection in maven?

I am trying to build using mvn release:prepare and it requires either one of them.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project was-topology-legacy-dsl: Missing required setting: scm connection or developerConnection must be specified. -> [Help 1]

like image 789
superigno Avatar asked Apr 16 '15 00:04

superigno


People also ask

What is SCM connection?

SCM Connections provides innovative process design, quality implementations, and sustainable adoption for long-term supply chain forecasting methods.

What is the use of SCM tag in POM XML?

Assuming that SCM has been configured in the pom. xml and the project directory is managed by a SCM, invoking the checkin goal in the scm will start the commit process for all configured sources in your pom. xml. The files should be added beforehand by an external scm client.

What is SCM in maven POM?

Maven SCM supports Maven plugins (for example maven-release-plugin) and other tools by providing them with a common API for source code management operations. You can look at the list of SCMs for more information on using Maven SCM with your favorite SCM tool.

What is the use of maven release plugin?

The main aim of the maven-release plugin is to provide a standard mechanism to release project artifacts outside the immediate development team. The plugin provides basic functionality to create a release and to update the project's SCM accordingly.


1 Answers

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. It is an information for our project where the other, including with another maven plugin to re-use this information further. In this case the Maven Release Plugin.

The Maven Release Plugin: Prepare a Release also provides us the behind the scenes what it does for us during the release:prepare. There are some significant steps which requires the access to the scm as the following: -

  1. Transform the SCM information in the POM to include the final destination of the tag
  2. Tag the code in the SCM with a version name (this will be prompted for)
  3. Commit the modified POMs

This means we should provide the scm information when using the maven release plugin. Especially the developerConnection. If we don't provide, the plugin is not able to execute.

Another useful information is Maven Release Plugin: Perform a Release and Maven Release Plugin: Rollback a Release.

like image 114
Charlee Chitsuk Avatar answered Sep 24 '22 21:09

Charlee Chitsuk