You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2019/06/12 02:15:16 UTC
[lucene-solr] branch jira/SOLR-13452_gradle_3 updated: SOLR-13452:
Fix logging dependency issue and only add dependency tasks to java modules.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch jira/SOLR-13452_gradle_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/SOLR-13452_gradle_3 by this push:
new f95b648 SOLR-13452: Fix logging dependency issue and only add dependency tasks to java modules.
f95b648 is described below
commit f95b6487155950b359176d61948a1c3bf1132b59
Author: markrmiller <ma...@apache.org>
AuthorDate: Tue Jun 11 21:15:07 2019 -0500
SOLR-13452: Fix logging dependency issue and only add dependency tasks to java modules.
---
build.gradle | 53 ++++++++++++----------
.../org/apache/lucene/gradle/UnusedDeps.groovy | 2 +-
solr/core/build.gradle | 13 +++---
3 files changed, 36 insertions(+), 32 deletions(-)
diff --git a/build.gradle b/build.gradle
index cb60e43..70b4636 100644
--- a/build.gradle
+++ b/build.gradle
@@ -188,33 +188,36 @@ configure(allprojects) {
File jdepsReportDir = mfile(project.buildDir, 'jdepsreport')
- task jdepsReport(type: org.apache.lucene.gradle.JdepsReport) {
- target = jdepsReportDir
- }
-
- task listDependencies(type: org.apache.lucene.gradle.ListDeps) {
- group = 'Help'
- description = "List sorted dependencies and counts for a module."
- }
-
- task unusedDependencies {
- group = 'Help'
- description = "Lists dependencies that may be unused for a module."
- task unusedDeps(type: org.apache.lucene.gradle.UnusedDeps) {
- inputDirectory jdepsReportDir
+ plugins.withType(JavaPlugin) {
+ task jdepsReport(type: org.apache.lucene.gradle.JdepsReport) {
+ target = jdepsReportDir
+ dependsOn jar
}
- unusedDeps.dependsOn jdepsReport
- dependsOn unusedDeps
- }
-
- task missingDependencies {
- group = 'Help'
- description = "Lists classes from this module with missing runtime dependencies (we ignore scanning some root deps (ie hadoop) and some violations (ie annotations)."
- task missingDeps(type: org.apache.lucene.gradle.MissingDeps) {
- inputDirectory jdepsReportDir
+
+ task listDependencies(type: org.apache.lucene.gradle.ListDeps) {
+ group = 'Help'
+ description = "List sorted dependencies and counts for a module."
+ }
+
+ task unusedDependencies {
+ group = 'Help'
+ description = "Lists dependencies that may be unused for a module."
+ task unusedDeps(type: org.apache.lucene.gradle.UnusedDeps) {
+ inputDirectory jdepsReportDir
+ }
+ unusedDeps.dependsOn jdepsReport
+ dependsOn unusedDeps
+ }
+
+ task missingDependencies {
+ group = 'Help'
+ description = "Lists classes from this module with missing runtime dependencies (we ignore scanning some root deps (ie hadoop) and some violations (ie annotations)."
+ task missingDeps(type: org.apache.lucene.gradle.MissingDeps) {
+ inputDirectory jdepsReportDir
+ }
+ missingDeps.dependsOn jdepsReport
+ dependsOn missingDeps
}
- missingDeps.dependsOn jdepsReport
- dependsOn missingDeps
}
}
diff --git a/buildSrc/src/main/groovy/org/apache/lucene/gradle/UnusedDeps.groovy b/buildSrc/src/main/groovy/org/apache/lucene/gradle/UnusedDeps.groovy
index a18d8c4..ff5b7f7 100644
--- a/buildSrc/src/main/groovy/org/apache/lucene/gradle/UnusedDeps.groovy
+++ b/buildSrc/src/main/groovy/org/apache/lucene/gradle/UnusedDeps.groovy
@@ -148,7 +148,7 @@ class UnusedDeps extends DefaultTask {
for (String exclude : jarExcludes) {
if (it.matches(exclude)) {
- println - 'excluded violation: ' + it
+ println ' - excluded violation : ' + it
return
}
}
diff --git a/solr/core/build.gradle b/solr/core/build.gradle
index a5a7b1d..3e45e9b 100644
--- a/solr/core/build.gradle
+++ b/solr/core/build.gradle
@@ -48,9 +48,7 @@ dependencies {
runtimeOnly ('com.lmax:disruptor')
runtimeOnly ('org.slf4j:log4j-over-slf4j') // bridge for deps that use log4j12 directly
runtimeOnly ('org.slf4j:jcl-over-slf4j') // bridge java common logging to slf4j
- // TODO: this is not great, still have to work out logging dist strat
- runtimeOnly ('org.apache.logging.log4j:log4j-slf4j-impl')
-
+
// kerb, kerby, and curator deps used for security and auth with zk/hdfs/kerberos
runtimeOnly ('org.apache.curator:curator-recipes') { transitive = false } // brings in a lot we don't use
runtimeOnly ('org.apache.kerby:kerb-core')
@@ -62,7 +60,13 @@ dependencies {
compileOnly ('javax.servlet:javax.servlet-api')
+ // logging
implementation ('org.slf4j:slf4j-api')
+ implementation ('org.apache.logging.log4j:log4j-api')
+ implementation ('org.apache.logging.log4j:log4j-core')
+ // implementation ('org.apache.logging.log4j:log4j-1.2-api') // used by StartupLoggingUtils
+ implementation ('org.apache.logging.log4j:log4j-slf4j-impl') // still have to work out logging dist strat
+
implementation ('org.apache.zookeeper:zookeeper') { transitive = false } // brings in a lot we don't use
implementation ('org.apache.httpcomponents:httpclient')
implementation ('org.apache.httpcomponents:httpcore')
@@ -90,9 +94,6 @@ dependencies {
implementation ('org.restlet.jee:org.restlet')
implementation ('com.carrotsearch:hppc')
- implementation ('org.apache.logging.log4j:log4j-api')
- implementation ('org.apache.logging.log4j:log4j-core')
-
implementation ('com.fasterxml.jackson.core:jackson-core')
implementation ('com.fasterxml.jackson.core:jackson-databind')
implementation ('com.fasterxml.jackson.core:jackson-annotations')