我正在尝试使用 Maven在我的包文件中获取Mercurial
changeSet
和changeSetDate
设置。MANIFEST.MF
OSGi
我已将其添加buldnumber-maven-plugin
到我的pom.xml
:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0</version>
<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.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<archive>
<manifestEntries>
<Build-Change-Set>${changeSet}</Build-Change-Set>
<Build-Change-Set-Date>${changeSetDate}</Build-Change-Set-Date>
<Build-Location>${basedir}</Build-Location>
<Build-Machine>${env.COMPUTERNAME}</Build-Machine>
<Build-Date>${maven.build.timestamp}</Build-Date>
</manifestEntries>
</archive>
<instructions>
<!-- All imports, exports, etc... -->
</instructions>
</configuration>
</plugin>
当我执行install
目标时,我看到Maven
输出:
[INFO] --- buildnumber-maven-plugin:1.0:hgchangeset (default) @ esb-security ---
[INFO] Setting Mercurial Changeset: 6524595b0389+
[INFO] Setting Mercurial Changeset Date: 2012-09-05 11:38 +0100
但在我的MANIFEST.MF
我得到:
Build-Change-Set: ${changeSet}
Build-Change-Set-Date: ${changeSetDate}
它不包括变更集和变更集数据的值。也许有人知道问题出在哪里?