0

When typing

svnversion . /dev/products/prod_name/trunk

I get the full version scheme, like 22330:22355MS (when using it without the trail URL, I still get 22330:22355M). The maven-buildnumber-plugin from mojohaus only gives me the first part of the revision, and oddly incremented by one (i.e., 22331 instead of 22330).

In my pom.xml:

<scm>
    <connection>scm:svn:https://svn.our.url/dev/products/prod_name/branches/my_branch</connection>
    <url>https://svn.our.url/dev/products/prod_name/branches/my_branch</url>
</scm>

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>buildnumber-maven-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            <goals>
                <goal>create</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <doUpdate>false</doUpdate>
        <doCheck>false</doCheck>
        <format>{0,date,dd-MM-yyyy HH:mm:ss}__{1}</format>
        <items>
            <item>timestamp</item>
            <item>scmVersion</item>
        </items>
    </configuration>
</plugin>

What is happening here and how can I get the full version number?

Benjamin Maurer
  • 3,602
  • 5
  • 28
  • 49
  • did you check http://stackoverflow.com/questions/4874813/how-to-display-svn-version-in-maven-usng-the-build-number-plugin? – A_Di-Matteo Dec 03 '15 at 22:23
  • Yes I did. But I'm using scmVersion, not buildNumber. I did read in one of the comments though, that it the plugin uses `svn info` and not `svnversion`. That doesn't seem to give you the full thing... – Benjamin Maurer Dec 04 '15 at 08:54

0 Answers0