This is an automated email from the ASF dual-hosted git repository. epugh pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/solr.git
commit 68ee324c2c3e8c9e68ad8a56bf269dcabdbfa236 Author: Kevin Risden <[email protected]> AuthorDate: Mon Feb 7 09:59:28 2022 -0500 SOLR-15984: Ensure all used dependencies are declared * Add missing dependencies that are used in compile and test * LTR module - remove jetty-servlet dependency since it wasn't used --- build.gradle | 2 + .../validation/dependency-analyze.gradle | 27 ++++++------ solr/CHANGES.txt | 2 + solr/benchmark/build.gradle | 9 +++- solr/core/build.gradle | 49 +++++++++++++++++++++- solr/modules/analysis-extras/build.gradle | 24 +++++++---- solr/modules/analytics/build.gradle | 9 ++++ solr/modules/clustering/build.gradle | 10 +++-- solr/modules/extraction/build.gradle | 6 +++ solr/modules/gcs-repository/build.gradle | 9 +++- solr/modules/hdfs/build.gradle | 23 +++++++--- .../modules/jaegertracer-configurator/build.gradle | 7 +++- solr/modules/langid/build.gradle | 6 ++- solr/modules/ltr/build.gradle | 11 ++++- .../org/apache/solr/ltr/TestLTROnSolrCloud.java | 10 +---- .../test/org/apache/solr/ltr/TestRerankBase.java | 17 +++----- solr/modules/s3-repository/build.gradle | 23 +++++++++- solr/modules/scripting/build.gradle | 8 ++++ solr/prometheus-exporter/build.gradle | 8 +++- solr/solr-ref-guide/build.gradle | 6 +-- solr/solrj/build.gradle | 24 +++++++++++ solr/test-framework/build.gradle | 24 ++++++++++- versions.lock | 23 +++++----- 23 files changed, 257 insertions(+), 80 deletions(-) diff --git a/build.gradle b/build.gradle index 6e7c369..bdcc50b 100644 --- a/build.gradle +++ b/build.gradle @@ -22,6 +22,7 @@ plugins { id "base" id "com.palantir.consistent-versions" version "2.0.0" id "org.owasp.dependencycheck" version "6.4.1.1" + id 'ca.cutterslade.analyze' version "1.8.3" id 'de.thetaphi.forbiddenapis' version '3.2' apply false id "de.undercouch.download" version "4.0.2" apply false id "net.ltgt.errorprone" version "2.0.2" apply false @@ -152,6 +153,7 @@ apply from: file('gradle/validation/versions-props-sorted.gradle') apply from: file('gradle/validation/validate-source-patterns.gradle') apply from: file('gradle/validation/rat-sources.gradle') apply from: file('gradle/validation/owasp-dependency-check.gradle') +apply from: file('gradle/validation/dependency-analyze.gradle') apply from: file('gradle/validation/ecj-lint.gradle') apply from: file('gradle/validation/gradlew-scripts-tweaked.gradle') apply from: file('gradle/validation/validate-log-calls.gradle') diff --git a/solr/modules/ltr/build.gradle b/gradle/validation/dependency-analyze.gradle similarity index 52% copy from solr/modules/ltr/build.gradle copy to gradle/validation/dependency-analyze.gradle index a53dd0c..55339e9 100644 --- a/solr/modules/ltr/build.gradle +++ b/gradle/validation/dependency-analyze.gradle @@ -15,20 +15,23 @@ * limitations under the License. */ -apply plugin: 'java-library' +// This adds gradle-dependency-analyze validation of project dependencies +// https://github.com/gradle-dependency-analyze/gradle-dependency-analyze -description = 'Learning to Rank Package' +allprojects { prj -> + plugins.withId("java", { + prj.apply plugin: 'ca.cutterslade.analyze' -dependencies { - implementation project(':solr:core') + analyzeClassesDependencies { + warnUsedUndeclared = false // means fail build if UsedUndeclared found + warnUnusedDeclared = true // means only log warning if UnusedDeclared found + logDependencyInformationToFiles = true + } - implementation 'commons-io:commons-io' - implementation "org.apache.lucene:lucene-analysis-common" - - testImplementation('org.mockito:mockito-core', { - exclude group: "net.bytebuddy", module: "byte-buddy-agent" + analyzeTestClassesDependencies { + warnUsedUndeclared = false // means fail build if UsedUndeclared found + warnUnusedDeclared = true // means only log warning if UnusedDeclared found + logDependencyInformationToFiles = true + } }) - testImplementation ('org.objenesis:objenesis') - - testImplementation project(':solr:test-framework') } diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 36d6aca..dd99c8e 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -316,6 +316,8 @@ Build * SOLR-15670: Introduce Gradle parameter to skip ref-guide tasks (Houston Putman, Dawid Weiss) +* SOLR-15984: Ensure all used dependencies are declared (Kevin Risden) + Other Changes ---------------------- * SOLR-14656: Autoscaling framework removed (Ishan Chattopadhyaya, noble, Ilan Ginzburg) diff --git a/solr/benchmark/build.gradle b/solr/benchmark/build.gradle index a6e9b62..cbfb9d1 100644 --- a/solr/benchmark/build.gradle +++ b/solr/benchmark/build.gradle @@ -45,10 +45,17 @@ task echoCp { dependencies { implementation project(':solr:test-framework') + implementation project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' implementation 'commons-io:commons-io' - implementation "org.quicktheories:quicktheories" + implementation 'io.dropwizard.metrics:metrics-core' + implementation 'org.apache.commons:commons-math3' implementation 'org.jctools:jctools-core' + implementation 'org.quicktheories:quicktheories' implementation 'org.openjdk.jmh:jmh-core' annotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess' + implementation 'org.slf4j:slf4j-api' } diff --git a/solr/core/build.gradle b/solr/core/build.gradle index 9d2acf1..ed43b04 100644 --- a/solr/core/build.gradle +++ b/solr/core/build.gradle @@ -76,13 +76,39 @@ dependencies { implementation 'commons-cli:commons-cli' + implementation 'org.locationtech.spatial4j:spatial4j' + + implementation 'com.fasterxml.jackson.core:jackson-annotations' + implementation 'com.fasterxml.jackson.core:jackson-core' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile' + implementation 'org.apache.httpcomponents:httpclient' + implementation 'org.apache.httpcomponents:httpcore' + + implementation 'javax.servlet:javax.servlet-api' + implementation 'org.eclipse.jetty:jetty-client' + implementation 'org.eclipse.jetty.http2:http2-common' + implementation 'org.eclipse.jetty.http2:http2-server' + implementation 'org.eclipse.jetty:jetty-alpn-server' + implementation 'org.eclipse.jetty:jetty-http' + implementation 'org.eclipse.jetty:jetty-io' + implementation 'org.eclipse.jetty:jetty-rewrite' + implementation 'org.eclipse.jetty:jetty-server' + implementation 'org.eclipse.jetty:jetty-servlet' + implementation 'org.eclipse.jetty:jetty-util' + // ZooKeeper & Curator - implementation 'org.apache.zookeeper:zookeeper' + implementation('org.apache.zookeeper:zookeeper', { + exclude group: "org.apache.yetus", module: "audience-annotations" + exclude group: "log4j", module: "log4j" + exclude group: "org.slf4j", module: "slf4j-log4j12" + }) + implementation ('org.apache.zookeeper:zookeeper-jute') { + exclude group: 'org.apache.yetus', module: 'audience-annotations' + } // required for instantiating a Zookeeper server (for embedding ZK or running tests) runtimeOnly ('org.xerial.snappy:snappy-java') implementation ('org.apache.curator:curator-client') @@ -113,13 +139,21 @@ dependencies { implementation 'org.apache.logging.log4j:log4j-core' implementation 'org.apache.logging.log4j:log4j-slf4j-impl' + implementation 'io.dropwizard.metrics:metrics-core' + implementation ('io.dropwizard.metrics:metrics-graphite', { + exclude group: "com.rabbitmq", module: "amqp-client" + }) + implementation 'io.dropwizard.metrics:metrics-jmx' + implementation 'io.dropwizard.metrics:metrics-jvm' + testImplementation 'org.slf4j:jcl-over-slf4j' // JWT Auth plugin api 'org.bitbucket.b_c:jose4j' // For faster XML processing than the JDK - implementation (group: 'com.fasterxml.woodstox', name: 'woodstox-core') + implementation 'org.codehaus.woodstox:stax2-api' + implementation 'com.fasterxml.woodstox:woodstox-core' // SQL Parser via Calcite implementation ('org.apache.calcite:calcite-core', { @@ -158,8 +192,15 @@ dependencies { testImplementation project(':solr:modules:analysis-extras') + testImplementation project(':solr:core') testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' + testImplementation 'org.hamcrest:hamcrest' + testImplementation('org.mockito:mockito-core', { exclude group: "net.bytebuddy", module: "byte-buddy-agent" }) @@ -169,6 +210,10 @@ dependencies { exclude group: "io.netty", module: "netty-all" exclude group: "ch.qos.logback", module: "logback-classic" }) + + testImplementation 'com.nimbusds:nimbus-jose-jwt' + testImplementation 'com.squareup.okhttp3:mockwebserver' + testImplementation 'com.squareup.okhttp3:okhttp' } diff --git a/solr/modules/analysis-extras/build.gradle b/solr/modules/analysis-extras/build.gradle index 040023e..5d62f9d 100644 --- a/solr/modules/analysis-extras/build.gradle +++ b/solr/modules/analysis-extras/build.gradle @@ -15,7 +15,6 @@ * limitations under the License. */ - apply plugin: 'java-library' description = 'Additional analysis components' @@ -23,17 +22,26 @@ description = 'Additional analysis components' dependencies { api project(':solr:core') + implementation project(':solr:solrj') + implementation 'commons-io:commons-io' - implementation "org.apache.lucene:lucene-analysis-icu" - implementation "org.apache.lucene:lucene-analysis-smartcn" - implementation "org.apache.lucene:lucene-analysis-morfologik" - implementation "org.apache.lucene:lucene-analysis-opennlp" - implementation "org.apache.lucene:lucene-analysis-smartcn" - implementation "org.apache.lucene:lucene-analysis-stempel" + implementation 'com.ibm.icu:icu4j' + implementation 'org.apache.lucene:lucene-analysis-icu' + implementation 'org.apache.lucene:lucene-analysis-smartcn' + implementation 'org.apache.lucene:lucene-analysis-morfologik' + implementation 'org.apache.lucene:lucene-analysis-opennlp' + implementation 'org.apache.lucene:lucene-analysis-smartcn' + implementation 'org.apache.lucene:lucene-analysis-stempel' + implementation 'org.apache.lucene:lucene-core' + implementation 'org.apache.opennlp:opennlp-tools' + implementation 'org.slf4j:slf4j-api' testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-analysis-common' + testImplementation 'junit:junit' testImplementation('org.mockito:mockito-core', { exclude group: "net.bytebuddy", module: "byte-buddy-agent" }) - testImplementation('org.apache.logging.log4j:log4j-core') + testImplementation 'org.apache.logging.log4j:log4j-api' + testImplementation 'org.apache.logging.log4j:log4j-core' } diff --git a/solr/modules/analytics/build.gradle b/solr/modules/analytics/build.gradle index 645a79e..70f1fd1 100644 --- a/solr/modules/analytics/build.gradle +++ b/solr/modules/analytics/build.gradle @@ -21,7 +21,16 @@ description = 'Analytics Package' dependencies { implementation project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' + + implementation 'com.fasterxml.jackson.core:jackson-annotations' + implementation 'com.fasterxml.jackson.core:jackson-core' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation ('com.google.guava:guava') { transitive = false } + testImplementation project(':solr:test-framework') + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' } diff --git a/solr/modules/clustering/build.gradle b/solr/modules/clustering/build.gradle index fc60c45..87c6056 100644 --- a/solr/modules/clustering/build.gradle +++ b/solr/modules/clustering/build.gradle @@ -15,19 +15,23 @@ * limitations under the License. */ - apply plugin: 'java-library' description = 'Search Results Clustering Integraton' dependencies { implementation project(':solr:core') + implementation project(':solr:solrj') - implementation "org.apache.lucene:lucene-analysis-common" + implementation 'org.apache.lucene:lucene-analysis-common' + implementation 'org.apache.lucene:lucene-core' implementation 'commons-io:commons-io' - implementation 'org.carrot2:carrot2-core' + implementation 'org.slf4j:slf4j-api' testImplementation project(':solr:test-framework') + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' + testImplementation 'org.hamcrest:hamcrest' } diff --git a/solr/modules/extraction/build.gradle b/solr/modules/extraction/build.gradle index bd40142..db44ec3 100644 --- a/solr/modules/extraction/build.gradle +++ b/solr/modules/extraction/build.gradle @@ -21,6 +21,10 @@ description = 'Solr Integration with Tika for extracting content from binary fil dependencies { implementation project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' + implementation 'org.slf4j:slf4j-api' // We export tika because other modules depend on it (and its submodules) // and we don't want to duplicate the dependency across different modules. @@ -73,4 +77,6 @@ dependencies { implementation ('com.ibm.icu:icu4j') testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'junit:junit' } diff --git a/solr/modules/gcs-repository/build.gradle b/solr/modules/gcs-repository/build.gradle index 05e4c82..d052a5c 100644 --- a/solr/modules/gcs-repository/build.gradle +++ b/solr/modules/gcs-repository/build.gradle @@ -27,6 +27,10 @@ configurations.all { dependencies { api project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' + implementation 'org.slf4j:slf4j-api' implementation ('com.google.guava:guava') { transitive = false } implementation ('com.google.api:api-common') { exclude group: 'com.google.guava', module: 'guava' } @@ -55,6 +59,9 @@ dependencies { implementation('io.opencensus:opencensus-api') { transitive = false } implementation('io.opencensus:opencensus-contrib-http-util') { exclude group: 'com.google.guava', module: 'guava' } - testImplementation("com.google.cloud:google-cloud-nio") { exclude group: 'com.google.guava', module: 'guava' } testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' + testImplementation("com.google.cloud:google-cloud-nio") { exclude group: 'com.google.guava', module: 'guava' } } diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index 515d238..a0686ad 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -30,6 +30,11 @@ dependencies { } implementation project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' + + implementation 'org.slf4j:slf4j-api' // Hadoop dependencies implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } @@ -50,9 +55,10 @@ dependencies { // Caffeine cache to implement HDFS block caching implementation ('com.github.ben-manes.caffeine:caffeine') - // Many HDFS tests are using/subclassing test framework classes - testImplementation project(':solr:solrj') testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' // hadoop dependencies for tests testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } @@ -69,17 +75,22 @@ dependencies { // required for instantiating a Zookeeper server in tests or embedded runtimeOnly ('org.xerial.snappy:snappy-java') - // commons packages needed by test classes - testImplementation('commons-io:commons-io') { transitive = false } - // used by the hadoop-specific test framework classes + testImplementation('commons-io:commons-io') { transitive = false } testImplementation ('org.apache.commons:commons-compress') { transitive = false } testImplementation ('org.apache.commons:commons-collections4') { transitive = false } testImplementation ('org.apache.commons:commons-lang3') { transitive = false } testImplementation ('com.sun.jersey:jersey-servlet') { transitive = false } + testImplementation 'io.dropwizard.metrics:metrics-core' + testImplementation 'javax.servlet:javax.servlet-api' + testImplementation 'org.eclipse.jetty:jetty-http' + testImplementation 'org.eclipse.jetty:jetty-server' + testImplementation 'org.eclipse.jetty:jetty-servlet' + testImplementation 'org.eclipse.jetty:jetty-util' + testImplementation 'org.eclipse.jetty:jetty-webapp' // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this - implementation ('org.apache.zookeeper:zookeeper') + testImplementation 'org.apache.zookeeper:zookeeper' } diff --git a/solr/modules/jaegertracer-configurator/build.gradle b/solr/modules/jaegertracer-configurator/build.gradle index 5b11804..0ae23dd 100644 --- a/solr/modules/jaegertracer-configurator/build.gradle +++ b/solr/modules/jaegertracer-configurator/build.gradle @@ -22,6 +22,8 @@ description = 'Jaeger tracer configurator for tracing Solr using OpenTracing wit dependencies { implementation project(':solr:core') + implementation 'io.opentracing:opentracing-api' + implementation 'io.jaegertracing:jaeger-core' implementation ("io.jaegertracing:jaeger-thrift", { exclude group: "com.squareup.okhttp3", module: "okhttp" exclude group: "com.google.code.gson", module: "gson" // for "RemoteControlledSampler", optional @@ -31,4 +33,7 @@ dependencies { }) testImplementation project(':solr:test-framework') -} \ No newline at end of file + testImplementation project(':solr:solrj') + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' +} diff --git a/solr/modules/langid/build.gradle b/solr/modules/langid/build.gradle index 1a8629c..5576d9d 100644 --- a/solr/modules/langid/build.gradle +++ b/solr/modules/langid/build.gradle @@ -15,20 +15,22 @@ * limitations under the License. */ - apply plugin: 'java-library' description = 'Language Identifier module for extracting language from a document being indexed' dependencies { implementation project(':solr:core') + implementation project(':solr:solrj') implementation ('org.apache.tika:tika-core') { transitive = false } implementation 'commons-io:commons-io' implementation 'com.cybozu.labs:langdetect' implementation 'net.arnx:jsonic' implementation 'org.apache.opennlp:opennlp-tools' - + implementation 'org.slf4j:slf4j-api' testImplementation project(':solr:test-framework') + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' } diff --git a/solr/modules/ltr/build.gradle b/solr/modules/ltr/build.gradle index a53dd0c..69fa36f 100644 --- a/solr/modules/ltr/build.gradle +++ b/solr/modules/ltr/build.gradle @@ -21,14 +21,21 @@ description = 'Learning to Rank Package' dependencies { implementation project(':solr:core') + implementation project(':solr:solrj') implementation 'commons-io:commons-io' - implementation "org.apache.lucene:lucene-analysis-common" + implementation 'org.apache.lucene:lucene-analysis-common' + implementation 'org.apache.lucene:lucene-core' + + implementation 'org.slf4j:slf4j-api' testImplementation('org.mockito:mockito-core', { exclude group: "net.bytebuddy", module: "byte-buddy-agent" }) - testImplementation ('org.objenesis:objenesis') testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' + testImplementation 'org.hamcrest:hamcrest' } diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/TestLTROnSolrCloud.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/TestLTROnSolrCloud.java index 328dcae..91f0792 100644 --- a/solr/modules/ltr/src/test/org/apache/solr/ltr/TestLTROnSolrCloud.java +++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/TestLTROnSolrCloud.java @@ -19,7 +19,6 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering; import java.io.File; import java.util.Collections; import java.util.List; -import java.util.SortedMap; import java.util.stream.IntStream; import org.apache.commons.io.FileUtils; @@ -38,7 +37,6 @@ import org.apache.solr.ltr.feature.SolrFeature; import org.apache.solr.ltr.feature.ValueFeature; import org.apache.solr.ltr.model.LinearModel; import org.apache.solr.util.RestTestHarness; -import org.eclipse.jetty.servlet.ServletHolder; import org.junit.AfterClass; import org.junit.Test; @@ -51,12 +49,10 @@ public class TestLTROnSolrCloud extends TestRerankBase { String solrconfig = "solrconfig-ltr.xml"; String schema = "schema.xml"; - SortedMap<ServletHolder,String> extraServlets = null; - @Override public void setUp() throws Exception { super.setUp(); - extraServlets = setupTestInit(solrconfig, schema, true); + setupTestInit(solrconfig, schema, true); System.setProperty("enable.update.log", "true"); int numberOfShards = random().nextInt(4)+1; @@ -65,8 +61,6 @@ public class TestLTROnSolrCloud extends TestRerankBase { int numberOfNodes = numberOfShards * numberOfReplicas; setupSolrCluster(numberOfShards, numberOfReplicas, numberOfNodes); - - } @@ -222,7 +216,7 @@ public class TestLTROnSolrCloud extends TestRerankBase { private void setupSolrCluster(int numShards, int numReplicas, int numServers) throws Exception { JettyConfig jc = buildJettyConfig("/solr"); - jc = JettyConfig.builder(jc).withServlets(extraServlets).build(); + jc = JettyConfig.builder(jc).build(); solrCluster = new MiniSolrCloudCluster(numServers, tmpSolrHome.toPath(), jc); File configDir = tmpSolrHome.toPath().resolve("collection1/conf").toFile(); solrCluster.uploadConfigSet(configDir.toPath(), "conf1"); diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/TestRerankBase.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/TestRerankBase.java index 4e397a5..b02c4c5 100644 --- a/solr/modules/ltr/src/test/org/apache/solr/ltr/TestRerankBase.java +++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/TestRerankBase.java @@ -27,8 +27,6 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.SortedMap; -import java.util.TreeMap; import org.apache.commons.io.FileUtils; import org.apache.solr.common.util.Utils; @@ -43,7 +41,6 @@ import org.apache.solr.ltr.store.FeatureStore; import org.apache.solr.ltr.store.rest.ManagedFeatureStore; import org.apache.solr.ltr.store.rest.ManagedModelStore; import org.apache.solr.util.RestTestBase; -import org.eclipse.jetty.servlet.ServletHolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -131,7 +128,7 @@ public class TestRerankBase extends RestTestBase { } } - protected static SortedMap<ServletHolder,String> setupTestInit( + protected static void setupTestInit( String solrconfig, String schema, boolean isPersistent) throws Exception { tmpSolrHome = createTempDir().toFile(); @@ -174,29 +171,25 @@ public class TestRerankBase extends RestTestBase { } System.setProperty("managed.schema.mutable", "true"); - final SortedMap<ServletHolder,String> extraServlets = new TreeMap<>(); - return extraServlets; } public static void setuptest(String solrconfig, String schema) throws Exception { - SortedMap<ServletHolder,String> extraServlets = - setupTestInit(solrconfig,schema,false); + setupTestInit(solrconfig,schema,false); System.setProperty("enable.update.log", "false"); createJettyAndHarness(tmpSolrHome.getAbsolutePath(), solrconfig, schema, - "/solr", true, extraServlets); + "/solr", true, null); } public static void setupPersistentTest(String solrconfig, String schema) throws Exception { - SortedMap<ServletHolder,String> extraServlets = - setupTestInit(solrconfig,schema,true); + setupTestInit(solrconfig,schema,true); createJettyAndHarness(tmpSolrHome.getAbsolutePath(), solrconfig, schema, - "/solr", true, extraServlets); + "/solr", true, null); } protected static void aftertest() throws Exception { diff --git a/solr/modules/s3-repository/build.gradle b/solr/modules/s3-repository/build.gradle index d7c50e2..6df2ec3 100644 --- a/solr/modules/s3-repository/build.gradle +++ b/solr/modules/s3-repository/build.gradle @@ -15,7 +15,6 @@ * limitations under the License. */ - apply plugin: 'java-library' description = 'S3 Repository' @@ -27,11 +26,15 @@ configurations.all { dependencies { api project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' implementation platform(group: 'software.amazon.awssdk', name: 'bom') implementation (group: 'software.amazon.awssdk', name: 'auth') implementation (group: 'software.amazon.awssdk', name: 'apache-client') implementation (group: 'software.amazon.awssdk', name: 'aws-core') + implementation (group: 'software.amazon.awssdk', name: 'regions') implementation (group: 'software.amazon.awssdk', name: 's3') { exclude group: 'software.amazon.awssdk', module: 'netty-nio-client' } @@ -40,11 +43,24 @@ dependencies { implementation ('com.google.guava:guava') { transitive = false } implementation 'commons-io:commons-io' + implementation 'org.slf4j:slf4j-api' runtimeOnly (group: 'com.fasterxml.woodstox', name: 'woodstox-core') runtimeOnly (group: 'org.codehaus.woodstox', name: 'stax2-api') - testImplementation('com.adobe.testing:s3mock-junit4') { + testImplementation ('com.adobe.testing:s3mock-junit4') { + // Don't pull in separate versions of these libs, just use what Solr already has + exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' + exclude group: 'ch.qos.logback', module: 'logback-classic' + exclude group: 'org.eclipse.jetty', module: '*' + exclude group: 'io.netty', module: '*' + exclude group: 'commons-io', module: 'commons-io' + exclude group: 'commons-codec', module: 'commons-codec' + exclude group: 'org.apache.commons', module: 'commons-lang3' + exclude group: 'software.amazon.awssdk', module: 'netty-nio-client' + exclude group: 'org.codehaus.woodstox', module: 'stax2-api' + } + testImplementation ('com.adobe.testing:s3mock-testsupport-common') { // Don't pull in separate versions of these libs, just use what Solr already has exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' exclude group: 'ch.qos.logback', module: 'logback-classic' @@ -58,6 +74,9 @@ dependencies { } testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' testImplementation 'org.apache.commons:commons-lang3' } diff --git a/solr/modules/scripting/build.gradle b/solr/modules/scripting/build.gradle index 6f68a9a..3c43ff4 100644 --- a/solr/modules/scripting/build.gradle +++ b/solr/modules/scripting/build.gradle @@ -21,7 +21,15 @@ description = 'Scripting Package' dependencies { implementation project(':solr:core') + implementation project(':solr:solrj') + + implementation 'org.apache.lucene:lucene-core' + + implementation 'org.slf4j:slf4j-api' implementation 'commons-io:commons-io' implementation ('com.google.guava:guava') { transitive = false } + testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'junit:junit' } diff --git a/solr/prometheus-exporter/build.gradle b/solr/prometheus-exporter/build.gradle index 5493113..ecd1437 100644 --- a/solr/prometheus-exporter/build.gradle +++ b/solr/prometheus-exporter/build.gradle @@ -42,7 +42,13 @@ dependencies { runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' runtimeOnly 'com.lmax:disruptor' + testImplementation project(':solr:core') testImplementation project(':solr:test-framework') + testImplementation 'org.apache.lucene:lucene-test-framework' + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' + testImplementation 'org.apache.httpcomponents:httpclient' + testImplementation 'org.apache.httpcomponents:httpcore' } ext { @@ -69,4 +75,4 @@ assemblePackaging { include "bin/**" include "conf/**" }) -} \ No newline at end of file +} diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle index 9f39894..74944db 100644 --- a/solr/solr-ref-guide/build.gradle +++ b/solr/solr-ref-guide/build.gradle @@ -50,14 +50,10 @@ configurations { dependencies { // Dependencies to compile internal tools. + implementation('org.asciidoctor:asciidoctorj-api') implementation('org.asciidoctor:asciidoctorj') implementation('com.vaadin.external.google:android-json') implementation('org.jsoup:jsoup') - implementation('org.slf4j:jcl-over-slf4j') - implementation('org.slf4j:slf4j-simple') - implementation('org.apache.logging.log4j:log4j-core') - implementation('com.google.guava:guava') { transitive = false } - implementation('commons-codec:commons-codec') // Dependencies referenced in the guide. depVer('commons-codec:commons-codec') diff --git a/solr/solrj/build.gradle b/solr/solrj/build.gradle index 4384d5d..be71b7e 100644 --- a/solr/solrj/build.gradle +++ b/solr/solrj/build.gradle @@ -28,22 +28,45 @@ dependencies { api 'org.eclipse.jetty.http2:http2-client' implementation 'org.eclipse.jetty.http2:http2-http-client-transport' + implementation 'org.eclipse.jetty:jetty-http' implementation 'org.eclipse.jetty:jetty-client' + implementation 'org.eclipse.jetty:jetty-util' runtimeOnly 'org.eclipse.jetty:jetty-alpn-java-client' api('org.apache.httpcomponents:httpmime', { exclude group: "commons-codec", module: "commons-codec" exclude group: "commons-logging", module: "commons-logging" }) + implementation 'org.apache.httpcomponents:httpclient' + implementation 'org.apache.httpcomponents:httpcore' implementation('org.apache.zookeeper:zookeeper', { exclude group: "org.apache.yetus", module: "audience-annotations" exclude group: "log4j", module: "log4j" exclude group: "org.slf4j", module: "slf4j-log4j12" }) + implementation ('org.apache.zookeeper:zookeeper-jute') { + exclude group: 'org.apache.yetus', module: 'audience-annotations' + } testImplementation project(':solr:test-framework') + testImplementation project(':solr:core') + testImplementation project(':solr:solrj') + + testImplementation 'org.apache.lucene:lucene-analysis-common' + testImplementation 'org.apache.lucene:lucene-core' + testImplementation 'org.apache.lucene:lucene-test-framework' + + testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + testImplementation 'junit:junit' + testImplementation 'org.hamcrest:hamcrest' + testImplementation 'commons-io:commons-io' + + testImplementation 'javax.servlet:javax.servlet-api' + + testImplementation 'org.eclipse.jetty:jetty-server' + testImplementation 'org.eclipse.jetty:jetty-servlet' testImplementation 'org.eclipse.jetty:jetty-webapp' testRuntimeOnly ('org.eclipse.jetty:jetty-alpn-java-server', { exclude group: "org.eclipse.jetty.alpn", module: "alpn-api" @@ -57,4 +80,5 @@ dependencies { testRuntimeOnly "org.hsqldb:hsqldb" // runtime because via JDBC reflection testImplementation 'org.apache.commons:commons-lang3' testImplementation ('com.google.guava:guava') { transitive = false } + testImplementation 'io.dropwizard.metrics:metrics-core' } diff --git a/solr/test-framework/build.gradle b/solr/test-framework/build.gradle index 066790f..e543c1c 100644 --- a/solr/test-framework/build.gradle +++ b/solr/test-framework/build.gradle @@ -23,21 +23,41 @@ dependencies { api project(':solr:core') api project(':solr:solrj') - api "org.apache.lucene:lucene-test-framework" - api "org.apache.lucene:lucene-analysis-common" + api 'org.apache.lucene:lucene-test-framework' + api 'org.apache.lucene:lucene-analysis-common' + implementation 'org.apache.lucene:lucene-core' + implementation 'org.apache.lucene:lucene-queries' implementation('org.apache.zookeeper:zookeeper', { exclude group: "org.apache.yetus", module: "audience-annotations" exclude group: "log4j", module: "log4j" exclude group: "org.slf4j", module: "slf4j-log4j12" }) + implementation ('org.apache.zookeeper:zookeeper-jute') { + exclude group: 'org.apache.yetus', module: 'audience-annotations' + } implementation 'commons-io:commons-io' + implementation 'org.slf4j:slf4j-api' + implementation 'org.apache.logging.log4j:log4j-api' implementation 'org.apache.logging.log4j:log4j-core' implementation 'io.opentracing:opentracing-noop' implementation 'io.opentracing:opentracing-util' implementation ('com.google.guava:guava') { transitive = false } + implementation 'io.dropwizard.metrics:metrics-core' implementation 'io.dropwizard.metrics:metrics-jetty9' implementation 'commons-cli:commons-cli' + implementation 'org.bitbucket.b_c:jose4j' + implementation 'org.apache.httpcomponents:httpclient' + implementation 'org.apache.httpcomponents:httpcore' + + implementation 'javax.servlet:javax.servlet-api' + implementation 'org.eclipse.jetty:jetty-server' + implementation 'org.eclipse.jetty:jetty-servlet' + implementation 'org.eclipse.jetty:jetty-util' + + implementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' + implementation 'junit:junit' + implementation 'org.hamcrest:hamcrest' } diff --git a/versions.lock b/versions.lock index b34eb07..b673d06 100644 --- a/versions.lock +++ b/versions.lock @@ -1,14 +1,14 @@ # Run ./gradlew --write-locks to regenerate this file com.adobe.xmp:xmpcore:5.1.3 (1 constraints: 0b050a36) com.carrotsearch:hppc:0.8.2 (2 constraints: ad0fc5a6) -com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.6 (1 constraints: c710a6b9) +com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.6 (2 constraints: d715c5e2) com.cybozu.labs:langdetect:1.1-20120112 (1 constraints: 5c066d5e) com.drewnoakes:metadata-extractor:2.11.0 (1 constraints: 3605323b) com.epam:parso:2.0.11 (1 constraints: 36052c3b) com.esri.geometry:esri-geometry-api:2.2.0 (2 constraints: 6112842b) com.fasterxml.jackson:jackson-bom:2.12.3 (11 constraints: fdf28813) -com.fasterxml.jackson.core:jackson-annotations:2.12.3 (8 constraints: 099c8008) -com.fasterxml.jackson.core:jackson-core:2.12.3 (13 constraints: e304bc9b) +com.fasterxml.jackson.core:jackson-annotations:2.12.3 (9 constraints: 42a15458) +com.fasterxml.jackson.core:jackson-core:2.12.3 (14 constraints: 1c0a99f0) com.fasterxml.jackson.core:jackson-databind:2.12.3 (17 constraints: 5e455fcf) com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.12.3 (2 constraints: f1137d82) com.fasterxml.woodstox:woodstox-core:6.2.4 (2 constraints: 4d1cac9f) @@ -30,7 +30,7 @@ com.google.cloud:google-cloud-core-http:1.94.3 (2 constraints: 651543d8) com.google.cloud:google-cloud-storage:1.113.14 (2 constraints: 10143aa3) com.google.code.findbugs:annotations:3.0.1 (1 constraints: 0605fb35) com.google.code.findbugs:jsr305:3.0.1 (1 constraints: b70f3485) -com.google.code.gson:gson:2.8.6 (4 constraints: 94389e56) +com.google.code.gson:gson:2.8.6 (5 constraints: 1545748b) com.google.errorprone:error_prone_annotations:2.10.0 (6 constraints: 4c4d2718) com.google.guava:failureaccess:1.0.1 (1 constraints: e60fd595) com.google.guava:guava:25.1-jre (2 constraints: 0515c2b9) @@ -68,7 +68,7 @@ io.dropwizard.metrics:metrics-jetty9:4.1.5 (1 constraints: 0c050736) io.dropwizard.metrics:metrics-jmx:4.1.5 (1 constraints: 0c050736) io.dropwizard.metrics:metrics-jvm:4.1.5 (1 constraints: 0c050736) io.grpc:grpc-context:1.36.0 (3 constraints: 5a22231e) -io.jaegertracing:jaeger-core:1.6.0 (1 constraints: 610d7b26) +io.jaegertracing:jaeger-core:1.6.0 (2 constraints: 6912c420) io.jaegertracing:jaeger-thrift:1.6.0 (1 constraints: 09050236) io.netty:netty-buffer:4.1.68.Final (5 constraints: df4da774) io.netty:netty-codec:4.1.68.Final (1 constraints: a60ccb09) @@ -88,7 +88,7 @@ io.prometheus:simpleclient_common:0.2.0 (2 constraints: e8159ecb) io.prometheus:simpleclient_httpserver:0.2.0 (1 constraints: 0405f135) io.sgr:s2-geometry-library-java:1.0.0 (2 constraints: b215dedf) javax.servlet:javax.servlet-api:3.1.0 (3 constraints: 75209943) -junit:junit:4.13.1 (6 constraints: 154f6f23) +junit:junit:4.13.1 (7 constraints: 786812d9) net.arnx:jsonic:1.2.7 (2 constraints: db10d4d1) net.jcip:jcip-annotations:1.0 (1 constraints: 560ff165) net.sf.jopt-simple:jopt-simple:4.6 (1 constraints: 610a91b7) @@ -171,7 +171,7 @@ org.apache.tika:tika-parsers:1.27 (1 constraints: de04fa30) org.apache.tika:tika-xmp:1.27 (1 constraints: de04fa30) org.apache.xmlbeans:xmlbeans:3.1.0 (1 constraints: 0605fd35) org.apache.zookeeper:zookeeper:3.7.0 (2 constraints: 9e13f25e) -org.apache.zookeeper:zookeeper-jute:3.7.0 (1 constraints: 8a0d3a28) +org.apache.zookeeper:zookeeper-jute:3.7.0 (2 constraints: 95120523) org.apiguardian:apiguardian-api:1.1.0 (3 constraints: 5f208479) org.aspectj:aspectjrt:1.8.0 (1 constraints: 0b050836) org.bitbucket.b_c:jose4j:0.7.7 (1 constraints: 10050736) @@ -215,18 +215,18 @@ org.eclipse.jetty.http2:http2-http-client-transport:9.4.44.v20210927 (1 constrai org.eclipse.jetty.http2:http2-server:9.4.44.v20210927 (1 constraints: 82072e7d) org.gagravarr:vorbis-java-core:0.8 (1 constraints: ac041f2c) org.gagravarr:vorbis-java-tika:0.8 (1 constraints: ac041f2c) -org.hamcrest:hamcrest:2.2 (2 constraints: cf1b088a) +org.hamcrest:hamcrest:2.2 (3 constraints: 7620ce25) org.hamcrest:hamcrest-core:2.2 (1 constraints: cc05fe3f) org.jctools:jctools-core:3.3.0 (1 constraints: 08050336) org.jdom:jdom2:2.0.6 (1 constraints: 0a05fb35) -org.locationtech.spatial4j:spatial4j:0.8 (1 constraints: 59105498) +org.locationtech.spatial4j:spatial4j:0.8 (2 constraints: 03150d9b) org.openjdk.jmh:jmh-core:1.32 (1 constraints: da04f730) org.ow2.asm:asm:7.2 (3 constraints: a325a35c) org.ow2.asm:asm-commons:7.2 (1 constraints: 6b0f7267) org.quicktheories:quicktheories:0.26 (1 constraints: dc04f530) org.reactivestreams:reactive-streams:1.0.3 (3 constraints: 3c2b02fd) org.slf4j:jcl-over-slf4j:1.7.24 (1 constraints: 4005473b) -org.slf4j:slf4j-api:1.7.24 (22 constraints: 9c20c409) +org.slf4j:slf4j-api:1.7.24 (24 constraints: 6d4546ac) org.tallison:jmatio:1.5 (1 constraints: aa041f2c) org.threeten:threetenbp:1.5.0 (4 constraints: f82b9e86) org.tukaani:xz:1.8 (1 constraints: ad04222c) @@ -244,7 +244,7 @@ software.amazon.awssdk:json-utils:2.17.63 (3 constraints: 4227d652) software.amazon.awssdk:metrics-spi:2.17.63 (6 constraints: c555c7a0) software.amazon.awssdk:profiles:2.17.63 (6 constraints: 7b4fb0aa) software.amazon.awssdk:protocol-core:2.17.63 (5 constraints: 8641079a) -software.amazon.awssdk:regions:2.17.63 (4 constraints: 30334006) +software.amazon.awssdk:regions:2.17.63 (5 constraints: a4388089) software.amazon.awssdk:s3:2.17.63 (3 constraints: bb244128) software.amazon.awssdk:sdk-core:2.17.63 (9 constraints: 107bb50f) software.amazon.awssdk:third-party-jackson-core:2.17.63 (2 constraints: 931b14a8) @@ -339,7 +339,6 @@ org.latencyutils:LatencyUtils:2.0.3 (1 constraints: 210dcd1b) org.mockito:mockito-core:3.8.0 (1 constraints: 0d051236) org.objenesis:objenesis:3.1 (2 constraints: 5b0ff979) org.slf4j:jul-to-slf4j:1.7.24 (1 constraints: 801632ff) -org.slf4j:slf4j-simple:1.7.24 (1 constraints: 4005473b) org.springframework:spring-aop:5.2.15.RELEASE (2 constraints: 32232d90) org.springframework:spring-beans:5.2.15.RELEASE (4 constraints: 5843b908) org.springframework:spring-context:5.2.15.RELEASE (2 constraints: c3236acf)
