Maven pom.xml, SCM and release

I want to do mvn-release: prepare to remove "-SNAPSHOT" from the version and mark it in SVN.

I have these settings in pom.xml:

<scm> <connection>scm:svn:http://subversion.local:3690/svn/projects/x/trunk</connection> <developerConnection>scm:svn:http://subversion.local:3690/svn/projects/x/tags</developerConnection> <url>scm:svn:http://subversion.loi.local:3690/svn/projects/x/tags</url> </scm> 

But this does not behave as desired. Instead, it gets everything from / tags that rewrites it under / tags.

So what I want, take from HEAD, uncheck "-SNAPSHOT" and mark it under / tags

+6
source share
3 answers

The <scm> indicates the configuration of a read-only connection ("connection" element), a read-write connection ("DeveloperConnection"), and a public URL. This has nothing to do with tagging. In a small LAN, these three parameters are the same.

For the tag database you need to configure the release plugin:

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <configuration> <tagBase>scm:svn:http://subversion.local:3690/svn/projects/x/tags</tagBase> <autoVersionSubmodules>true</autoVersionSubmodules> </configuration> </plugin> 
+6
source

I just wanted to say that the tagBase parameter is applicable only to SVN! (CVS does not use it, for example.)

+3
source

I use the maven-release plugin successfully with developerConnection pointing to the tool.

When preparing for the release, the tag is created in the /tags directory (the plugin also updates the connection and developerConnection in the pom.xml tag.

+1
source

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


All Articles