Using maven-release-plugin for tags and commit for non-origin

When I release my project, I want to share the source with a wider group of people than I usually do during development. Code is shared through the Git repository. For this, I used the following:

In my local Git repository, I have the following remotes installed:

origin  http://example.com/private
public  http://example.com/public

I'm currently trying to configure the maven-release plugin to control build versions, and also manage tags and pushing code into a shared repository. In my pom.xml, I listed <scm / "> as follows:

<scm><connection>scm:git:http://example.com/public</connection></scm>

(Deleting this line will exit mvn: preparing to crash)


However, when called

mvn release:clean release:prepare release:perform

Maven calls

git push origin tagname

instead of clicking on the URL specified in the POM.

So the questions are:

  • Best practice. Should I just tag and commit in my private repo (origin) and go to public publication manually?
  • Can I make Maven by clicking on the repository that I select and not the default origin? I felt this was due to the requirement of the <connection / "> element in <scm.z.//li>
+3
1

, scm.connection , 2.0 maven-release- ( git). , POM:

<project>
    ...
    <build>
        <plugins>
            ...
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.0</version>
            </plugin>
            ...
        </plugins>
    </build>
    ...
</project>

</" > , Maven 2.0-- maven-release- , 2.0.

+3

Source: https://habr.com/ru/post/1740804/


All Articles