In war files, we can use maven-war-plugin as below. Build number and the computer name will be added along with the default entries.
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<archive>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
<Build-Machine>${env.COMPUTERNAME}</Build-Machine>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<archive>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
<Build-Machine>${env.COMPUTERNAME}</Build-Machine>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
In EJB jar files we can use maven-ejb-plugin. For normal jars please use maven-jar-plugin in a similar fashion
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
<Build-Machine>${env.COMPUTERNAME}</Build-Machine>
</manifestEntries>
</archive>
</configuration>
</plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
<Build-Machine>${env.COMPUTERNAME}</Build-Machine>
</manifestEntries>
</archive>
</configuration>
</plugin>