SGF-491 - Pre-release cleanup.

This commit is contained in:
John Blum
2016-04-28 16:09:22 -07:00
parent b9ae904e7b
commit 52b4617066
7 changed files with 156 additions and 151 deletions

View File

@@ -2,6 +2,7 @@ buildscript {
repositories {
maven { url 'https://repo.spring.io/plugins-release' }
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
classpath 'org.asciidoctor:asciidoctorj:1.5.0'
@@ -16,25 +17,34 @@ configurations {
sharedResources
}
description = 'Spring Data GemFire'
group = 'org.springframework.data'
repositories {
maven { url "https://repo.spring.io/libs-release" }
maven { url "https://repo.spring.io/plugins-release"}
maven { url "https://repository.apache.org/content/repositories/snapshots" }
}
apply plugin: "java"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply from: "$rootDir/maven.gradle"
apply plugin: 'bundlor'
apply plugin: 'propdeps'
apply plugin: 'docbook-reference'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
//project.bundlor.bundleSymbolicName = "${bundleSymbolicName}"
description = 'Spring Data Geode'
group = 'org.springframework.data'
archivesBaseName = project.name
sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceSets {
main {
output.resourcesDir = 'build/classes/main'
output.classesDir = 'build/classes/main'
}
test {
output.resourcesDir = 'build/classes/test'
output.classesDir = 'build/classes/test'
}
}
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:-serial"]
if (project.hasProperty('platformVersion')) {
apply plugin: 'spring-io'
@@ -52,20 +62,29 @@ if (project.hasProperty('platformVersion')) {
}
}
sourceSets {
main {
output.resourcesDir = 'build/classes/main'
output.classesDir = 'build/classes/main'
}
test {
output.resourcesDir = 'build/classes/test'
output.classesDir = 'build/classes/test'
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:-serial"]
tasks.withType(Test).all {
forkEvery = 1
systemProperties['gemfire.disableShutdownHook'] = 'true'
systemProperties['javax.net.ssl.keyStore'] = System.getProperty('user.dir') + '/src/test/resources/trusted.keystore'
systemProperties['org.springframework.data.gemfire.test.GemfireTestRunner.nomock'] = System.getProperty('org.springframework.data.gemfire.test.GemfireTestRunner.nomock')
systemProperties['product.name'] = 'Apache Geode'
systemProperties['spring.profiles.active'] = 'apache-geode'
}
repositories {
maven { url "https://repo.spring.io/libs-release" }
maven { url "https://repo.spring.io/plugins-release"}
// maven { url "https://repository.apache.org/content/repositories/snapshots" }
}
// Common dependencies
dependencies {
// Spring Framework
compile("org.springframework:spring-context-support:$springVersion") {
@@ -111,6 +130,7 @@ dependencies {
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
// Testing
testCompile "javax.annotation:jsr250-api:1.0", optional
testCompile("org.springframework:spring-test:$springVersion") {
exclude group: "commons-logging", module: "commons-logging"
}
@@ -121,7 +141,6 @@ dependencies {
testCompile "edu.umd.cs.mtc:multithreadedtc:$multiThreadedtcVersion"
testCompile "org.apache.openwebbeans.test:cditest-owb:$openwebbeansVersion"
testCompile "javax.annotation:jsr250-api:1.0", optional
testRuntime "javax.el:el-api:$cdiVersion"
testRuntime "javax.servlet:servlet-api:$servletApiVersion"
testRuntime "log4j:log4j:$log4jVersion"
@@ -132,63 +151,10 @@ dependencies {
sharedResources "org.springframework.data.build:spring-data-build-resources:$springDataBuildVersion@zip"
}
sourceCompatibility = 1.6
targetCompatibility = 1.6
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
tasks.withType(Test).all {
forkEvery = 1
systemProperties['gemfire.disableShutdownHook'] = 'true'
systemProperties['javax.net.ssl.keyStore'] = System.getProperty('user.dir') + '/src/test/resources/trusted.keystore'
systemProperties['org.springframework.data.gemfire.test.GemfireTestRunner.nomock'] = System.getProperty('org.springframework.data.gemfire.test.GemfireTestRunner.nomock')
systemProperties['product.name'] = 'Apache Geode'
systemProperties['spring.profiles.active'] = 'apache-geode'
}
javadoc {
dependsOn = [ 'extractSharedResources' ]
ext.srcDir = file("${projectDir}/docs/src/api")
destinationDir = file("${buildDir}/api")
ext.tmpDir = file("${buildDir}/api-work")
configure(options) {
stylesheetFile = file("$buildDir/shared-resources/javadoc/spring-javadoc.css")
docFilesSubDirs = true
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
breakIterator = true
showFromProtected()
groups = [
'Spring GemFire' : ['org.springframework.data.gemfire*'],
]
links = [
"http://static.springframework.org/spring/docs/3.1.x/javadoc-api",
"http://download.oracle.com/javase/6/docs/api",
"http://www.gemstone.com/docs/6.5.1/product/docs/japi/",
"http://asm.objectweb.org/asm223/javadoc/user",
"http://logging.apache.org/log4j/docs/api/",
"http://atinject.googlecode.com/svn/trunk/javadoc/"
]
exclude "org/springframework/data/gemfire/config/**"
}
title = "${rootProject.description} ${version} API"
}
jar {
dependsOn = [ 'bundlor' ]
manifest.attributes['Implementation-Title'] = 'spring-data-gemfire'
manifest.attributes['Implementation-Title'] = project.name
manifest.attributes['Implementation-Version'] = project.version
from("$rootDir/docs/src/info") {
@@ -203,22 +169,41 @@ bundlor {
manifestTemplate = file("template.mf").text
}
// Reference documentation
javadoc {
dependsOn = [ 'extractSharedResources' ]
destinationDir = file("${buildDir}/api")
ext.srcDir = file("${projectDir}/docs/src/api")
ext.tmpDir = file("${buildDir}/api-work")
reference {
// Avoid copy with expansions
expandPlaceholders = '';
}
configure(options) {
stylesheetFile = file("$buildDir/shared-resources/javadoc/spring-javadoc.css")
docFilesSubDirs = true
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
breakIterator = true
showFromProtected()
groups = [
'Spring GemFire' : ['org.springframework.data.gemfire*'],
]
referencePdf {
dependsOn = [ 'asciidoctor' ]
sourceDir = asciidoctor.outputDir
links = [
"http://static.springframework.org/spring/docs/3.1.x/javadoc-api",
"http://download.oracle.com/javase/6/docs/api",
"http://www.gemstone.com/docs/6.5.1/product/docs/japi/",
"http://asm.objectweb.org/asm223/javadoc/user",
"http://logging.apache.org/log4j/docs/api/",
"http://atinject.googlecode.com/svn/trunk/javadoc/"
]
exclude "org/springframework/data/gemfire/config/**"
}
title = "${rootProject.description} ${version} API"
}
asciidoctor {
sourceDir = file("${projectDir}/src/main/asciidoc")
dependsOn = [ 'extractSharedResources' ]
backends = [ 'html5', 'docbook' ]
sourceDir = file("${projectDir}/src/main/asciidoc")
options = [
doctype: 'book',
eruby: 'erubis',
@@ -238,21 +223,64 @@ asciidoctor {
]
}
task sourcesJar(type: Jar, dependsOn:classes) {
reference {
// Avoid copy with expansions
expandPlaceholders = '';
}
referencePdf {
dependsOn = [ 'asciidoctor' ]
sourceDir = asciidoctor.outputDir
}
task sourcesJar(type: Jar, dependsOn: classes) {
baseName = project.archivesBaseName
classifier = 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
task javadocJar(type: Jar, dependsOn: javadoc) {
baseName = project.archivesBaseName
classifier = 'javadoc'
from javadoc
}
task docsZip(type: Zip) {
task schemaZip(type: Zip) {
description = "Builds -${classifier} archive containing all XSDs for deployment"
baseName = project.archivesBaseName
classifier = 'schema'
group = 'Distribution'
classifier = 'docs'
def Properties schemas = new Properties();
sourceSets.main.resources.find {
it.path.endsWith('META-INF' + File.separator + 'spring.schemas')
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
def alias = key.replaceAll(/http.*schema.(.*).(spring-.*)/, '$2')
assert shortName != key
File xsdFile = sourceSets.main.resources.find {
it.path.replace('\\', '/').endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
rename { String fileName -> alias }
}
}
}
task docsZip(type: Zip, dependsOn: [javadoc, asciidoctor, referencePdf]) {
description = "Builds -${classifier} archive containing api and reference for deployment"
dependsOn = [ 'javadoc', 'asciidoctor', 'referencePdf' ]
baseName = project.archivesBaseName
classifier = 'docs'
group = 'Distribution'
from('docs/src/info') {
include 'changelog.txt'
@@ -273,40 +301,15 @@ task docsZip(type: Zip) {
}
}
task schemaZip(type: Zip) {
group = 'Distribution'
classifier = 'schema'
description = "Builds -${classifier} archive containing all XSDs for deployment"
def Properties schemas = new Properties();
sourceSets.main.resources.find {
it.path.endsWith('META-INF' + File.separator + 'spring.schemas')
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
def alias = key.replaceAll(/http.*schema.(.*).(spring-.*)/, '$2')
assert shortName != key
File xsdFile = sourceSets.main.resources.find {
it.path.replace('\\', '/').endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
rename { String fileName -> alias }
}
}
}
task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadocJar]) {
group = 'Distribution'
classifier = 'dist'
task distZip(type: Zip, dependsOn: [jar, sourcesJar, javadocJar, schemaZip, docsZip]) {
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
"suitable for community download page."
ext.zipRootDir = "${project.name}-${project.version}"
baseName = project.archivesBaseName
classifier = 'dist'
group = 'Distribution'
ext.zipRootDir = "${project.archivesBaseName}-${project.version}"
into (zipRootDir) {
from('docs/src/info') {
@@ -338,12 +341,19 @@ task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadoc
}
}
task extractSharedResources(type: Copy) {
from { // use of closure defers evaluation until execution time
configurations.sharedResources.collect { zipTree(it) }
}
into "$buildDir/shared-resources"
}
artifacts {
archives sourcesJar
archives javadocJar
archives docsZip
archives schemaZip
archives docsZip
archives distZip
}
@@ -354,23 +364,18 @@ task wrapper(type: Wrapper) {
doLast() {
def gradleOpts = "-Xms256m -Xmx1024m"
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=1024m"
File wrapperFile = file("gradlew")
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
File wrapperBatFile = file("gradlew.bat")
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
}
}
task extractSharedResources(type: Copy) {
from { // use of closure defers evaluation until execution time
configurations.sharedResources.collect { zipTree(it) }
}
into "$buildDir/shared-resources"
}
assemble.dependsOn = ['jar', 'sourcesJar']
defaultTasks 'build'

View File

@@ -1,7 +1,7 @@
antlrVersion=2.7.7
aspectjVersion=1.8.9
cdiVersion=1.0
gemfireVersion=1.0.0-incubating.M2-SNAPSHOT
gemfireVersion=1.0.0-incubating.M2
hamcrestVersion=1.3
jacksonVersion=2.6.5
junitVersion=4.12
@@ -15,4 +15,4 @@ spring.range="[4.0.0, 5.0.0)"
springVersion=4.2.5.RELEASE
springDataBuildVersion=1.8.1.RELEASE
springDataCommonsVersion=1.12.1.RELEASE
version=1.7.0.APACHE-GEODE-EA-SNAPSHOT
version=1.0.0.APACHE-GEODE-INCUBATING-SNAPSHOT

View File

@@ -8,6 +8,7 @@ ext.provided = { providedDeps << it }
install {
repositories.mavenInstaller {
pom.artifactId = rootProject.name
customizePom(pom, project)
}
}
@@ -69,18 +70,15 @@ def customizePom(pom, gradleProject) {
name = 'Oliver Gierke'
email = 'ogierke@gopivotal.com'
}
developer {
id = 'ladams'
name = 'Lyndon Adams'
email = 'ladams@gopivotal.com'
}
}
repositories {
/*
repository {
id = 'apache-maven-snapshot-repo'
name = 'Apache Maven Snapshot Repo'
url = 'https://repository.apache.org/content/repositories/snapshots'
}
*/
}
}
}

14
pom.xml
View File

@@ -12,15 +12,15 @@
</parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-gemfire</artifactId>
<version>1.7.0.APACHE-GEODE-EA-SNAPSHOT</version>
<artifactId>spring-data-geode</artifactId>
<version>1.0.0.APACHE-GEODE-INCUBATING-SNAPSHOT</version>
<name>Spring Data Gemfire</name>
<name>Spring Data Geode</name>
<properties>
<dist.key>SGF</dist.key>
<antlr.version>2.7.7</antlr.version>
<gemfire.version>1.0.0-incubating.M2-SNAPSHOT</gemfire.version>
<gemfire.version>1.0.0-incubating.M2</gemfire.version>
<multithreadedtc.version>1.01</multithreadedtc.version>
<servlet-api.version>2.5</servlet-api.version>
<springdata.commons>1.12.1.RELEASE</springdata.commons>
@@ -28,13 +28,15 @@
<repositories>
<repository>
<id>spring-libs-snapshot</id>
<url>https://repo.spring.io/libs-snapshot</url>
<id>spring-libs-release</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
<!--
<repository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url>
</repository>
-->
</repositories>
<pluginRepositories>

View File

@@ -1 +1 @@
rootProject.name = 'spring-data-gemfire'
rootProject.name = 'spring-data-geode'

View File

@@ -1,4 +1,4 @@
= Spring Data GemFire Reference Guide
= Spring Data Geode Reference Guide
Costin Leau , David Turanski , John Blum , Oliver Gierke
:baseDir: .
:revnumber: {version}

View File

@@ -1,5 +1,5 @@
Bundle-ManifestVersion: 2
Bundle-Name: Spring Data GemFire
Bundle-Name: Spring Data Geode
Bundle-SymbolicName: org.springframework.data.gemfire
Bundle-Vendor: Pivotal Software, Inc.
Import-Package: sun.reflect;version="0";resolution:=optional