2011-10-20 11 views
4

マニフェストに水銀版のリビジョン番号を取得しようとしています。私は、次の手順を読んだ:maven buildnumberプラグインが水銀で動作しない

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> 

どのように私はこの問題を解決することができますか?

答えて

5

$ {buildNumber}はsvn用です。水銀を使用する場合は、水銀のリビジョン番号を取得するために$ {changeSet}を使用する必要があります。

関連する問題