Maven pom.xml, SCM and release

11,118

Solution 1

The <scm> tag denotes read-only connection configuration ("connection" element), read-write connection ("developerConnection") and publicly visible URL. It does not have anything to do with tagging. In a small local network it's common for these 3 parameters to be the same.

For tag base, 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>

Solution 2

just wanted to say that the tagBase parameter is just relevant for SVN! (CVS doesn't use it eg.)

Solution 3

I am using maven-release-plugin successfully with the developerConnection pointing to trunk.

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

Share:
11,118
AdrianS
Author by

AdrianS

Updated on July 27, 2022

Comments

  • AdrianS
    AdrianS almost 2 years

    I want to do a mvn release:prepare, that will remove the "-SNAPSHOT" from the version and tag 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 these does not behave like i wanted. Instead it gets everything from /tags are re-tags it under /tags.

    So again, what i want, take from HEAD, drop "-SNAPSHOT" and tag it under /tags

  • JDGuide
    JDGuide almost 11 years
    You are right, but when I am trying to execute release:perform its failure.It shows there is no pom.xml in side the target dir.Can you help me out.