4
我試圖獲取清單中的mercurial修訂號。我讀過以下說明:maven buildnumber插件不能用於mercurial
http://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html
Maven + Mercurial for Build Numbers
我沒有得到一個錯誤消息,但在清單中SCM-版本屬性始終是空的。
從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>
我怎樣才能解決這個問題呢?