scm connection vs developerConnection

MavenMaven Scm

Maven Problem Overview


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]

Maven Solutions


Solution 1 - Maven

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsuperignoView Question on Stackoverflow
Solution 1 - MavenCharlee ChitsukView Answer on Stackoverflow