maven buildnumber插件没有使用mercurial

beg*_*er_ 4 mercurial maven build-numbers

我正试图在清单中获得mercurial修订号.我已阅读以下说明:

http://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html

内置编号的Maven + Mercurial

我没有收到错误消息,但清单中的SCM-Revision属性始终为空.

POM部分:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>buildnumber-maven-plugin</artifactId>
    <executions>
        <execution>
            <phase>validate</phase>
            <goals>
                <goal>hgchangeset</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <doCheck>false</doCheck>
        <doUpdate>true</doUpdate>
    </configuration>
</plugin>
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <configuration>
        <archive>
            <manifestEntries>                            
                <SCM-Revision>${buildNumber}</SCM-Revision>
            </manifestEntries>
        </archive>
    </configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

beg*_*er_ 5

$ {buildNumber}适用于svn.如果你使用mercurial,你需要使用$ {changeSet}来获得mercurial版本号.