MANIFEST file in WAR
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 22 Jan 2017 20:22:14 +0000 (21:22 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 22 Jan 2017 20:22:14 +0000 (21:22 +0100)
SpringJava/Gradle/spring-jpa-resources/build.gradle

index 0252d69..66c5fd0 100644 (file)
@@ -32,3 +32,18 @@ dependencies {
         exclude group: 'commons-logging', module: 'commons-logging'
     }
 }
+
+// *****************   MANIFEST FILE   *****************
+war {
+    doFirst {
+        manifest {
+            attributes('Implementation-Title': 'Spring JPA Persistence, gradle example',
+                'Implementation-Version': version,
+                'Build-Time': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
+                'Built-By': System.getProperty('user.name'),
+                'Built-JDK': System.getProperty('java.version')
+            )
+        }
+    }
+}
+