Permalink
Browse files

build updates (mainly on the jar manifest)

  • Loading branch information...
1 parent 89fdafd commit f86283e7a1800f1c52587e31e7da6fcf843a2db5 Costin Leau committed Dec 15, 2012
Showing with 22 additions and 3 deletions.
  1. +19 −2 build.gradle
  2. +3 −1 docs/src/info/notice.txt
View
@@ -327,17 +327,34 @@ javadoc {
}
jar {
+ manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
manifest.attributes['Implementation-Title'] = 'spring-data-hadoop'
manifest.attributes['Implementation-Version'] = project.version
- manifest.attributes['Build'] = "" + System.env['SHDP.BUILD']
- manifest.attributes['Repository-Revision'] = "" + System.env['SHDP.REV']
+ manifest.attributes['Implementation-URL'] = "http://www.springsource.org/spring-data/hadoop"
+ manifest.attributes['Implementation-Vendor'] = "SpringSource"
+ manifest.attributes['Implementation-Vendor-Id'] = "org.springframework"
+
+ def build = System.env['SHDP.BUILD']
+ if (build != null)
+ manifest.attributes['Build'] = build
+
+ String rev = "unknown"
+
+ // parse the git files to find out the revision
+ File gitHead = file('.git/HEAD')
+ if (gitHead.exists()) {
+ gitHead = file('.git/' + gitHead.text.trim().replace('ref: ',''))
+ if (gitHead.exists()) { rev = gitHead.text }
+ }
from("$rootDir/docs/src/info") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
+
+ manifest.attributes['Repository-Revision'] = rev
}
task sourcesJar(type: Jar, dependsOn:classes) {
@@ -1,3 +1,6 @@
+ Spring for Apache Hadoop ${version}
+ Copyright (c) 2002-${copyright} SpringSource, a division of VMware, Inc.
+
======================================================================
== NOTICE file corresponding to section 4 d of the Apache License, ==
== Version 2.0, for the Spring Framework distribution. ==
@@ -19,4 +22,3 @@
not be used to endorse or promote products derived from this
software without prior written permission. For written permission,
please contact enquiries@springsource.com.
-

0 comments on commit f86283e

Please sign in to comment.