From cbb1314b5ce6f3adf6ad47d84db0c4842bb233ba Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 4 Jun 2015 23:58:54 -0700 Subject: [PATCH] SDG-398 - Provide early support of Apache Geode (Pivotal GemFire OSS). Modified the SDG apache-geode build to resolve Apache Geode artifacts from the Apache Maven Repo instead of Spring's Maven Repo. Performed minor code modifications based on the 'latest' Apache Geode build snapshot. Modified the generated SDG Maven POM to declare the Apache Maven Snapshot Repo in order to properly resolve the Apache Geode build snapshot artifacts. --- build.gradle | 53 +++++++++++++++++-- maven.gradle | 37 +++++++------ .../data/gemfire/test/StubCache.java | 3 +- 3 files changed, 72 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index 3052fa7c..bb4ee313 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,7 @@ repositories { mavenLocal() maven { url "https://repo.spring.io/libs-snapshot" } maven { url "https://repo.spring.io/plugins-release"} + maven { url "https://repository.apache.org/content/repositories/snapshots" } } apply plugin: "java" @@ -74,10 +75,52 @@ dependencies { } // Apache Geode (a.k.a. Pivotal GemFire) - compile("com.gemstone.gemfire:gemfire-core:$gemfireVersion") - compile("com.gemstone.gemfire:gemfire-jgroups:$gemfireVersion") - compile("com.gemstone.gemfire:gemfire-joptsimple:$gemfireVersion") - compile("com.gemstone.gemfire:gemfire-json:$gemfireVersion") + compile("org.apache.geode:gemfire-core:$gemfireVersion") { + exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" + exclude group: "com.fasterxml.jackson.core", module: "jackson-core" + exclude group: "com.fasterxml.jackson.core", module: "jackson-databind" + exclude group: "org.slf4j", module: "slf4j-api" + exclude group: "org.springframework", module: "spring-aop" + exclude group: "org.springframework", module: "spring-beans" + exclude group: "org.springframework", module: "spring-context" + exclude group: "org.springframework", module: "spring-context-support" + exclude group: "org.springframework", module: "spring-expression" + exclude group: "org.springframework", module: "spring-tx" + exclude group: "org.springframework", module: "spring-web" + exclude group: "org.springframework", module: "spring-webmvc" + exclude group: "org.springframework.data", module: "spring-data-commons" + exclude group: "org.springframework.shell", module: "spring-shell" + } + compile("org.apache.geode:gemfire-jgroups:$gemfireVersion") { + exclude group: "org.springframework", module: "spring-aop" + exclude group: "org.springframework", module: "spring-beans" + exclude group: "org.springframework", module: "spring-context" + exclude group: "org.springframework", module: "spring-context-support" + exclude group: "org.springframework", module: "spring-expression" + exclude group: "org.springframework", module: "spring-tx" + exclude group: "org.springframework", module: "spring-web" + exclude group: "org.springframework", module: "spring-webmvc" + } + compile("org.apache.geode:gemfire-joptsimple:$gemfireVersion") { + exclude group: "org.springframework", module: "spring-aop" + exclude group: "org.springframework", module: "spring-beans" + exclude group: "org.springframework", module: "spring-context" + exclude group: "org.springframework", module: "spring-context-support" + exclude group: "org.springframework", module: "spring-expression" + exclude group: "org.springframework", module: "spring-tx" + exclude group: "org.springframework", module: "spring-web" + exclude group: "org.springframework", module: "spring-webmvc" + } + compile("org.apache.geode:gemfire-json:$gemfireVersion") { + exclude group: "org.springframework", module: "spring-aop" + exclude group: "org.springframework", module: "spring-beans" + exclude group: "org.springframework", module: "spring-context" + exclude group: "org.springframework", module: "spring-context-support" + exclude group: "org.springframework", module: "spring-expression" + exclude group: "org.springframework", module: "spring-tx" + exclude group: "org.springframework", module: "spring-web" + exclude group: "org.springframework", module: "spring-webmvc" + } optional("com.google.code.findbugs:annotations:2.0.2") runtime("antlr:antlr:$antlrVersion") @@ -97,8 +140,8 @@ dependencies { testCompile "org.mockito:mockito-core:$mockitoVersion" testCompile "javax.annotation:jsr250-api:1.0", optional - testRuntime "log4j:log4j:$log4jVersion" testCompile "org.apache.derby:derbyLocale_zh_TW:10.9.1.0" + testRuntime "log4j:log4j:$log4jVersion" testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion" sharedResources "org.springframework.data.build:spring-data-build-resources:$springDataBuildVersion@zip" diff --git a/maven.gradle b/maven.gradle index a6ee43c6..c6a54660 100644 --- a/maven.gradle +++ b/maven.gradle @@ -31,10 +31,10 @@ def customizePom(pom, gradleProject) { generatedPom.project { name = gradleProject.description description = gradleProject.description - url = 'http://github.com/SpringSource/spring-gemfire' + url = 'http://github.com/spring-projects/spring-gemfire' organization { name = 'SpringSource' - url = 'http://www.springsource.org/spring-gemfire' + url = 'http://projects.spring.io/spring-data-gemfire/' } licenses { license { @@ -44,37 +44,44 @@ def customizePom(pom, gradleProject) { } } scm { - url = 'http://github.com/SpringSource/spring-gemfire' - connection = 'scm:git:git://github.com/SpringSource/spring-gemfire' - developerConnection = 'scm:git:git://github.com/SpringSource/spring-gemfire' + url = 'https://github.com/spring-projects/spring-data-gemfire' + connection = 'scm:git:git://github.com/spring-projects/spring-data-gemfire' + developerConnection = 'scm:git:git://github.com/spring-projects/spring-data-gemfire' } developers { - developer { + developer { id = 'costin' name = 'Costin Leau' email = 'cleau@vmware.com' - } - developer { + } + developer { id = 'dturanski' name = 'David Turanski' email = 'dturanski@gopivotal.com' - } - developer { + } + developer { id = 'jblum' name = 'John Blum' email = 'jblum@gopivotal.com' - } - developer { + } + developer { id = 'ogierke' name = 'Oliver Gierke' email = 'ogierke@gopivotal.com' - } - developer { + } + 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' + } + } } } } diff --git a/src/test/java/org/springframework/data/gemfire/test/StubCache.java b/src/test/java/org/springframework/data/gemfire/test/StubCache.java index 72b84796..e6a08535 100644 --- a/src/test/java/org/springframework/data/gemfire/test/StubCache.java +++ b/src/test/java/org/springframework/data/gemfire/test/StubCache.java @@ -37,7 +37,6 @@ import com.gemstone.gemfire.cache.TimeoutException; import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue; import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory; import com.gemstone.gemfire.cache.control.ResourceManager; -import com.gemstone.gemfire.cache.lucene.LuceneService; import com.gemstone.gemfire.cache.query.Index; import com.gemstone.gemfire.cache.query.IndexExistsException; import com.gemstone.gemfire.cache.query.IndexInvalidException; @@ -581,10 +580,12 @@ public class StubCache implements Cache { /* (non-Javadoc) * @see com.gemstone.gemfire.cache.Cache#getLuceneService() */ + /* @Override public LuceneService getLuceneService() { throw new UnsupportedOperationException(NOT_IMPLEMENTED); } + */ /* (non-Javadoc) * @see com.gemstone.gemfire.cache.Cache#getMembers()