Gradle: Add an attribute to MANIFEST.MF in a WAR file

You can use the manifest property in a Gradle War task to add an attribute to MANIFEST.MF.

The below does just that, creating a new war files [Your Project Name]-Something.war with the added manifest.mf attribute.

	task createAWarFile(type: War) {
	  classifier = 'Something'
	  manifest { attributes "HI": "THERE" }
	}
gradle-war gradle

Edit on github
comments powered by Disqus
Click me