maven buildnumber 插件无法与 Mercurial 一起使用
我正在尝试获取清单中的 Mercurial 修订号。我已阅读以下说明:
http:// /maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html
Maven + Mercurial for Build Numbers
我没有收到错误消息,但 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>
我该如何解决这个问题?
I'm trying to get the mercurial revision number in the manifest. I've read following instructions:
http://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html
Maven + Mercurial for Build Numbers
I do not get an error message but the SCM-Revision property in the manifest is always empty.
Section from 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>
how can I resolve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
${buildNumber} 用于 svn。如果您使用 Mercurial,则需要使用 ${changeSet} 来获取 Mercurial 修订号。
${buildNumber} is for svn. If you use mercurial you need to use ${changeSet} to get the mercurial revision number.