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/27 01:03:48 UTC
[geode] branch better-classpath created (now 2cd3dc8)
This is an automated email from the ASF dual-hosted git repository.
abaker pushed a change to branch better-classpath
in repository https://gitbox.apache.org/repos/asf/geode.git.
at 2cd3dc8 GEODE-1168 Improves build to automatically add jars to runtime classpath
This branch includes the following new commits:
new 2cd3dc8 GEODE-1168 Improves build to automatically add jars to runtime classpath
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[geode] 01/01: GEODE-1168 Improves build to automatically add jars
to runtime classpath
Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
abaker pushed a commit to branch better-classpath
in repository https://gitbox.apache.org/repos/asf/geode.git
commit 2cd3dc8579c98b3d7d812a6e77da599379ccd005
Author: Anthony Baker <ab...@apache.org>
AuthorDate: Wed Nov 21 13:41:55 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 f4ff381..9c0aedd 100644
--- a/geode-assembly/src/integrationTest/resources/dependency_classpath.txt
+++ b/geode-assembly/src/integrationTest/resources/dependency_classpath.txt
@@ -35,7 +35,10 @@ log4j-jcl-2.11.1.jar
jna-4.1.0.jar
geode-rebalancer-1.9.0-SNAPSHOT.jar
rmiio-2.1.2.jar
+grumpy-core-0.2.2.jar
commons-codec-1.10.jar
+geo-0.7.1.jar
+commons-math3-3.2.jar
log4j-api-2.11.1.jar
jetty-server-9.4.12.v20180830.jar
geode-connectors-1.9.0-SNAPSHOT.jar