2

Development and test builds are build from a git svn clone repository while release build are build from a pure svn checkout.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>buildnumber-maven-plugin</artifactId>
    <version>1.0</version>
    <executions>
        <execution>
            <id>generate-buildnumber</id>
            <phase>validate</phase>
            <goals>
                <goal>create</goal>
            </goals>
            <configuration>
                <useLastCommittedRevision>true</useLastCommittedRevision>
                <buildNumberPropertyName>build.buildNumber</buildNumberPropertyName>
            </configuration>
        </execution>
    </executions>
</plugin>

The scm > developerConnection is a scm:svn url and it seems that buildnumber-maven-plugin defaults to the scm provider defined in that url.

Is there a way to use a git scm provider if the project is cloned via git?


It seems that the scm provider can be swapped using

<providerImplementations>
    <svn>git</svn>
</providerImplementations>

At least Maven calls git rev-parse --verify HEAD but it doesn't store the buildNumber.

oschrenk
  • 4,080
  • 4
  • 22
  • 25
  • If the project contains the scm:svn provider than i would assume no. If you change the scm entries than yes. – khmarbaise Nov 12 '12 at 15:43

0 Answers0