You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by on...@apache.org on 2021/01/16 00:31:30 UTC
[geode] branch support/1.13 updated: GEODE-8590: Cleanup
dependencies in the session state modules and GEODE-8732: Update Tomcat9
module to publish to Maven (#5903)
This is an automated email from the ASF dual-hosted git repository.
onichols pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/1.13 by this push:
new 66b40f2 GEODE-8590: Cleanup dependencies in the session state modules and GEODE-8732: Update Tomcat9 module to publish to Maven (#5903)
66b40f2 is described below
commit 66b40f22868d2f474bca05d35d13a49c4d30c8d5
Author: Sarah <sa...@pivotal.io>
AuthorDate: Fri Jan 15 19:29:45 2021 -0500
GEODE-8590: Cleanup dependencies in the session state modules and GEODE-8732: Update Tomcat9 module to publish to Maven (#5903)
* GEODE-8590: Cleanup dependencies in the session state modules and GEODE-8732: Update Tomcat9 module to publish to Maven
* Fixes Geode session state dependencies.
* Fixes module manifest project detection.
* Adds geode-junit dependency back to test module
Co-authored-by: Jacob Barrett <jb...@pivotal.io>
---
.../src/test/resources/expected-pom.xml | 18 +++++
.../geode-modules-session-internal/build.gradle | 22 ++-----
extensions/geode-modules-test/build.gradle | 40 ++++-------
extensions/geode-modules-tomcat7/build.gradle | 59 +++++------------
extensions/geode-modules-tomcat8/build.gradle | 77 +++++++---------------
.../src/test/resources/expected-pom.xml | 60 +++++++++++++++++
extensions/geode-modules-tomcat9/build.gradle | 52 ++++++---------
.../src/test/resources/expected-pom.xml | 60 +++++++++++++++++
extensions/geode-modules/build.gradle | 54 ++++++---------
.../src/test/resources/expected-pom.xml | 75 +++++++++++++++++++++
gradle/publish-java.gradle | 47 +++++++++++++
11 files changed, 359 insertions(+), 205 deletions(-)
diff --git a/boms/geode-all-bom/src/test/resources/expected-pom.xml b/boms/geode-all-bom/src/test/resources/expected-pom.xml
index 884c648..4e5d8b2 100644
--- a/boms/geode-all-bom/src/test/resources/expected-pom.xml
+++ b/boms/geode-all-bom/src/test/resources/expected-pom.xml
@@ -1065,6 +1065,24 @@
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules</artifactId>
+ <version>${version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules-tomcat8</artifactId>
+ <version>${version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules-tomcat9</artifactId>
+ <version>${version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
<artifactId>geode-lucene-test</artifactId>
<version>${version}</version>
<scope>compile</scope>
diff --git a/extensions/geode-modules-session-internal/build.gradle b/extensions/geode-modules-session-internal/build.gradle
index 55c7980..f34e326 100644
--- a/extensions/geode-modules-session-internal/build.gradle
+++ b/extensions/geode-modules-session-internal/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,21 +17,11 @@ import org.apache.geode.gradle.plugins.DependencyConstraints
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
-
-
dependencies {
- compile(platform(project(':boms:geode-all-bom')))
- compile(project(':extensions:geode-modules'))
- compile(project(':geode-core'))
- implementation(project(':geode-logging'))
+ // main
+ implementation(platform(project(':boms:geode-all-bom')))
+ implementation(project(':extensions:geode-modules'))
- implementation('javax.servlet:javax.servlet-api')
- implementation('mx4j:mx4j')
- implementation('org.apache.tomcat:servlet-api:' + DependencyConstraints.get('tomcat6.version'))
- implementation('org.slf4j:slf4j-api')
+ compileOnly(platform(project(':boms:geode-all-bom')))
+ compileOnly('javax.servlet:javax.servlet-api')
}
-
-jar {
- baseName = 'geode-modules-session-internal'
-}
-
diff --git a/extensions/geode-modules-test/build.gradle b/extensions/geode-modules-test/build.gradle
index 9b9ee95..47d42c6 100644
--- a/extensions/geode-modules-test/build.gradle
+++ b/extensions/geode-modules-test/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,38 +15,24 @@ import org.apache.geode.gradle.plugins.DependencyConstraints
* limitations under the License.
*/
+import org.apache.geode.gradle.plugins.DependencyConstraints
+
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
+dependencies {
+ // main
+ implementation(platform(project(':boms:geode-all-bom')))
+ implementation(project(':geode-dunit'))
+ implementation('org.springframework:spring-core')
+ implementation('org.httpunit:httpunit')
+ implementation('pl.pragmatists:JUnitParams')
+ api(project(':extensions:geode-modules'))
-dependencies {
- compile(platform(project(':boms:geode-all-bom')))
- compile(project(':extensions:geode-modules')) {
- // Remove everything related to Tomcat 6.x
- exclude group: 'org.apache.tomcat'
- }
- compile(project(':geode-core'))
- implementation(project(':geode-logging'))
+ compileOnly(platform(project(':boms:geode-all-bom')))
+ compileOnly('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
compile(project(':geode-junit')) {
exclude module: 'geode-core'
}
-
- implementation('org.assertj:assertj-core')
- implementation('org.springframework:spring-core')
- implementation('org.mockito:mockito-core')
- implementation('commons-io:commons-io')
- implementation('javax.servlet:javax.servlet-api')
- implementation('junit:junit')
- implementation('org.httpunit:httpunit') {
- // this version of httpunit contains very outdated xercesImpl
- exclude group: 'xerces'
- }
-
- compileOnly('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version')) {
- exclude module: 'annotations-api'
- exclude module: 'coyote'
- exclude module: 'tribes'
- }
}
-
diff --git a/extensions/geode-modules-tomcat7/build.gradle b/extensions/geode-modules-tomcat7/build.gradle
index bb3e677..cb3f3a6 100644
--- a/extensions/geode-modules-tomcat7/build.gradle
+++ b/extensions/geode-modules-tomcat7/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,57 +15,36 @@ import org.apache.geode.gradle.plugins.DependencyConstraints
* limitations under the License.
*/
+import org.apache.geode.gradle.plugins.DependencyConstraints
+
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
evaluationDependsOn(":geode-core")
+dependencies {
+ //main
+ implementation(platform(project(':boms:geode-all-bom')))
+ api(project(':geode-core'))
+ api(project(':extensions:geode-modules'))
-dependencies {
- compile(platform(project(':boms:geode-all-bom')))
- compile(project(':geode-core'))
- implementation('mx4j:mx4j')
- implementation('javax.servlet:javax.servlet-api')
- integrationTestImplementation('org.httpunit:httpunit')
- integrationTestImplementation('junit:junit')
- compile(project(':extensions:geode-modules')) {
- // Remove everything related to Tomcat 6.x
- exclude group: 'org.apache.tomcat'
- }
- testImplementation(project(':extensions:geode-modules')) {
- // Remove everything related to Tomcat 6.x
- exclude group: 'org.apache.tomcat'
- }
+ compileOnly(platform(project(':boms:geode-all-bom')))
+ compileOnly('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat7.version'))
+ compileOnly('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat7.version'))
- implementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat7.version')) {
- exclude module: 'tomcat-annotations-api'
- exclude module: 'tomcat-servlet-api'
- }
- implementation('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat7.version')) {
- exclude module: 'tomcat-servlet-api'
- }
- implementation('org.apache.tomcat:tomcat-juli:' + DependencyConstraints.get('tomcat7.version'))
- testImplementation('org.httpunit:httpunit')
+ // test
+ testImplementation(project(':extensions:geode-modules-test'))
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
- testImplementation(project(':extensions:geode-modules-test'))
- integrationTestImplementation(project(':geode-dunit')) {
- exclude module: 'geode-core'
- }
- integrationTestImplementation(project(':extensions:geode-modules-test'))
+ testImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat7.version'))
+ testImplementation('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat7.version'))
- integrationTestRuntimeOnly('javax.annotation:jsr250-api')
- integrationTestRuntimeOnly('javax.ejb:ejb-api')
- integrationTestRuntimeOnly('javax.servlet:javax.servlet-api')
- integrationTestRuntimeOnly('org.eclipse.persistence:javax.persistence')
- integrationTestRuntimeOnly('xerces:xercesImpl')
-}
-eclipse.classpath.file {
- whenMerged { classpath ->
- classpath.entries.removeAll { entry -> entry.path.contains('geode-modules/build')}
- }
+ // integrationTest
+ integrationTestImplementation(project(':extensions:geode-modules-test'))
+ integrationTestImplementation(project(':geode-dunit'))
+ integrationTestImplementation('org.httpunit:httpunit')
}
diff --git a/extensions/geode-modules-tomcat8/build.gradle b/extensions/geode-modules-tomcat8/build.gradle
index 0303583..574b5b3 100644
--- a/extensions/geode-modules-tomcat8/build.gradle
+++ b/extensions/geode-modules-tomcat8/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,72 +15,45 @@ import org.apache.geode.gradle.plugins.DependencyConstraints
* limitations under the License.
*/
+import org.apache.geode.gradle.plugins.DependencyConstraints
+
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
+apply from: "${rootDir}/${scriptDir}/warnings.gradle"
+apply from: "${rootDir}/${scriptDir}/publish-java.gradle"
evaluationDependsOn(":geode-core")
+dependencies {
+ // main
+ implementation(platform(project(':boms:geode-all-bom')))
+ api(project(':geode-core'))
+ api(project(':extensions:geode-modules'))
-dependencies {
- compile(platform(project(':boms:geode-all-bom')))
- distributedTestImplementation('junit:junit')
- implementation('mx4j:mx4j')
- distributedTestImplementation(project(':geode-logging'))
- testImplementation('org.httpunit:httpunit')
- testImplementation('org.apache.tomcat:tomcat-jaspic-api:' + DependencyConstraints.get('tomcat8.version'))
- testImplementation('org.httpunit:httpunit')
+ compileOnly(platform(project(':boms:geode-all-bom')))
+ compileOnly('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat8.version'))
+
+
+ // test
+ testImplementation(project(':extensions:geode-modules-test'))
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
- testImplementation(project(':extensions:geode-modules-test'))
- distributedTestImplementation('org.httpunit:httpunit')
- distributedTestImplementation('org.apache.tomcat:tomcat-jaspic-api:' + DependencyConstraints.get('tomcat8.version'))
- distributedTestImplementation('org.springframework:spring-core')
- compile(project(':geode-core'))
- compile(project(':extensions:geode-modules')) {
- exclude group: 'org.apache.tomcat'
- }
- testImplementation(project(':extensions:geode-modules')) {
- exclude group: 'org.apache.tomcat'
- }
-
+ testImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat8.version'))
- implementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat8.version')) {
- exclude module: 'tomcat-annotations-api'
- exclude module: 'tomcat-servlet-api'
- }
- implementation('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat8.version')) {
- exclude module: 'tomcat-servlet-api'
- }
- implementation('org.apache.tomcat:tomcat-juli:' + DependencyConstraints.get('tomcat8.version'))
- implementation('javax.servlet:javax.servlet-api')
- integrationTestImplementation(project(':geode-dunit')) {
- exclude module: 'geode-core'
- }
- integrationTestImplementation(project(':geode-junit')) {
- exclude module: 'geode-core'
- }
+ // integrationTest
integrationTestImplementation(project(':extensions:geode-modules-test'))
- integrationTestRuntimeOnly('xerces:xercesImpl')
- integrationTestRuntimeOnly('javax.annotation:javax.annotation-api')
+ integrationTestImplementation(project(':geode-dunit'))
- distributedTestImplementation(project(':geode-dunit')) {
- exclude module: 'geode-core'
- }
- distributedTestImplementation(project(':geode-junit')) {
- exclude module: 'geode-core'
- }
+ // distributedTest
distributedTestImplementation(project(':extensions:geode-modules-test'))
-
- distributedTestRuntimeOnly('xerces:xercesImpl')
- distributedTestRuntimeOnly('javax.annotation:javax.annotation-api')
+ distributedTestImplementation(project(':geode-dunit'))
+ distributedTestImplementation(project(':geode-logging'))
+ distributedTestImplementation('org.httpunit:httpunit')
}
-eclipse.classpath.file {
- whenMerged { classpath ->
- classpath.entries.removeAll { entry -> entry.path.contains('geode-modules/build')}
- }
+sonarqube {
+ skipProject = true
}
-
diff --git a/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml b/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml
new file mode 100644
index 0000000..5819c51
--- /dev/null
+++ b/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules-tomcat8</artifactId>
+ <version>${version}</version>
+ <name>Apache Geode</name>
+ <description>Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing</description>
+ <url>http://geode.apache.org</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:git:https://github.com:apache/geode.git</connection>
+ <developerConnection>scm:git:https://github.com:apache/geode.git</developerConnection>
+ <url>https://github.com/apache/geode</url>
+ </scm>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-all-bom</artifactId>
+ <version>${version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/extensions/geode-modules-tomcat9/build.gradle b/extensions/geode-modules-tomcat9/build.gradle
index a8763a8..6e47b1c 100644
--- a/extensions/geode-modules-tomcat9/build.gradle
+++ b/extensions/geode-modules-tomcat9/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,46 +15,38 @@ import org.apache.geode.gradle.plugins.DependencyConstraints
* limitations under the License.
*/
+import org.apache.geode.gradle.plugins.DependencyConstraints
+
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
+apply from: "${rootDir}/${scriptDir}/warnings.gradle"
+apply from: "${rootDir}/${scriptDir}/publish-java.gradle"
evaluationDependsOn(":geode-core")
+dependencies {
+ // main
+ implementation(platform(project(':boms:geode-all-bom')))
+ api(project(':geode-core'))
+ api(project(':extensions:geode-modules'))
-dependencies {
- compile(platform(project(':boms:geode-all-bom')))
- api(project(':extensions:geode-modules')) {
- exclude group: 'org.apache.tomcat'
- }
-// testImplementation(project(':extensions:geode-modules')) {
-// exclude group: 'org.apache.tomcat'
-// }
-
- implementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat9.version')) {
- exclude module: 'tomcat-annotations-api'
- exclude module: 'tomcat-servlet-api'
- }
- implementation('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat9.version')) {
- exclude module: 'tomcat-servlet-api'
- }
- implementation('org.apache.tomcat:tomcat-juli:' + DependencyConstraints.get('tomcat9.version'))
- implementation('javax.servlet:javax.servlet-api:' + '3.1.0')
-
- testImplementation('org.httpunit:httpunit')
+ compileOnly(platform(project(':boms:geode-all-bom')))
+ compileOnly('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat9.version'))
+
+
+ // test
+ testImplementation(project(':extensions:geode-modules-test'))
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
- testImplementation(project(':extensions:geode-modules-test'))
+ testImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat9.version'))
- distributedTestImplementation(project(':extensions:geode-modules-test'))
- distributedTestRuntimeOnly('xerces:xercesImpl')
- distributedTestRuntimeOnly('javax.annotation:javax.annotation-api')
+ // integrationTest
+ integrationTestImplementation(project(':extensions:geode-modules-test'))
+ integrationTestImplementation(project(':geode-dunit'))
}
-eclipse.classpath.file {
- whenMerged { classpath ->
- classpath.entries.removeAll { entry -> entry.path.contains('geode-modules/build')}
- }
+sonarqube {
+ skipProject = true
}
-
diff --git a/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml b/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml
new file mode 100644
index 0000000..6187a17
--- /dev/null
+++ b/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules-tomcat9</artifactId>
+ <version>${version}</version>
+ <name>Apache Geode</name>
+ <description>Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing</description>
+ <url>http://geode.apache.org</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:git:https://github.com:apache/geode.git</connection>
+ <developerConnection>scm:git:https://github.com:apache/geode.git</developerConnection>
+ <url>https://github.com/apache/geode</url>
+ </scm>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-all-bom</artifactId>
+ <version>${version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/extensions/geode-modules/build.gradle b/extensions/geode-modules/build.gradle
index db3d6ab..eaf7e7d0 100644
--- a/extensions/geode-modules/build.gradle
+++ b/extensions/geode-modules/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,57 +15,43 @@ import org.apache.geode.gradle.plugins.DependencyConstraints
* limitations under the License.
*/
+import org.apache.geode.gradle.plugins.DependencyConstraints
+
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
+apply from: "${rootDir}/${scriptDir}/publish-java.gradle"
evaluationDependsOn(":geode-core")
-
-
dependencies {
- compile(platform(project(':boms:geode-all-bom')))
+ // main
+ implementation(platform(project(':boms:geode-all-bom')))
implementation(project(':geode-logging'))
implementation(project(':geode-membership'))
implementation(project(':geode-serialization'))
- compile(project(':geode-core'))
- integrationTestImplementation(project(':extensions:geode-modules-test')) {
- exclude module: 'geode-modules'
- }
- integrationTestImplementation(project(':geode-dunit')) {
- exclude module: 'geode-core'
- }
- integrationTestImplementation(project(':geode-junit')) {
- exclude module: 'geode-core'
- }
-
- implementation('javax.servlet:javax.servlet-api')
- implementation('mx4j:mx4j')
- implementation('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version')) {
- exclude module: 'annotations-api'
- exclude module: 'coyote'
- exclude module: 'tribes'
- }
- implementation('org.apache.tomcat:catalina:' + DependencyConstraints.get('tomcat6.version'))
- implementation('org.apache.tomcat:juli:' + DependencyConstraints.get('tomcat6.version'))
- implementation('org.apache.tomcat:servlet-api:' + DependencyConstraints.get('tomcat6.version'))
implementation('org.slf4j:slf4j-api')
+ api(project(':geode-core'))
+
+ compileOnly(platform(project(':boms:geode-all-bom')))
+ compileOnly('javax.servlet:javax.servlet-api')
+ compileOnly('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
+
+
+ // test
testImplementation('org.apache.bcel:bcel')
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
+ testImplementation('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
- integrationTestImplementation('junit:junit')
+ // integrationTest
+ integrationTestImplementation(project(':extensions:geode-modules-test'))
+ integrationTestImplementation(project(':geode-dunit'))
integrationTestImplementation('pl.pragmatists:JUnitParams')
- integrationTestRuntimeOnly('org.apache.tomcat:coyote:' + DependencyConstraints.get('tomcat6.version'))
- integrationTestRuntimeOnly('xerces:xercesImpl')
- distributedTestImplementation(project(':geode-junit')) {
- exclude module: 'geode-core'
- }
- distributedTestImplementation(project(':geode-dunit')) {
- exclude module: 'geode-core'
- }
+ // distributedTest
+ distributedTestImplementation(project(':geode-dunit'))
}
diff --git a/extensions/geode-modules/src/test/resources/expected-pom.xml b/extensions/geode-modules/src/test/resources/expected-pom.xml
new file mode 100644
index 0000000..15e7714
--- /dev/null
+++ b/extensions/geode-modules/src/test/resources/expected-pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-modules</artifactId>
+ <version>${version}</version>
+ <name>Apache Geode</name>
+ <description>Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing</description>
+ <url>http://geode.apache.org</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:git:https://github.com:apache/geode.git</connection>
+ <developerConnection>scm:git:https://github.com:apache/geode.git</developerConnection>
+ <url>https://github.com/apache/geode</url>
+ </scm>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-all-bom</artifactId>
+ <version>${version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-logging</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-membership</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geode</groupId>
+ <artifactId>geode-serialization</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/gradle/publish-java.gradle b/gradle/publish-java.gradle
index 3a47b6a..15db47f 100644
--- a/gradle/publish-java.gradle
+++ b/gradle/publish-java.gradle
@@ -28,3 +28,50 @@ publishing {
}
}
}
+
+gradle.taskGraph.whenReady({ graph ->
+ tasks.withType(Jar).each { jar ->
+ jar.doFirst {
+ def projectDependencies = []
+ def runtimeList = []
+
+ // Iterate over runtime classpath dependencies and separate project dependencies from library
+ // dependencies.
+ configurations.runtimeClasspath
+ .collect { it.name - ".jar" }
+ .each { dependency ->
+ if (dependency.startsWith("geode-")) {
+ projectDependencies.add(dependency)
+ } else {
+ runtimeList.add(dependency+".jar")
+ }
+ }
+
+ // Iterate over project (parent) dependencies and remove its runtime library dependencies from
+ // the current project's runtime library dependencies.
+ // Also removes all parent project's runtime project dependencies from the current project.
+ // This returns a unique set of parent project and library dependencies that are not found
+ // within it's parent's project dependencies.
+ projectDependencies.clone().each { projectDependency ->
+ def geodeProject = projectDependency - "-${version}.jar"
+ if (projectDependencies.contains(geodeProject)) {
+ try {
+ def parentProject = project(":$geodeProject" - "-$version")
+ def collect = parentProject.configurations.runtimeClasspath.collect { it.name }
+ runtimeList.removeAll(collect)
+ projectDependencies.removeAll(collect.collect {it-".jar"})
+ } catch (UnknownProjectException ignore) {
+ }
+ }
+ }
+
+ manifest {
+ attributes.put("Class-Path", runtimeList.join(' '))
+ attributes.put("Dependent-Modules", projectDependencies.join(' '))
+ attributes.put("Module-Name", project.name)
+ }
+ }
+ }
+})
+
+