Andrew Harmel-Law
Andrew Harmel-Law

Reputation: 7889

Why does mvn release:prepare create a copy of my entire SVN tree to /tags?

I'm using Maven 3 and Subversion and make releases using mvn release:prepare. Our SVN setup and layout is standard. However, when we do this the directory structure that's copied into the /tags directory under the new tag name is the full "trunk / branches / tags" followed by everything below it rather than just the specific trunk / branch where I run this command from.

I.e.

  1. I create a fresh local workspace directory
  2. I cd into this new directory
  3. I do a checkout of the trunk into this directory: svn checkout http://svn-server-01:8090/svn/our-project/trunk/our-master --username myuid --password mypassword
  4. I cd into the master maven project just checked out: cd our-master
  5. I run a dry run: mvn release:prepare -DdryRun=true
  6. I run a clean: mvn release:clean
  7. I run the release prepare proper: mvn release:prepare and make a new "0.2" tag
  8. I look at SVN and see:
    tags -> 0.1 -> tags -> empty
                -> branches -> empty
                -> trunk -> 0.2 version of the trunk
    branches -> empty
    trunk -> 0.2-SNAPSHOT

Upvotes: 1

Views: 770

Answers (1)

khmarbaise
khmarbaise

Reputation: 97379

It sound like you scm configuration in your pom is incorrect. It should look like this:

<scm>
  <connection>scm:svn:http://somerepository.com/svn_repo/trunk/</connection>
  <developerConnection>scm:svn:https://somerepository.com/svn_repo/trunk/</developerConnection>
  <url>http://somerepository.com/view.cvs</url>
</scm>

in particular connection and developerConnection.

Upvotes: 2

Related Questions