Henrique Ordine
Henrique Ordine

Reputation: 3337

Maven release:prepare fails with "scm connection or developerConnection must be specified"

I'm trying to prepare a release of my maven project with mvn release:prepare but it fails with the following error:

Caused by: org.apache.maven.plugin.MojoFailureException: Missing required setting: scm connection or developerConnection must be specified.

After reading about these settings on maven.apache.org, I see that there are SVN (Version Control) settings. But I'm not using version control. How should I make a maven release in this case?
I'm using maven 3.0.3.

Upvotes: 42

Views: 47040

Answers (4)

tufac2
tufac2

Reputation: 778

You need to add your SCM configuration. In the example below I added my git repository to the master branch

<scm>
    <developerConnection>
        scm:git:[email protected]:tufac2/sfg-pet-clinic.git
    </developerConnection>
</scm>

Upvotes: 4

In Springboot the answer depends of plugin that you are using

docker-maven-plugin:

  • mvn docker:build

dockerfile-maven-plugin:

  • mvn dockerfile:build

I hope this help you

Regards

Upvotes: 0

Radhakrishnan
Radhakrishnan

Reputation: 1040

May your pom.xml not having the entry

    <scm>        
    <connection>scm:svn:https://host:port/abc/xyz/trunk</connection>
 <developerConnection>scm:svn:https://host:port/abc/xyz/trunk</developerConnection>
    </scm>

<build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.2</version>
                    <configuration>
                        <tagBase>https://host:port/abc/xyz/tag</tagBase>
                        <releaseProfiles>release</releaseProfiles>
                    </configuration>
                </plugin>               
            </plugins>
        </pluginManagement>
    </build> 

Upvotes: 16

Charlee Chitsuk
Charlee Chitsuk

Reputation: 9069

If you only would like to change the version, the Versions Maven Plugin may help.

The versions:set may be the good one for using.

Please take a big note, since you're not using the SCM, please make a full backup before using the following command.

mvn versions:set -DnewVersion=1.0 
mvn clean install
mvn versions:set -DnewVersion=1.1-SNAPSHOT 
mvn clean install

Anyhow I highly recommend and encourage you to use the SCM and perform the release by following the Maven good practice instead.

I hope this may help.

Upvotes: 50

Related Questions