Reputation: 15799
In my master POM, I have <pluginManagement>
where I define configurations for the maven-jar-plugin
, maven-war-plugin
and maven-ear-plugin
. Each of these has
<configuration>
<archive>
<manifestEntries>
<Build-Time>${maven.build.timestamp}</Build-Time>
<SCM-Revision>${scmRevision}</SCM-Revision>
<SCM-Branch>${scmBranch}</SCM-Branch>
<Built-By>${user.name}</Built-By>
</manifestEntries>
</archive>
</configuration>
Is there a way to share a group of manifest entries so I don't have to add new items to 3 separate places?
Upvotes: 2
Views: 587
Reputation: 21831
I would do the following:
src/main/resources
.maven-resources-plugin
process this file and generate manifest with actual property values.Here's a sample configuration:
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/manifest.file</manifestFile>
</archive>
</configuration>
Upvotes: 3