Sam Levin
Sam Levin

Reputation: 3416

how to get maven release:prepare to put tagged release in tags folder?

My project's repo is set up the standard structure - branches / tags / trunk. My project's source is stored in /trunk.

My scm configuration in my pom.xml file is as follows:

<scm>
  <url>https://repourl/trunk/scs-global-parent</url>
  <connection>scm:svn:https://repourl/trunk/scs-global-parent</connection>
  <developerConnection>scm:svn:https://repourl/trunk/scs-global-parent</developerConnection>
  <tag>head</tag>
</scm>

When maven release:prepare tags a release, is it going to be put in my trunk? Does it "know" about the tags folder? Do I need to adjust my scm configuration? Thanks!

Upvotes: 2

Views: 2839

Answers (1)

yorkw
yorkw

Reputation: 41126

According to the user guide:

The release:prepare goal will:

  1. Verify that there are no uncommitted changes in the workspace.
  2. Prompt the user for the desired tag, release and development version names.
  3. Modify and commit release information into the pom.xml file.
  4. Tag the entire project source tree with the new tag name.

Your scm settings are sufficient. If you follow the standard SVN naming conventions (trunk/tags/branches), mvn release:prepare will be aware of your tags URL location https://repourl/tags/ and automatically create a tag under here.

If you use something other than this convention, you can specify the tags URL location by tagBase configuration in pom.xml:

tagBase:

The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.

  • Type: java.lang.String
  • Required: No
  • Expression: ${tagBase}

Upvotes: 4

Related Questions