I am trying to get the Mercurial
changeSet
and changeSetDate
set in my MANIFEST.MF
file of OSGi
bundle using Maven.
I have added the buldnumber-maven-plugin
into my 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>
And my bundle plugin looks like this:
<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>
When I am executing install
goal I see that Maven
outputs:
[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
But in my MANIFEST.MF
I get:
Build-Change-Set: ${changeSet}
Build-Change-Set-Date: ${changeSetDate}
It does not include the values of change set and change set data. Maybe someone know where might be the problem?