You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ab...@apache.org on 2018/11/28 01:28:13 UTC
[geode] branch develop updated: GEODE-1168 Improves build to
automatically add jars to runtime classpath
This is an automated email from the ASF dual-hosted git repository.
abaker pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 13af5bc GEODE-1168 Improves build to automatically add jars to runtime classpath
13af5bc is described below
commit 13af5bc35a4efd695e03aa3ae99c5a674382f0c5
Author: Anthony Baker <ab...@apache.org>
AuthorDate: Tue Nov 27 16:57:00 2018 -0800
GEODE-1168 Improves build to automatically add jars to runtime classpath
Flips the generation of the geode-dependencies classpath from an
include list to an exclude list. Every dependent jar that is not
specifically excluded will be added to the classpath automatically.
Eventually we should include lib/* and remove auxillary jars to
alternate locations.
---
geode-assembly/build.gradle | 92 +++++++---------------
.../resources/dependency_classpath.txt | 3 +
2 files changed, 30 insertions(+), 65 deletions(-)
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 5f8ba28..c5e2901 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -248,76 +248,38 @@ task defaultCacheConfig(type: JavaExec, dependsOn: classes) {
def cp = {
// first add all the dependent project jars
def jars = configurations.archives.dependencies.collect { it.dependencyProject }
- .findAll { !(it.name.contains('web') || it.name.contains('pulse')) }
+ .findAll { !(it.name.contains('geode-web') || it.name.contains('geode-pulse')) }
.collect { it.jar.archiveName }
- .join(' ')
// then add all the dependencies of the dependent jars
- jars += ' ' + configurations.archives.dependencies.collect {
- it.dependencyProject.findAll { !(it.name.contains('web-api') || it.name.contains('pulse')) }
- .collect { it.configurations.runtimeClasspath.collect { it.getName() }.findAll {
- // depedencies from geode-core
- it.contains('activation') ||
- it.contains('antlr') ||
- it.contains('commons-io') ||
- it.contains('classgraph') ||
- it.contains('commons-collections') ||
- it.contains('commons-lang3') ||
- it.contains('commons-logging') ||
- it.contains('commons-validator') ||
- it.contains('commons-beanutils') ||
- it.contains('commons-codec') ||
- it.contains('fastutil') ||
- it.contains('jackson-annotations') ||
- it.contains('jackson-core') ||
- it.contains('jackson-databind') ||
- it.contains('jansi') ||
- it.contains('javax.resource-api') ||
- it.contains('javax.servlet-api') ||
- it.contains('javax.transaction-api') ||
- it.contains('jaxb') ||
- it.contains('jetty-http') ||
- it.contains('jetty-io') ||
- it.contains('jetty-security') ||
- it.contains('jetty-server') ||
- it.contains('jetty-servlet') ||
- it.contains('jetty-webapp') ||
- it.contains('jetty-util') ||
- it.contains('jetty-xml') ||
- it.contains('jline') ||
- it.contains('jna') ||
- it.contains('jopt-simple') ||
- it.contains('log4j-api') ||
- it.contains('log4j-core') ||
- it.contains('log4j-jcl') ||
- it.contains('log4j-jul') ||
- it.contains('log4j-slf4j-impl') ||
- it.contains('rmiio') ||
- it.contains('shiro') ||
- it.contains('slf4j-api') ||
- it.contains('spring-core') ||
- it.contains('spring-shell') ||
- it.contains('snappy') ||
- it.contains('jgroups') ||
- it.contains('netty') ||
-
- // dependencies from geode-lucene
- it.contains('lucene-analyzers-common') ||
- it.contains('lucene-core') ||
- it.contains('lucene-queries') ||
- it.contains('lucene-queryparser') ||
- it.contains('lucene-analyzers-phonetic') ||
-
- // dependencies from geode-protobuf
- it.contains('protobuf-java') ||
-
- // dependencies from geode-connectors
- it.contains('HikariCP')
- }
+ def depJars = configurations.archives.dependencies.collect {
+ it.dependencyProject.findAll { !(it.name.contains('geode-web') || it.name.contains('geode-pulse')) }
+ .collect { it.configurations.runtimeClasspath.collect { it.getName() }.findAll { !(
+ // exclude mx4j, once the deprecated code is deleted we can remove these entirely
+ it.contains('commons-digester') ||
+ it.contains('commons-modeler') ||
+ it.contains('javax.mail-api') ||
+ it.contains('mx4j') ||
+
+ // misc jars, these should be removed from the lib dir
+ it.contains('findbugs-annotations') ||
+ it.contains('geode-dependencies') ||
+ it.contains('geode-jca') ||
+ it.contains('geode-web') ||
+ it.contains('gfsh-dependencies') ||
+ it.contains('ra.jar') ||
+
+ // spring web deps that shouldn't be here either
+ it.contains('spring-aop') ||
+ it.contains('spring-beans') ||
+ it.contains('spring-context') ||
+ it.contains('spring-expression') ||
+ it.contains('spring-web')
+ )}
}
- }.flatten().unique().join(' ')
+ }.flatten()
- return jars
+ return jars.plus(depJars).unique().join(' ')
}
// Note: this dependency doesn't work if you change a library version from
diff --git a/geode-assembly/src/integrationTest/resources/dependency_classpath.txt b/geode-assembly/src/integrationTest/resources/dependency_classpath.txt
index 7c10995..312715b 100644
--- a/geode-assembly/src/integrationTest/resources/dependency_classpath.txt
+++ b/geode-assembly/src/integrationTest/resources/dependency_classpath.txt
@@ -31,6 +31,7 @@ log4j-core-2.11.1.jar
log4j-jcl-2.11.1.jar
log4j-jul-2.11.1.jar
log4j-api-2.11.1.jar
+geo-0.7.1.jar
jetty-webapp-9.4.12.v20180830.jar
spring-core-4.3.20.RELEASE.jar
snappy-0.4.jar
@@ -52,9 +53,11 @@ commons-beanutils-1.9.3.jar
commons-logging-1.2.jar
commons-collections-3.2.2.jar
javax.transaction-api-1.2.jar
+grumpy-core-0.2.2.jar
jetty-xml-9.4.12.v20180830.jar
jetty-servlet-9.4.12.v20180830.jar
jline-2.12.jar
+commons-math3-3.2.jar
jetty-security-9.4.12.v20180830.jar
jetty-server-9.4.12.v20180830.jar
jetty-http-9.4.12.v20180830.jar