Category Archives: SVN

Apache Ant – Get the SVN revision number by exec task

In Apache Ant, we can use the <exec> task to execute shell command in Ant script. Previously i have shown you how to integrate Apache Ant with SVN.

 

If you only want to do some simple SVN actions, you can consider using the <exec> task. The build.xml below is a simple example to get the current SVN version number.
Continue reading Apache Ant – Get the SVN revision number by exec task

Advertisements

Maven – Add SVN revision number to the name of your built artifact

The svn-revision-number-maven-plugin could help you adding the SVN revision number to your built artifact. Configure your pom.xml as follow.

...
<build>
  <finalName>${project.artifactId}-r${svn.revision}</finalName>
  <plugins>
    <!-- Use the svn revision number for the built artifact -->
    <plugin>
      <groupId>com.google.code.maven-svn-revision-number-plugin</groupId>
      <artifactId>svn-revision-number-maven-plugin</artifactId>
      <version>1.13</version>
      <executions>
        <execution>
          <goals>
            <goal>revision</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <entries>
          <entry>
            <prefix>svn</prefix> <!-- create the ${svn.revision} -->
          </entry>
        </entries>
      </configuration>
    </plugin>
  </plugins>
</build>
...

Continue reading Maven – Add SVN revision number to the name of your built artifact

TortoiseSVN – SVN+SSH protocol with SSL key authentication

In the past, i usually integrate SVN with Apache such that i could access the SVN repository through the HTTP protocol.
Apache and SVN Integration

I could use TortoiseSVN to checkout the SVN repository with correct username and password. But sometimes, we need to use SVN+SSH to access the SVN repository. Here are the steps using SSH key authentication.

1. Add your private key in pageant.exe.
Continue reading TortoiseSVN – SVN+SSH protocol with SSL key authentication

SVN Migration

I am going to close the server at my home so i need to move all the stuff to the new server which is a Virtual Private Server (VPS).

The most important stuff is the Subversion repository. Luckily i found a very good post about migrating a SVN repository in just a few steps – How to migrate SVN repository?.

Let’s assume the repository is called eureka and the Subversion group in the server is svn. Continue reading SVN Migration