1

Is there any way to avoid tagging of existing repo during a maven release. Below is the flow we have

  1. execute command mvn release:prepare on the pom
  2. maven asks for the release version
  3. maven asks for the scm tag name
  4. maven asks for the new development snapshot version

Once all these information is given, my build is failing trying to execute the below command

git push git@mygitaddress.git tagName

Always returns an error of network disconnect Received disconnect from xx.xxx.x.xx port 22:2: Too many authentication failures for git

Below is the build configuration on my maven script

 <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <testSourceDirectory>src/test/scala</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9.5</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <configuration>
                            <packaging>pom</packaging>
                            <generatePom>true</generatePom>
                            <pushChanges>false</pushChanges>
                            <localCheckout>true</localCheckout>
                            <tagNameFormat>v@{project.version}</tagNameFormat>
                            <url>${project.distributionManagement.repository.url}</url>
                            <artifactId>${project.artifactId}</artifactId>
                            <groupId>${project.groupId}</groupId>
                            <version>${project.version}</version>
                            <file>${project.build.directory}/${project.build.finalName}.pom</file>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <branchName>development</branchName>
                    <pushChanges>true</pushChanges>
                    <localCheckout>true</localCheckout>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-plugin</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

Any idea how I can skip the tagging part and just release the maven artifact? For tagging I have a different process anyways.

D P
  • 153
  • 2
  • 12
  • Possible duplicate of [How I disable the Tag creation on Maven Release Plugin](https://stackoverflow.com/questions/18211411/how-i-disable-the-tag-creation-on-maven-release-plugin) – niekname Nov 09 '17 at 19:46
  • Sorry...My question is about skipping the tagging process during maven release using the command mvn release:prepare – D P Nov 09 '17 at 23:36
  • Your issue is not with Git tagging, but with Git push. A tag is still created in your local Git repository, but won't be pushed due to authentication error. Also some configuration of your `deploy` plugin seems to be in fact for the `release` plugin, such as `pushChanges` and `tagNameFormat`, etc. Make sure to attach each configuration to the proper plugin. – Pierre B. Nov 10 '17 at 09:06
  • Agreed. But as an alternate to to this tag push issue, I want to know if I can get rid of tagging itself. I tried false, but still ends up in this error – D P Nov 10 '17 at 18:27

0 Answers0