Skip to content

Instantly share code, notes, and snippets.

@xdu
Created February 10, 2016 13:24
Show Gist options
  • Save xdu/08b750d526caee5c2748 to your computer and use it in GitHub Desktop.
Save xdu/08b750d526caee5c2748 to your computer and use it in GitHub Desktop.
maven build timestamp
<properties>
	<maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format>
</properties>

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<configuration>
		<archive>
			<manifest>
				<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
				<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>							
			</manifest>
			<manifestEntries>
				<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
			</manifestEntries>
		</archive>
	</configuration>
</plugin>

/META-INF/MANIFEST.MF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment