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/05/10 17:26:02 UTC
[lucene-solr] branch jira/SOLR-13452_gradle created (now 5e5899e)
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a change to branch jira/SOLR-13452_gradle
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.
at 5e5899e SOLR-13452: Update the lucene-solr build from Ivy+Ant+Maven (shadow build) to Gradle.
This branch includes the following new commits:
new 5e5899e SOLR-13452: Update the lucene-solr build from Ivy+Ant+Maven (shadow build) to Gradle.
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.
[lucene-solr] 01/01: SOLR-13452: Update the lucene-solr build from
Ivy+Ant+Maven (shadow build) to Gradle.
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch jira/SOLR-13452_gradle
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 5e5899e3ed515cb186498fdecd5a47c75b4027aa
Author: markrmiller <ma...@apache.org>
AuthorDate: Wed May 8 15:35:46 2019 -0500
SOLR-13452: Update the lucene-solr build from Ivy+Ant+Maven (shadow build) to Gradle.
This a first rough commit, taking many things from Dat's gradle branch.
---
.gitignore | 14 +-
build.gradle | 254 +++++++++++++++++
buildSrc/build.gradle | 19 ++
.../org/apache/lucene/gradle/BuildPlugin.groovy | 41 +++
.../apache/lucene/gradle/CheckWorkingCopy.groovy | 81 ++++++
.../org/apache/lucene/gradle/LicenseCheckTask.java | 300 +++++++++++++++++++++
.../java/org/apache/lucene/gradle/LicenseType.java | 75 ++++++
buildSrc/src/main/resources/forbidden/base.txt | 60 +++++
buildSrc/src/main/resources/forbidden/lucene.txt | 53 ++++
.../src/main/resources/forbidden/servlet-api.txt | 43 +++
buildSrc/src/main/resources/forbidden/solr.txt | 57 ++++
buildSrc/src/main/resources/forbidden/solrj.txt | 40 +++
buildSrc/src/main/resources/forbidden/tests.txt | 29 ++
gradle.properties | 11 +
gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 56177 bytes
gradle/wrapper/gradle-wrapper.properties | 5 +
gradlew | 172 ++++++++++++
gradlew.bat | 84 ++++++
lucene/analysis/common/build.gradle | 23 ++
lucene/analysis/icu/build.gradle | 13 +
lucene/analysis/kuromoji/build.gradle | 26 ++
lucene/analysis/morfologik/build.gradle | 16 ++
lucene/analysis/nori/build.gradle | 10 +
.../org/apache/lucene/analysis/ko/userdict.txt | 0
lucene/analysis/opennlp/build.gradle | 9 +
lucene/analysis/phonetic/build.gradle | 13 +
lucene/analysis/smartcn/build.gradle | 12 +
lucene/analysis/stempel/build.gradle | 11 +
lucene/backward-codecs/build.gradle | 21 ++
lucene/benchmark/build.gradle | 29 ++
lucene/build.gradle | 8 +
lucene/classification/build.gradle | 12 +
lucene/codecs/build.gradle | 10 +
lucene/core/build.gradle | 73 +++++
.../org/apache/lucene/util/TestVirtualMethod.java | 158 +++++------
lucene/demo/build.gradle | 17 ++
lucene/expressions/build.gradle | 12 +
lucene/facet/build.gradle | 12 +
lucene/grouping/build.gradle | 9 +
lucene/highlighter/build.gradle | 11 +
lucene/join/build.gradle | 8 +
lucene/memory/build.gradle | 8 +
lucene/misc/build.gradle | 9 +
lucene/queries/build.gradle | 13 +
lucene/queryparser/build.gradle | 25 ++
lucene/replicator/build.gradle | 22 ++
lucene/sandbox/build.gradle | 8 +
lucene/spatial-extras/build.gradle | 17 ++
lucene/spatial/build.gradle | 8 +
lucene/spatial3d/build.gradle | 21 ++
lucene/suggest/build.gradle | 8 +
lucene/test-framework/build.gradle | 14 +
settings.gradle | 73 +++++
solr/build.gradle | 8 +
solr/contrib/analysis-extras/build.gradle | 25 ++
solr/contrib/analytics/build.gradle | 80 ++++++
solr/contrib/clustering/build.gradle | 20 ++
solr/contrib/dataimporthandler-extras/build.gradle | 17 ++
solr/contrib/dataimporthandler/build.gradle | 40 +++
solr/contrib/extraction/build.gradle | 56 ++++
solr/contrib/extraction/build.gradle.bak | 69 +++++
solr/contrib/langid/build.gradle | 19 ++
solr/contrib/ltr/build.gradle | 20 ++
solr/contrib/prometheus-exporter/build.gradle | 32 +++
solr/contrib/velocity/build.gradle | 19 ++
solr/core/build.gradle | 154 +++++++++++
.../org/apache/solr/cloud/ElectionContext.java | 8 +-
.../solr/cloud/MoveReplicaHDFSFailoverTest.java | 4 +
.../org/apache/solr/cloud/MoveReplicaHDFSTest.java | 4 +
.../apache/solr/cloud/SaslZkACLProviderTest.java | 4 +
.../cloud/SharedFSAutoReplicaFailoverTest.java | 5 +
.../solr/cloud/TestSolrCloudWithKerberosAlt.java | 4 +
.../HdfsCollectionsAPIDistributedZkTest.java | 4 +
.../collections/TestHdfsCloudBackupRestore.java | 4 +
.../HdfsAutoAddReplicasIntegrationTest.java | 4 +
.../solr/cloud/hdfs/HDFSCollectionsAPITest.java | 4 +
.../cloud/hdfs/HdfsBasicDistributedZk2Test.java | 4 +
.../cloud/hdfs/HdfsBasicDistributedZkTest.java | 4 +
.../hdfs/HdfsChaosMonkeyNothingIsSafeTest.java | 4 +
.../cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java | 4 +
.../apache/solr/cloud/hdfs/HdfsNNFailoverTest.java | 4 +
.../solr/cloud/hdfs/HdfsRecoverLeaseTest.java | 4 +
.../apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java | 4 +
.../cloud/hdfs/HdfsRestartWhileUpdatingTest.java | 4 +
.../apache/solr/cloud/hdfs/HdfsSyncSliceTest.java | 4 +
.../apache/solr/cloud/hdfs/HdfsThreadLeakTest.java | 4 +
.../HdfsTlogReplayBufferedWhileIndexingTest.java | 4 +
.../cloud/hdfs/HdfsUnloadDistributedZkTest.java | 4 +
.../hdfs/HdfsWriteToMultipleCollectionsTest.java | 4 +
.../org/apache/solr/cloud/hdfs/StressHdfsTest.java | 4 +
.../apache/solr/core/HdfsDirectoryFactoryTest.java | 4 +
.../solr/handler/TestHdfsBackupRestoreCore.java | 4 +
.../handler/admin/MetricsHistoryHandlerTest.java | 2 +-
.../apache/solr/index/hdfs/CheckHdfsIndexTest.java | 4 +
.../org/apache/solr/search/TestRecoveryHdfs.java | 4 +
.../apache/solr/store/hdfs/HdfsDirectoryTest.java | 4 +
.../solr/store/hdfs/HdfsLockFactoryTest.java | 4 +
.../org/apache/solr/update/TestHdfsUpdateLog.java | 4 +
solr/example/example-DIH/build.gradle | 6 +
solr/server/build.gradle | 40 +++
solr/server/etc/jetty.xml | 7 -
solr/solrj/build.gradle | 52 ++++
solr/test-framework/build.gradle | 61 +++++
.../org/apache/solr/SolrIgnoredThreadsFilter.java | 5 +
.../src/java/org/apache/solr/SolrTestCase.java | 4 +-
versions.lock | 168 ++++++++++++
versions.props | 115 ++++++++
107 files changed, 3128 insertions(+), 97 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4b94743..d9e0689 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
# .
/eclipse-build
+build-eclipse
/maven-build
/classes
build
@@ -15,14 +16,17 @@ lucene/**/*.iml
parent.iml
*.ipr
*.iws
-/.project
-/.classpath
-/.settings
-/.caches
+.project
+.classpath
+.settings
+.caches
+.out
/prj.el
-/bin
+bin
/bin.*
pom.xml
/nbproject
/nb-build
.pydevproject
+.gradle
+derby.log
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..414c0ba
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,254 @@
+import org.apache.lucene.gradle.CheckWorkingCopy
+import org.apache.lucene.gradle.BuildPlugin
+
+// TODO: look into circuler dependency issues - for IDE's we turn off protection,
+// but I've seen it creep up with gw clean build on solr/core recently
+
+plugins {
+ id "com.palantir.consistent-versions" version "1.4.0"
+ id 'eclipse'
+}
+
+
+allprojects {
+
+ repositories {
+ mavenCentral()
+ maven {
+ url "https://oss.sonatype.org/content/repositories/releases"
+ }
+ maven {
+ url "http://maven.restlet.org"
+ }
+ maven {
+ url "http://repository.cloudera.com/content/repositories/releases"
+ }
+ // chinese mirror
+ maven {
+ url "http://uk.maven.org/maven2"
+ }
+ jcenter()
+ }
+
+ buildDir = new File("build")
+
+ apply plugin: 'idea'
+ apply plugin: 'eclipse'
+
+}
+
+task('regenerate') {
+ doLast {
+ println "regenerate"
+ }
+}
+
+configure(subprojects - project(":buildSrc")) { pj ->
+
+ plugins.withType(JavaPlugin) {
+
+ test {
+
+ systemProperty 'java.security.egd', 'file:/dev/./urandom'
+
+ filter {
+ includeTestsMatching "*.Test*"
+ includeTestsMatching "*.*Test"
+ }
+
+ maxHeapSize = "512m"
+ // Enable assertions
+ jvmArgs += "-ea"
+ // Enable assertions in system classes
+ jvmArgs += "-esa"
+
+ systemProperty 'tests.multiplier', '1'
+ systemProperty 'tests.codec', 'random'
+ systemProperty 'tests.postingsformat', 'random'
+ systemProperty 'tests.docvaluesformat', 'random'
+ systemProperty 'tests.locale', 'random'
+ systemProperty 'tests.timezone', 'random'
+ systemProperty 'tests.directory', 'random'
+ systemProperty 'tests.linedocsfile', 'europarl.lines.txt.gz'
+ systemProperty 'tests.loggingfile', './lucene/tools/junit4/logging.properties'
+ systemProperty 'tests.nightly', 'false'
+ systemProperty 'tests.weekly', 'false'
+ systemProperty 'tests.monster', 'false'
+ systemProperty 'tests.slow', 'false'
+ systemProperty 'tests.cleanthreads.sysprop', 'perMethod'
+ systemProperty 'tests.verbose', 'false'
+ systemProperty 'tests.filterstacks', 'true'
+ systemProperty 'tests.asserts', 'true'
+ systemProperty 'tempDir', '.out/tests-temp'
+ systemProperty 'java.io.tmpdir', '.out/tests-temp'
+ }
+
+ // forbidden apis ...need to exclude hadoop and ...
+ // pj.plugins.apply(BuildPlugin)
+
+ sourceCompatibility = "11"
+ targetCompatibility = "11"
+
+ sourceSets {
+ main.java.srcDirs = ['src/java']
+ main.resources.srcDirs = ['src/resources']
+ test.java.srcDirs = ['src/test']
+ test.resources.srcDirs = ['src/test-files']
+ }
+
+ dependencies {
+ // move to solr testframework
+ testRuntimeOnly 'org.apache.logging.log4j:log4j-api'
+ testRuntimeOnly 'org.apache.logging.log4j:log4j-core'
+ testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
+ testRuntimeOnly 'com.lmax:disruptor'
+ }
+
+
+ // we create new *Tran configurations that are transitive
+ // and can be used between modules
+ configurations {
+
+ implementationTran
+ testImplementationTran
+
+ implementationTran2
+ testImplementationTran2
+
+ implementationTran.transitive = true
+ testImplementationTran.transitive = true
+
+ implementationTran2.transitive = false
+ testImplementationTran2.transitive = false
+
+ testImplementationTran2.extendsFrom testImplementationTran
+ implementationTran2.extendsFrom implementationTran
+
+ testImplementation.extendsFrom testImplementationTran2
+ implementation.extendsFrom implementationTran2
+ }
+
+ // make everything else not transitive
+ configure(configurations.all.findAll { c -> c.getName() != "implementationTran" && c.getName() != "testImplementationTran" }) {
+ transitive = false
+ }
+
+ project.sourceSets.test.setCompileClasspath( project.sourceSets.test.getCompileClasspath().plus(project.configurations.testImplementationTran).plus(project.configurations.implementationTran));
+ project.sourceSets.test.setRuntimeClasspath( project.sourceSets.test.getRuntimeClasspath().plus(project.configurations.testImplementationTran).plus(project.configurations.implementationTran));
+
+ project.sourceSets.main.setCompileClasspath( project.sourceSets.main.getCompileClasspath().plus(project.configurations.implementationTran));
+ project.sourceSets.main.setRuntimeClasspath( project.sourceSets.main.getRuntimeClasspath().plus(project.configurations.implementationTran));
+
+
+ configurations.all {
+ // TODO: does not belong here
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ }
+
+ // Custom javac options
+ tasks.withType(JavaCompile) {
+ // Don't output ALL errors in a file, stop after a few
+ options.compilerArgs << "-Xmaxerrs" << "5"
+ }
+
+ // Some test resources and files are stored along the test sources
+ // and are expected to exist next to classes during tests
+ task copyTestResources(type: Copy) {
+ from('src/test') {
+ exclude '**/*.java'
+ }
+ into sourceSets.test.java.outputDir
+ }
+ processTestResources.dependsOn copyTestResources
+
+ }
+
+ apply plugin: 'eclipse'
+ plugins.withType(JavaPlugin) {
+ eclipse {
+
+ classpath {
+ defaultOutputDir = file('build-eclipse')
+
+ plusConfigurations += [ configurations.implementationTran, configurations.testImplementationTran ]
+
+ file.whenMerged {
+ classpath ->
+ if (project.name == 'buildSrc') {
+ project.tasks.pluginUnderTestMetadata
+ }
+
+ classpath.entries.each { entry ->
+
+ if ( entry.kind == 'src' && entry.hasProperty('output') ) {
+ // use default Output for all source-folders
+ entry.output = null
+ }
+ }
+
+ classpath.entries.each { entry ->
+ if ( entry.kind == 'lib') {
+ entry.exported = true
+ }
+ }
+
+ // add JRE_CONTAINER
+ classpath.entries.removeAll { entry -> entry.kind == 'con' }
+ classpath.entries.add(new org.gradle.plugins.ide.eclipse.model.Container('org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11'))
+
+ // Jetty mod files make eclipse sad
+ new File("${projectDir}/.settings/org.eclipse.wst.validation.prefs").text = """
+eclipse.preferences.version=1
+override=true
+suspend=true
+vf.version=3
+"""
+ }
+
+ }
+ }
+ }
+
+ tasks.withType(Test) {
+ filter {
+ // so we can run with --tests wildcards
+ setFailOnNoMatchingTests(false)
+ }
+
+ def testsJvms = project.ext.properties.tests_jvms
+ if (testsJvms) {
+ maxParallelForks = testsJvms
+ } else {
+ maxParallelForks = Runtime.runtime.availableProcessors() / 2
+ }
+
+ def testsFailFast = project.ext.properties.tests_failfast
+ if (testsFailFast) {
+ failFast = true
+ }
+ }
+
+ // TODO: Where to do this ... and config
+ // apply plugin: 'maven-publish'
+}
+
+tasks.create('checkWorkingCopy', CheckWorkingCopy, true)
+
+
+// turn off idea cycle checking - how to do for eclipse?
+idea.project.ipr {
+ // Edit the output *.ipr file before it's written out
+ withXml { root ->
+ root.asNode().depthFirst().iterator().forEachRemaining { n ->
+ if (n.name().equals("annotationProcessing")) {
+ n.attributes().remove("enabled")
+ n.attributes().remove("useClasspath")
+ }
+ if (n.name().equals("profile") && n.parent().name().equals("annotationProcessing")) {
+ n.attributes().put("enabled", "false")
+ }
+ }
+ }
+
+}
+
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
new file mode 100644
index 0000000..ed1ab0d
--- /dev/null
+++ b/buildSrc/build.gradle
@@ -0,0 +1,19 @@
+
+apply plugin: 'groovy'
+apply plugin: 'java-gradle-plugin'
+apply plugin: 'java-library'
+
+group = 'org.apache.lucene.gradle'
+
+repositories {
+ jcenter()
+}
+
+dependencies {
+ implementation gradleApi()
+ implementation localGroovy()
+
+ implementation 'org.eclipse.jgit:org.eclipse.jgit:4.6.0.201612231935-r'
+ implementation 'de.thetaphi:forbiddenapis:2.6'
+ implementation 'org.apache.rat:apache-rat:0.11'
+}
diff --git a/buildSrc/src/main/groovy/org/apache/lucene/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/apache/lucene/gradle/BuildPlugin.groovy
new file mode 100644
index 0000000..bb3088c
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/lucene/gradle/BuildPlugin.groovy
@@ -0,0 +1,41 @@
+package org.apache.lucene.gradle
+
+import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
+import de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+class BuildPlugin implements Plugin<Project> {
+
+ @Override
+ void apply(Project project) {
+ project.pluginManager.apply(ForbiddenApisPlugin.class)
+ project.forbiddenApis {
+
+ failOnUnsupportedJava = false
+ bundledSignatures = ['jdk-unsafe', 'jdk-deprecated', 'jdk-non-portable', 'jdk-reflection']
+ signaturesURLs = [getClass().getResource('/forbidden/base.txt')]
+ suppressAnnotations = ['**.SuppressForbidden']
+ }
+
+ project.tasks.withType(CheckForbiddenApis) {
+ if (name.endsWith('Test') || name.startsWith('Test')) {
+ signaturesURLs = project.forbiddenApis.signaturesURLs +
+ [getClass().getResource('/forbidden/tests.txt')]
+ }
+ if (project.group.equals("org.apache.lucene")) {
+ signaturesURLs = project.forbiddenApis.signaturesURLs +
+ [getClass().getResource('/forbidden/lucene.txt')]
+ }
+ if (project.group.equals("org.apache.solr") ) {
+ if (project.name.equals("solrj")) {
+ signaturesURLs = project.forbiddenApis.signaturesURLs +
+ [getClass().getResource('/forbidden/solrj.txt')]
+ } else {
+ signaturesURLs = project.forbiddenApis.signaturesURLs +
+ [getClass().getResource('/forbidden/solr.txt'), getClass().getResource('/forbidden/servlet-api.txt')]
+ }
+ }
+ }
+ }
+}
diff --git a/buildSrc/src/main/groovy/org/apache/lucene/gradle/CheckWorkingCopy.groovy b/buildSrc/src/main/groovy/org/apache/lucene/gradle/CheckWorkingCopy.groovy
new file mode 100644
index 0000000..8680f11
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/lucene/gradle/CheckWorkingCopy.groovy
@@ -0,0 +1,81 @@
+package org.apache.lucene.gradle
+/*
+ * 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.
+ */
+
+/** Task script that is called by Ant's build.xml file:
+ * Checks GIT working copy for unversioned or modified files.
+ */
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.Status;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
+import org.eclipse.jgit.errors.*;
+import org.gradle.api.DefaultTask
+import org.gradle.api.GradleException
+import org.gradle.api.tasks.TaskAction
+
+import javax.inject.Inject
+
+class CheckWorkingCopy extends DefaultTask {
+ boolean failonmodifications
+
+ @Inject
+ CheckWorkingCopy(boolean failonmodifications) {
+ this.failonmodifications = failonmodifications
+ }
+
+ @TaskAction
+ void check() {
+ try {
+ println 'Initializing working copy...' + failonmodifications
+ final Repository repository = new FileRepositoryBuilder()
+ .setWorkTree(project.getRootDir())
+ .setMustExist(true)
+ .build();
+
+ println 'Checking working copy status...'
+ final Status status = new Git(repository).status().call();
+ if (!status.isClean()) {
+ final SortedSet unversioned = new TreeSet(), modified = new TreeSet();
+ status.properties.each{ prop, val ->
+ if (val instanceof Set) {
+ if (prop in ['untracked', 'untrackedFolders', 'missing']) {
+ unversioned.addAll(val);
+ } else if (prop != 'ignoredNotInIndex') {
+ modified.addAll(val);
+ }
+ }
+ }
+ if (unversioned) {
+ throw new GradleException(
+ "Source checkout is dirty (unversioned/missing files) after running tests!!! Offending files:\n" +
+ '* ' + unversioned.join('\n* '))
+ }
+ if (failonmodifications) {
+ throw new GradleException(
+ "Source checkout is modified!!! Offending files:\n"+
+ '* ' + unversioned.join('\n* '))
+ }
+ }
+ } catch (RepositoryNotFoundException | NoWorkTreeException | NotSupportedException e) {
+ logger.error('WARNING: Development directory is not a valid GIT checkout! Disabling checks...')
+ }
+ }
+}
+
+
diff --git a/buildSrc/src/main/java/org/apache/lucene/gradle/LicenseCheckTask.java b/buildSrc/src/main/java/org/apache/lucene/gradle/LicenseCheckTask.java
new file mode 100644
index 0000000..271d1b8
--- /dev/null
+++ b/buildSrc/src/main/java/org/apache/lucene/gradle/LicenseCheckTask.java
@@ -0,0 +1,300 @@
+package org.apache.lucene.gradle;
+
+import org.gradle.api.DefaultTask;
+import org.gradle.api.GradleException;
+import org.gradle.api.artifacts.ResolvedArtifact;
+import org.gradle.api.logging.LogLevel;
+
+import javax.inject.Inject;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.security.DigestInputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+public class LicenseCheckTask extends DefaultTask {
+ private final static String CHECKSUM_TYPE = "sha1";
+ private static final int CHECKSUM_BUFFER_SIZE = 8 * 1024;
+ private static final int CHECKSUM_BYTE_MASK = 0xFF;
+ private static final String FAILURE_MESSAGE = "License check failed. Check the logs.\n"
+ + "If you recently modified ivy-versions.properties or any module's build.gradle,\n"
+ + "make sure you run \"ant clean-jars jar-checksums\" before running precommit.";
+ private static final Map<Pattern, String> REPLACE_PATTERNS = new HashMap<>();
+ static {
+ REPLACE_PATTERNS.put(Pattern.compile("jetty([^/]+)$"), "jetty");
+ REPLACE_PATTERNS.put(Pattern.compile("asm([^/]+)$"), "asm");
+ REPLACE_PATTERNS.put(Pattern.compile("slf4j-([^/]+)$"), "slf4j");
+ REPLACE_PATTERNS.put(Pattern.compile("javax\\.servlet([^/]+)$"), "javax.servlet");
+ REPLACE_PATTERNS.put(Pattern.compile("(bcmail|bcprov)-([^/]+)$"), "\1");
+ }
+
+ private Pattern skipRegexChecksum;
+ private boolean skipSnapshotsChecksum;
+ private boolean skipChecksum;
+
+
+ /**
+ * Directory containing licenses
+ */
+ private File licenseDirectory;
+
+ /**
+ * Failure flag.
+ */
+ private boolean failures;
+
+ @Inject
+ public LicenseCheckTask(File licenseDirectory) {
+ this.licenseDirectory = licenseDirectory;
+ doLast(task -> {
+ Set<ResolvedArtifact> deps = new HashSet<>();
+ getProject().getSubprojects().forEach(project -> {
+ project.getConfigurations().forEach(config -> {
+ if (config.isCanBeResolved()) {
+ deps.addAll(config.getResolvedConfiguration().getResolvedArtifacts());
+ }
+ });
+ });
+ deps.removeIf(artifact -> {
+ String groupName = artifact.getModuleVersion().getId().getGroup();
+ return "org.apache.lucene".equals(groupName) || "org.apache.solr".equals(groupName);
+ });
+
+ doCheck(deps);
+ });
+ }
+
+ public void setSkipSnapshotsChecksum(boolean skipSnapshotsChecksum) {
+ this.skipSnapshotsChecksum = skipSnapshotsChecksum;
+ }
+
+ public void setSkipChecksum(boolean skipChecksum) {
+ this.skipChecksum = skipChecksum;
+ }
+
+ public void setSkipRegexChecksum(String skipRegexChecksum) {
+ try {
+ if (skipRegexChecksum != null && skipRegexChecksum.length() > 0) {
+ this.skipRegexChecksum = Pattern.compile(skipRegexChecksum);
+ }
+ } catch (PatternSyntaxException e) {
+ throw new GradleException("Unable to compile skipRegexChecksum pattern. Reason: "
+ + e.getMessage() + " " + skipRegexChecksum, e);
+ }
+ }
+
+ /**
+ * Execute the task.
+ */
+ public void doCheck(Set<ResolvedArtifact> jars) {
+ if (skipChecksum) {
+ getLogger().info("Skipping checksum verification for dependencies");
+ } else {
+ if (skipSnapshotsChecksum) {
+ getLogger().info("Skipping checksum for SNAPSHOT dependencies");
+ }
+
+ if (skipRegexChecksum != null) {
+ getLogger().info("Skipping checksum for dependencies matching regex: " + skipRegexChecksum.pattern());
+ }
+ }
+
+ processJars(jars);
+
+ if (failures) {
+ throw new GradleException(FAILURE_MESSAGE);
+ }
+ }
+
+ /**
+ * Process all JARs.
+ */
+ private void processJars(Set<ResolvedArtifact> jars) {
+ long start = System.currentTimeMillis();
+ int errors = 0;
+ int checked = 0;
+ for (ResolvedArtifact artifact : jars) {
+ if (!checkJarFile(artifact)) {
+ errors++;
+ }
+ checked++;
+ }
+
+ getLogger().log(errors > 0 ? LogLevel.ERROR : LogLevel.INFO, String.format(Locale.ROOT,
+ "Scanned %d JAR file(s) for licenses (in %.2fs.), %d error(s).",
+ checked, (System.currentTimeMillis() - start) / 1000.0, errors));
+ }
+
+ /**
+ * Check a single JAR file.
+ */
+ private boolean checkJarFile(ResolvedArtifact artifact) {
+ File jarFile = artifact.getFile();
+ getLogger().debug("Scanning: {}", jarFile.getPath());
+
+ if (!skipChecksum) {
+ boolean skipDueToSnapshot = skipSnapshotsChecksum && jarFile.getName().contains("-SNAPSHOT");
+ if (!skipDueToSnapshot && !matchesRegexChecksum(jarFile, skipRegexChecksum)) {
+ // validate the jar matches against our expected hash
+ final File checksumFile = new File(licenseDirectory, jarFile.getName()
+ + "." + CHECKSUM_TYPE);
+ if (!(checksumFile.exists() && checksumFile.canRead())) {
+ getLogger().error("MISSING {} checksum file for: {}", CHECKSUM_TYPE, jarFile.getPath());
+ this.failures = true;
+ return false;
+ } else {
+ final String expectedChecksum = readChecksumFile(checksumFile);
+ try {
+ final MessageDigest md = MessageDigest.getInstance(CHECKSUM_TYPE);
+ byte[] buf = new byte[CHECKSUM_BUFFER_SIZE];
+ try {
+ FileInputStream fis = new FileInputStream(jarFile);
+ try {
+ DigestInputStream dis = new DigestInputStream(fis, md);
+ try {
+ while (dis.read(buf, 0, CHECKSUM_BUFFER_SIZE) != -1) {
+ // NOOP
+ }
+ } finally {
+ dis.close();
+ }
+ } finally {
+ fis.close();
+ }
+ } catch (IOException ioe) {
+ throw new GradleException("IO error computing checksum of file: "
+ + jarFile, ioe);
+ }
+ final byte[] checksumBytes = md.digest();
+ final String checksum = createChecksumString(checksumBytes);
+ if (!checksum.equals(expectedChecksum)) {
+ getLogger().error("CHECKSUM FAILED for " + jarFile.getPath() + " (expected: \""
+ + expectedChecksum + "\" was: \"" + checksum + "\")");
+ this.failures = true;
+ return false;
+ }
+
+ } catch (NoSuchAlgorithmException ae) {
+ throw new GradleException("Digest type " + CHECKSUM_TYPE
+ + " not supported by your JVM", ae);
+ }
+ }
+ } else if (skipDueToSnapshot) {
+ getLogger().info("Skipping jar because it is a SNAPSHOT : "
+ + jarFile.getAbsolutePath());
+ } else {
+ getLogger().info("Skipping jar because it matches regex pattern: {} pattern:{}",
+ jarFile.getAbsolutePath(), skipRegexChecksum.pattern());
+ }
+ }
+
+ // Get the expected license path base from the mapper and search for license files.
+ Map<File, LicenseType> foundLicenses = new LinkedHashMap<>();
+ List<File> expectedLocations = new ArrayList<>();
+ outer:
+ for (LicenseType licenseType : LicenseType.values()) {
+ String artifactName = artifact.getModuleVersion().getId().getName();
+ for (Map.Entry<Pattern, String> entry : REPLACE_PATTERNS.entrySet()) {
+ artifactName = entry.getKey().matcher(artifactName).replaceAll(entry.getValue());
+ }
+ File licensePath = new File(licenseDirectory,
+ artifactName + licenseType.licenseFileSuffix());
+ if (licensePath.exists()) {
+ foundLicenses.put(licensePath, licenseType);
+ getLogger().debug(" FOUND " + licenseType.name() + " license at " + licensePath.getPath());
+ // We could continue scanning here to detect duplicate associations?
+ break outer;
+ } else {
+ expectedLocations.add(licensePath);
+ }
+ }
+
+ // Check for NOTICE files.
+ for (Map.Entry<File, LicenseType> e : foundLicenses.entrySet()) {
+ LicenseType license = e.getValue();
+ String licensePath = e.getKey().getName();
+ String baseName = licensePath.substring(
+ 0, licensePath.length() - license.licenseFileSuffix().length());
+ File noticeFile = new File(licenseDirectory, baseName + license.noticeFileSuffix());
+
+ if (noticeFile.exists()) {
+ getLogger().debug(" FOUND NOTICE file at " + noticeFile.getAbsolutePath());
+ } else {
+ if (license.isNoticeRequired()) {
+ this.failures = true;
+ getLogger().error("MISSING NOTICE for the license file:\n "
+ + licensePath + "\n Expected location below:\n "
+ + noticeFile.getAbsolutePath());
+ }
+ }
+ }
+
+ // In case there is something missing, complain.
+ if (foundLicenses.isEmpty()) {
+ this.failures = true;
+ StringBuilder message = new StringBuilder();
+ message.append(
+ "MISSING LICENSE for the following file:\n " + jarFile.getAbsolutePath()
+ + "\n Expected locations below:\n");
+ for (File location : expectedLocations) {
+ message.append(" => ").append(location.getAbsolutePath()).append("\n");
+ }
+ getLogger().error(message.toString());
+ return false;
+ }
+
+ return true;
+ }
+
+ private static String createChecksumString(byte[] digest) {
+ StringBuilder checksum = new StringBuilder();
+ for (byte aDigest : digest) {
+ checksum.append(String.format(Locale.ROOT, "%02x",
+ CHECKSUM_BYTE_MASK & aDigest));
+ }
+ return checksum.toString();
+ }
+
+ private static String readChecksumFile(File f) {
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader
+ (new FileInputStream(f), StandardCharsets.UTF_8));
+ try {
+ String checksum = reader.readLine();
+ if (null == checksum || 0 == checksum.length()) {
+ throw new GradleException("Failed to find checksum in file: " + f);
+ }
+ return checksum;
+ } finally {
+ reader.close();
+ }
+ } catch (IOException e) {
+ throw new GradleException("IO error reading checksum file: " + f, e);
+ }
+ }
+
+ private static final boolean matchesRegexChecksum(File jarFile, Pattern skipRegexChecksum) {
+ if (skipRegexChecksum == null) {
+ return false;
+ }
+ Matcher m = skipRegexChecksum.matcher(jarFile.getName());
+ return m.matches();
+ }
+
+}
diff --git a/buildSrc/src/main/java/org/apache/lucene/gradle/LicenseType.java b/buildSrc/src/main/java/org/apache/lucene/gradle/LicenseType.java
new file mode 100644
index 0000000..8c1d2b8
--- /dev/null
+++ b/buildSrc/src/main/java/org/apache/lucene/gradle/LicenseType.java
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+package org.apache.lucene.gradle;
+
+
+/**
+ * A list of accepted licenses. See also http://www.apache.org/legal/3party.html
+ *
+ **/
+public enum LicenseType {
+ ASL("Apache Software License 2.0", true),
+ BSD("Berkeley Software Distribution", true),
+ BSD_LIKE("BSD like license", true),//BSD like just means someone has taken the BSD license and put in their name, copyright, or it's a very similar license.
+ CDDL("Common Development and Distribution License", false),
+ CPL("Common Public License", true),
+ EPL("Eclipse Public License Version 1.0", false),
+ MIT("Massachusetts Institute of Tech. License", false),
+ MPL("Mozilla Public License", false), //NOT SURE on the required notice
+ PD("Public Domain", false),
+ //SUNBCLA("Sun Binary Code License Agreement"),
+ SUN("Sun Open Source License", false),
+ COMPOUND("Compound license (see NOTICE).", true),
+ FAKE("FAKE license - not needed", false);
+
+ private String display;
+ private boolean noticeRequired;
+
+ LicenseType(String display, boolean noticeRequired) {
+ this.display = display;
+ this.noticeRequired = noticeRequired;
+ }
+
+ public boolean isNoticeRequired() {
+ return noticeRequired;
+ }
+
+ public String getDisplay() {
+ return display;
+ }
+
+ public String toString() {
+ return "LicenseType{" +
+ "display='" + display + '\'' +
+ '}';
+ }
+
+ /**
+ * Expected license file suffix for a given license type.
+ */
+ public String licenseFileSuffix() {
+ return "-LICENSE-" + this.name() + ".txt";
+ }
+
+ /**
+ * Expected notice file suffix for a given license type.
+ */
+ public String noticeFileSuffix() {
+ return "-NOTICE.txt";
+ }
+}
+
diff --git a/buildSrc/src/main/resources/forbidden/base.txt b/buildSrc/src/main/resources/forbidden/base.txt
new file mode 100644
index 0000000..0a81d03
--- /dev/null
+++ b/buildSrc/src/main/resources/forbidden/base.txt
@@ -0,0 +1,60 @@
+# 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.
+
+@defaultMessage Spawns threads with vague names; use a custom thread factory (Lucene's NamedThreadFactory, Solr's DefaultSolrThreadFactory) and name threads so that you can tell (by its name) which executor it is associated with
+java.util.concurrent.Executors#newFixedThreadPool(int)
+java.util.concurrent.Executors#newSingleThreadExecutor()
+java.util.concurrent.Executors#newCachedThreadPool()
+java.util.concurrent.Executors#newSingleThreadScheduledExecutor()
+java.util.concurrent.Executors#newScheduledThreadPool(int)
+java.util.concurrent.Executors#defaultThreadFactory()
+java.util.concurrent.Executors#privilegedThreadFactory()
+
+@defaultMessage Properties files should be read/written with Reader/Writer, using UTF-8 charset. This allows reading older files with unicode escapes, too.
+java.util.Properties#load(java.io.InputStream)
+java.util.Properties#save(java.io.OutputStream,java.lang.String)
+java.util.Properties#store(java.io.OutputStream,java.lang.String)
+
+@defaultMessage The context classloader should never be used for resource lookups, unless there is a 3rd party library that needs it. Always pass a classloader down as method parameters.
+java.lang.Thread#getContextClassLoader()
+java.lang.Thread#setContextClassLoader(java.lang.ClassLoader)
+
+java.lang.Character#codePointBefore(char[],int) @ Implicit start offset is error-prone when the char[] is a buffer and the first chars are random chars
+java.lang.Character#codePointAt(char[],int) @ Implicit end offset is error-prone when the char[] is a buffer and the last chars are random chars
+
+java.io.File#delete() @ use Files.delete for real exception, IOUtils.deleteFilesIgnoringExceptions if you dont care
+
+java.util.Collections#shuffle(java.util.List) @ Use shuffle(List, Random) instead so that it can be reproduced
+
+java.util.Locale#forLanguageTag(java.lang.String) @ use new Locale.Builder().setLanguageTag(...).build() which has error handling
+java.util.Locale#toString() @ use Locale#toLanguageTag() for a standardized BCP47 locale name
+
+@defaultMessage Constructors for wrapper classes of Java primitives should be avoided in favor of the public static methods available or autoboxing
+java.lang.Integer#<init>(int)
+java.lang.Integer#<init>(java.lang.String)
+java.lang.Byte#<init>(byte)
+java.lang.Byte#<init>(java.lang.String)
+java.lang.Short#<init>(short)
+java.lang.Short#<init>(java.lang.String)
+java.lang.Long#<init>(long)
+java.lang.Long#<init>(java.lang.String)
+java.lang.Boolean#<init>(boolean)
+java.lang.Boolean#<init>(java.lang.String)
+java.lang.Character#<init>(char)
+java.lang.Float#<init>(float)
+java.lang.Float#<init>(double)
+java.lang.Float#<init>(java.lang.String)
+java.lang.Double#<init>(double)
+java.lang.Double#<init>(java.lang.String)
diff --git a/buildSrc/src/main/resources/forbidden/lucene.txt b/buildSrc/src/main/resources/forbidden/lucene.txt
new file mode 100644
index 0000000..2a1d883
--- /dev/null
+++ b/buildSrc/src/main/resources/forbidden/lucene.txt
@@ -0,0 +1,53 @@
+# 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.
+
+@defaultMessage Use NIO.2 instead
+java.io.File
+java.io.FileInputStream
+java.io.FileOutputStream
+java.io.PrintStream#<init>(java.lang.String,java.lang.String)
+java.io.PrintWriter#<init>(java.lang.String,java.lang.String)
+java.util.Formatter#<init>(java.lang.String,java.lang.String,java.util.Locale)
+java.io.RandomAccessFile
+java.nio.file.Path#toFile()
+java.util.jar.JarFile
+java.util.zip.ZipFile
+@defaultMessage Use home-grown methods instead
+java.lang.Math#toRadians(double)
+java.lang.Math#toDegrees(double)
+
+@defaultMessage Prefer using ArrayUtil as Arrays#copyOfRange fills zeros for bad bounds
+java.util.Arrays#copyOfRange(byte[],int,int)
+java.util.Arrays#copyOfRange(char[],int,int)
+java.util.Arrays#copyOfRange(short[],int,int)
+java.util.Arrays#copyOfRange(int[],int,int)
+java.util.Arrays#copyOfRange(long[],int,int)
+java.util.Arrays#copyOfRange(float[],int,int)
+java.util.Arrays#copyOfRange(double[],int,int)
+java.util.Arrays#copyOfRange(boolean[],int,int)
+java.util.Arrays#copyOfRange(java.lang.Object[],int,int)
+java.util.Arrays#copyOfRange(java.lang.Object[],int,int,java.lang.Class)
+
+@defaultMessage Prefer using ArrayUtil as Arrays#copyOf fills zeros for bad bounds
+java.util.Arrays#copyOf(byte[],int)
+java.util.Arrays#copyOf(char[],int)
+java.util.Arrays#copyOf(short[],int)
+java.util.Arrays#copyOf(int[],int)
+java.util.Arrays#copyOf(long[],int)
+java.util.Arrays#copyOf(float[],int)
+java.util.Arrays#copyOf(double[],int)
+java.util.Arrays#copyOf(boolean[],int)
+java.util.Arrays#copyOf(java.lang.Object[],int)
+java.util.Arrays#copyOf(java.lang.Object[],int,java.lang.Class)
diff --git a/buildSrc/src/main/resources/forbidden/servlet-api.txt b/buildSrc/src/main/resources/forbidden/servlet-api.txt
new file mode 100644
index 0000000..dc82e8f
--- /dev/null
+++ b/buildSrc/src/main/resources/forbidden/servlet-api.txt
@@ -0,0 +1,43 @@
+# 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.
+
+@defaultMessage Servlet API method is parsing request parameters without using the correct encoding if no extra configuration is given in the servlet container
+
+javax.servlet.ServletRequest#getParameter(java.lang.String)
+javax.servlet.ServletRequest#getParameterMap()
+javax.servlet.ServletRequest#getParameterNames()
+javax.servlet.ServletRequest#getParameterValues(java.lang.String)
+
+javax.servlet.http.HttpServletRequest#getSession() @ Servlet API getter has side effect of creating sessions
+
+@defaultMessage Servlet API method is broken and slow in some environments (e.g., Jetty's UTF-8 readers)
+
+javax.servlet.ServletRequest#getReader()
+javax.servlet.ServletResponse#getWriter()
+javax.servlet.ServletInputStream#readLine(byte[],int,int)
+javax.servlet.ServletOutputStream#print(boolean)
+javax.servlet.ServletOutputStream#print(char)
+javax.servlet.ServletOutputStream#print(double)
+javax.servlet.ServletOutputStream#print(float)
+javax.servlet.ServletOutputStream#print(int)
+javax.servlet.ServletOutputStream#print(long)
+javax.servlet.ServletOutputStream#print(java.lang.String)
+javax.servlet.ServletOutputStream#println(boolean)
+javax.servlet.ServletOutputStream#println(char)
+javax.servlet.ServletOutputStream#println(double)
+javax.servlet.ServletOutputStream#println(float)
+javax.servlet.ServletOutputStream#println(int)
+javax.servlet.ServletOutputStream#println(long)
+javax.servlet.ServletOutputStream#println(java.lang.String)
diff --git a/buildSrc/src/main/resources/forbidden/solr.txt b/buildSrc/src/main/resources/forbidden/solr.txt
new file mode 100644
index 0000000..303f0a8
--- /dev/null
+++ b/buildSrc/src/main/resources/forbidden/solr.txt
@@ -0,0 +1,57 @@
+# 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.
+
+@defaultMessage Spawns threads without MDC logging context; use ExecutorUtil.newMDCAwareFixedThreadPool instead
+java.util.concurrent.Executors#newFixedThreadPool(int,java.util.concurrent.ThreadFactory)
+
+@defaultMessage Spawns threads without MDC logging context; use ExecutorUtil.newMDCAwareSingleThreadExecutor instead
+java.util.concurrent.Executors#newSingleThreadExecutor(java.util.concurrent.ThreadFactory)
+
+@defaultMessage Spawns threads without MDC logging context; use ExecutorUtil.newMDCAwareCachedThreadPool instead
+java.util.concurrent.Executors#newCachedThreadPool(java.util.concurrent.ThreadFactory)
+
+@defaultMessage Use ExecutorUtil.MDCAwareThreadPoolExecutor instead of ThreadPoolExecutor
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue,java.util.concurrent.ThreadFactory,java.util.concurrent.RejectedExecutionHandler)
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue)
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue,java.util.concurrent.ThreadFactory)
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue,java.util.concurrent.RejectedExecutionHandler)
+
+@defaultMessage Use slf4j classes instead
+org.apache.log4j.**
+org.apache.logging.log4j.**
+java.util.logging.**
+
+@defaultMessage Use RTimer/TimeOut/System.nanoTime for time comparisons, and `new Date()` output/debugging/stats of timestamps. If for some miscellaneous reason, you absolutely need to use this, use a SuppressForbidden.
+java.lang.System#currentTimeMillis()
+
+@defaultMessage Use corresponding Java 8 functional/streaming interfaces
+com.google.common.base.Function
+com.google.common.base.Joiner
+com.google.common.base.Predicate
+com.google.common.base.Supplier
+
+@defaultMessage Use java.nio.charset.StandardCharsets instead
+com.google.common.base.Charsets
+org.apache.commons.codec.Charsets
+
+@defaultMessage Use methods in java.util.Objects instead
+com.google.common.base.Objects#equal(java.lang.Object,java.lang.Object)
+com.google.common.base.Objects#hashCode(java.lang.Object[])
+com.google.common.base.Preconditions#checkNotNull(java.lang.Object)
+com.google.common.base.Preconditions#checkNotNull(java.lang.Object,java.lang.Object)
+
+@defaultMessage Use methods in java.util.Comparator instead
+com.google.common.collect.Ordering
+
diff --git a/buildSrc/src/main/resources/forbidden/solrj.txt b/buildSrc/src/main/resources/forbidden/solrj.txt
new file mode 100644
index 0000000..f8ce502
--- /dev/null
+++ b/buildSrc/src/main/resources/forbidden/solrj.txt
@@ -0,0 +1,40 @@
+# 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.
+
+@defaultMessage Spawns threads without MDC logging context; use ExecutorUtil.newMDCAwareFixedThreadPool instead
+java.util.concurrent.Executors#newFixedThreadPool(int,java.util.concurrent.ThreadFactory)
+
+@defaultMessage Spawns threads without MDC logging context; use ExecutorUtil.newMDCAwareSingleThreadExecutor instead
+java.util.concurrent.Executors#newSingleThreadExecutor(java.util.concurrent.ThreadFactory)
+
+@defaultMessage Spawns threads without MDC logging context; use ExecutorUtil.newMDCAwareCachedThreadPool instead
+java.util.concurrent.Executors#newCachedThreadPool(java.util.concurrent.ThreadFactory)
+
+@defaultMessage Use ExecutorUtil.MDCAwareThreadPoolExecutor instead of ThreadPoolExecutor
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue,java.util.concurrent.ThreadFactory,java.util.concurrent.RejectedExecutionHandler)
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue)
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue,java.util.concurrent.ThreadFactory)
+java.util.concurrent.ThreadPoolExecutor#<init>(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.BlockingQueue,java.util.concurrent.RejectedExecutionHandler)
+
+@defaultMessage Use slf4j classes instead
+org.apache.log4j.**
+org.apache.logging.log4j.**
+java.util.logging.**
+
+@defaultMessage Use RTimer/TimeOut/System.nanoTime for time comparisons, and `new Date()` output/debugging/stats of timestamps. If for some miscellaneous reason, you absolutely need to use this, use a SuppressForbidden.
+java.lang.System#currentTimeMillis()
+
+@defaultMessage Use java.nio.charset.StandardCharsets instead
+org.apache.commons.codec.Charsets
diff --git a/buildSrc/src/main/resources/forbidden/tests.txt b/buildSrc/src/main/resources/forbidden/tests.txt
new file mode 100644
index 0000000..fbcc0dd
--- /dev/null
+++ b/buildSrc/src/main/resources/forbidden/tests.txt
@@ -0,0 +1,29 @@
+# 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.
+
+junit.framework.TestCase @ All classes should derive from LuceneTestCase
+
+java.util.Random#<init>() @ Use RandomizedRunner's random() instead
+java.lang.Math#random() @ Use RandomizedRunner's random().nextDouble() instead
+
+# TODO: fix tests that do this!
+#java.lang.System#currentTimeMillis() @ Don't depend on wall clock times
+#java.lang.System#nanoTime() @ Don't depend on wall clock times
+
+com.carrotsearch.randomizedtesting.annotations.Seed @ Don't commit hardcoded seeds
+
+@defaultMessage Use LuceneTestCase.collate instead, which can avoid JDK-8071862
+java.text.Collator#compare(java.lang.Object,java.lang.Object)
+java.text.Collator#compare(java.lang.String,java.lang.String)
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..b9acbf2
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,11 @@
+# Default build params - override in ~/.gradle/gradle.properties
+
+group=org.apache.lucene
+version=8.1.0
+
+org.gradle.parallel=true
+org.gradle.workers.max=6
+org.gradle.configureondemand=true
+org.gradle.jvmargs=-Xmx1g
+
+python_exe=python3
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..29953ea
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..696a69e
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/lucene/analysis/common/build.gradle b/lucene/analysis/common/build.gradle
new file mode 100644
index 0000000..25522be
--- /dev/null
+++ b/lucene/analysis/common/build.gradle
@@ -0,0 +1,23 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-common'
+
+task jarTest (type: Jar) {
+ from sourceSets.test.output
+ classifier = 'test'
+}
+
+configurations {
+ testOutput
+}
+
+artifacts {
+ testOutput jarTest
+}
+
+dependencies {
+
+ api project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
diff --git a/lucene/analysis/icu/build.gradle b/lucene/analysis/icu/build.gradle
new file mode 100644
index 0000000..704a327
--- /dev/null
+++ b/lucene/analysis/icu/build.gradle
@@ -0,0 +1,13 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-icu'
+
+dependencies {
+
+ api project(':lucene:lucene-core')
+ api project(':lucene:analysis:analyzers-common')
+
+ implementation 'com.ibm.icu:icu4j'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/kuromoji/build.gradle b/lucene/analysis/kuromoji/build.gradle
new file mode 100644
index 0000000..9532284
--- /dev/null
+++ b/lucene/analysis/kuromoji/build.gradle
@@ -0,0 +1,26 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-kuromoji'
+
+// TODO we need download-dict, patch-dict, etc
+
+// def urlFile = { url, name ->
+// File file = new File("$buildDir/download/${name}.jar")
+// file.parentFile.mkdirs()
+// if (!file.exists()) {
+// new URL(url).withInputStream { downloadStream ->
+// file.withOutputStream { fileOut ->
+// fileOut << downloadStream
+// }
+// }
+// }
+// files(file.absolutePath)
+// }
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/morfologik/build.gradle b/lucene/analysis/morfologik/build.gradle
new file mode 100644
index 0000000..063d6ce
--- /dev/null
+++ b/lucene/analysis/morfologik/build.gradle
@@ -0,0 +1,16 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-morfologik'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'org.carrot2:morfologik-polish'
+ implementation 'org.carrot2:morfologik-fsa'
+ implementation 'org.carrot2:morfologik-stemming'
+ implementation 'ua.net.nlp:morfologik-ukrainian-search'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/nori/build.gradle b/lucene/analysis/nori/build.gradle
new file mode 100644
index 0000000..6b01fa1
--- /dev/null
+++ b/lucene/analysis/nori/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-nori'
+
+dependencies {
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/nori/src/test/org/apache/lucene/analysis/ko/userdict.txt b/lucene/analysis/nori/src/test-files/org/apache/lucene/analysis/ko/userdict.txt
similarity index 100%
rename from lucene/analysis/nori/src/test/org/apache/lucene/analysis/ko/userdict.txt
rename to lucene/analysis/nori/src/test-files/org/apache/lucene/analysis/ko/userdict.txt
diff --git a/lucene/analysis/opennlp/build.gradle b/lucene/analysis/opennlp/build.gradle
new file mode 100644
index 0000000..868e0d8
--- /dev/null
+++ b/lucene/analysis/opennlp/build.gradle
@@ -0,0 +1,9 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementation 'org.apache.opennlp:opennlp-tools'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/phonetic/build.gradle b/lucene/analysis/phonetic/build.gradle
new file mode 100644
index 0000000..97774b3
--- /dev/null
+++ b/lucene/analysis/phonetic/build.gradle
@@ -0,0 +1,13 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-phonetic'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'commons-codec:commons-codec'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/smartcn/build.gradle b/lucene/analysis/smartcn/build.gradle
new file mode 100644
index 0000000..e35a013
--- /dev/null
+++ b/lucene/analysis/smartcn/build.gradle
@@ -0,0 +1,12 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-smartcn'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/analysis/stempel/build.gradle b/lucene/analysis/stempel/build.gradle
new file mode 100644
index 0000000..ecb76f2
--- /dev/null
+++ b/lucene/analysis/stempel/build.gradle
@@ -0,0 +1,11 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'analyzers-stemple'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/backward-codecs/build.gradle b/lucene/backward-codecs/build.gradle
new file mode 100644
index 0000000..041607a
--- /dev/null
+++ b/lucene/backward-codecs/build.gradle
@@ -0,0 +1,21 @@
+apply plugin: 'java-library'
+
+task jarTest (type: Jar) {
+ from sourceSets.test.output
+ classifier = 'test'
+}
+
+configurations {
+ testOutput
+}
+
+artifacts {
+ testOutput jarTest
+}
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/benchmark/build.gradle b/lucene/benchmark/build.gradle
new file mode 100644
index 0000000..7c4f9b5
--- /dev/null
+++ b/lucene/benchmark/build.gradle
@@ -0,0 +1,29 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementationTran project(':lucene:facet')
+ implementationTran project(':lucene:highlighter')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:spatial-extras')
+ implementationTran project(':lucene:queryparser')
+
+ implementation "org.apache.commons:commons-compress"
+ implementation "xerces:xercesImpl"
+ implementation "net.sourceforge.nekohtml:nekohtml"
+ implementation "com.ibm.icu:icu4j"
+ implementation "org.locationtech.spatial4j:spatial4j"
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
+
+// copy .alg files as resources for testing
+task copyConfResources(type: Copy) {
+ from('conf')
+ into new File(sourceSets.test.java.outputDir, "conf")
+}
+processTestResources.dependsOn copyConfResources
+
+
diff --git a/lucene/build.gradle b/lucene/build.gradle
new file mode 100644
index 0000000..5d272b4
--- /dev/null
+++ b/lucene/build.gradle
@@ -0,0 +1,8 @@
+import org.apache.lucene.gradle.LicenseCheckTask
+
+subprojects {
+ group = 'org.apache.lucene'
+}
+
+tasks.create("checkLicenses", LicenseCheckTask, new File(projectDir.getAbsolutePath()
+ + System.properties['file.separator'] + "licenses"))
\ No newline at end of file
diff --git a/lucene/classification/build.gradle b/lucene/classification/build.gradle
new file mode 100644
index 0000000..3aea787
--- /dev/null
+++ b/lucene/classification/build.gradle
@@ -0,0 +1,12 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:grouping')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':lucene:analysis:analyzers-common')
+ testImplementationTran project(':lucene:codecs')
+}
diff --git a/lucene/codecs/build.gradle b/lucene/codecs/build.gradle
new file mode 100644
index 0000000..203e97d
--- /dev/null
+++ b/lucene/codecs/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'codecs'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/core/build.gradle b/lucene/core/build.gradle
new file mode 100644
index 0000000..e5af65e
--- /dev/null
+++ b/lucene/core/build.gradle
@@ -0,0 +1,73 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'lucene-core'
+
+
+dependencies {
+ testImplementationTran project(':lucene:codecs')
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
+
+task createLevAutomaton {
+
+ doLast {
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/automaton'
+ commandLine "${python_exe} -B createLevAutomata.py 1 True"
+ }
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/automaton'
+ commandLine "${python_exe} -B createLevAutomata.py 1 False"
+ }
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/automaton'
+ commandLine "${python_exe} -B createLevAutomata.py 2 True"
+ }
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/automaton'
+ commandLine "${python_exe} -B createLevAutomata.py 2 False"
+ }
+ }
+
+ // fix fixcrlf?
+ // filter(FixCrLfFilter.class, eol:FixCrLfFilter.CrLf.newInstance("lf"))
+ // srcdir="src/java/org/apache/lucene/util/automaton" includes="*ParametricDescription.java" encoding="UTF-8"/>
+
+}
+
+task createPackedIntSources {
+
+ doLast {
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/packed'
+ commandLine "${python_exe} -B gen_BulkOperation.py"
+ }
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/packed'
+ commandLine "${python_exe} -B gen_Direct.py"
+ }
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/packed'
+ commandLine "${python_exe} -B gen_Packed64SingleBlock.py"
+ }
+ exec {
+ workingDir 'src/java/org/apache/lucene/util/packed'
+ commandLine "${python_exe} -B gen_PackedThreeBlocks.py"
+ }
+ }
+
+ // fix fixcrlf?
+ // filter(FixCrLfFilter.class, eol:FixCrLfFilter.CrLf.newInstance("lf"))
+ // <fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java,Direct*.java,Packed64SingleBlock.java,Packed*ThreeBlocks.py" encoding="UTF-8"/>
+}
+
+task regenerate {
+ doFirst {
+ println "regenerate core"
+ }
+}
+
+regenerate.dependsOn createLevAutomaton
+regenerate.dependsOn createPackedIntSources
+
+
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java b/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
index 4dfe86b..e4d366c 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
@@ -14,82 +14,82 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.lucene.util;
-
-public class TestVirtualMethod extends LuceneTestCase {
-
- private static final VirtualMethod<TestVirtualMethod> publicTestMethod =
- new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
- private static final VirtualMethod<TestVirtualMethod> protectedTestMethod =
- new VirtualMethod<>(TestVirtualMethod.class, "protectedTest", int.class);
-
- public void publicTest(String test) {}
- protected void protectedTest(int test) {}
-
- static class TestClass1 extends TestVirtualMethod {
- @Override
- public void publicTest(String test) {}
- @Override
- protected void protectedTest(int test) {}
- }
-
- static class TestClass2 extends TestClass1 {
- @Override // make it public here
- public void protectedTest(int test) {}
- }
-
- static class TestClass3 extends TestClass2 {
- @Override
- public void publicTest(String test) {}
- }
-
- static class TestClass4 extends TestVirtualMethod {
- }
-
- static class TestClass5 extends TestClass4 {
- }
-
- public void testGeneral() {
- assertEquals(0, publicTestMethod.getImplementationDistance(this.getClass()));
- assertEquals(1, publicTestMethod.getImplementationDistance(TestClass1.class));
- assertEquals(1, publicTestMethod.getImplementationDistance(TestClass2.class));
- assertEquals(3, publicTestMethod.getImplementationDistance(TestClass3.class));
- assertFalse(publicTestMethod.isOverriddenAsOf(TestClass4.class));
- assertFalse(publicTestMethod.isOverriddenAsOf(TestClass5.class));
-
- assertEquals(0, protectedTestMethod.getImplementationDistance(this.getClass()));
- assertEquals(1, protectedTestMethod.getImplementationDistance(TestClass1.class));
- assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass2.class));
- assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass3.class));
- assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass4.class));
- assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass5.class));
-
- assertTrue(VirtualMethod.compareImplementationDistance(TestClass3.class, publicTestMethod, protectedTestMethod) > 0);
- assertEquals(0, VirtualMethod.compareImplementationDistance(TestClass5.class, publicTestMethod, protectedTestMethod));
- }
-
- @SuppressWarnings({"rawtypes","unchecked"})
- public void testExceptions() {
- // LuceneTestCase is not a subclass and can never override publicTest(String)
- expectThrows(IllegalArgumentException.class, () -> {
- // cast to Class to remove generics:
- publicTestMethod.getImplementationDistance((Class) LuceneTestCase.class);
- });
-
- // Method bogus() does not exist, so IAE should be thrown
- expectThrows(IllegalArgumentException.class, () -> {
- new VirtualMethod<>(TestVirtualMethod.class, "bogus");
- });
-
- // Method publicTest(String) is not declared in TestClass2, so IAE should be thrown
- expectThrows(IllegalArgumentException.class, () -> {
- new VirtualMethod<>(TestClass2.class, "publicTest", String.class);
- });
-
- // try to create a second instance of the same baseClass / method combination
- expectThrows(UnsupportedOperationException.class, () -> {
- new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
- });
- }
-
-}
+//package org.apache.lucene.util;
+//
+//public class TestVirtualMethod extends LuceneTestCase {
+//
+// private static final VirtualMethod<TestVirtualMethod> publicTestMethod =
+// new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
+// private static final VirtualMethod<TestVirtualMethod> protectedTestMethod =
+// new VirtualMethod<>(TestVirtualMethod.class, "protectedTest", int.class);
+//
+// public void publicTest(String test) {}
+// protected void protectedTest(int test) {}
+//
+// static class TestClass1 extends TestVirtualMethod {
+// @Override
+// public void publicTest(String test) {}
+// @Override
+// protected void protectedTest(int test) {}
+// }
+//
+// static class TestClass2 extends TestClass1 {
+// @Override // make it public here
+// public void protectedTest(int test) {}
+// }
+//
+// static class TestClass3 extends TestClass2 {
+// @Override
+// public void publicTest(String test) {}
+// }
+//
+// static class TestClass4 extends TestVirtualMethod {
+// }
+//
+// static class TestClass5 extends TestClass4 {
+// }
+//
+// public void testGeneral() {
+// assertEquals(0, publicTestMethod.getImplementationDistance(this.getClass()));
+// assertEquals(1, publicTestMethod.getImplementationDistance(TestClass1.class));
+// assertEquals(1, publicTestMethod.getImplementationDistance(TestClass2.class));
+// assertEquals(3, publicTestMethod.getImplementationDistance(TestClass3.class));
+// assertFalse(publicTestMethod.isOverriddenAsOf(TestClass4.class));
+// assertFalse(publicTestMethod.isOverriddenAsOf(TestClass5.class));
+//
+// assertEquals(0, protectedTestMethod.getImplementationDistance(this.getClass()));
+// assertEquals(1, protectedTestMethod.getImplementationDistance(TestClass1.class));
+// assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass2.class));
+// assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass3.class));
+// assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass4.class));
+// assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass5.class));
+//
+// assertTrue(VirtualMethod.compareImplementationDistance(TestClass3.class, publicTestMethod, protectedTestMethod) > 0);
+// assertEquals(0, VirtualMethod.compareImplementationDistance(TestClass5.class, publicTestMethod, protectedTestMethod));
+// }
+//
+// @SuppressWarnings({"rawtypes","unchecked"})
+// public void testExceptions() {
+// // LuceneTestCase is not a subclass and can never override publicTest(String)
+// expectThrows(IllegalArgumentException.class, () -> {
+// // cast to Class to remove generics:
+// publicTestMethod.getImplementationDistance((Class) LuceneTestCase.class);
+// });
+//
+// // Method bogus() does not exist, so IAE should be thrown
+// expectThrows(IllegalArgumentException.class, () -> {
+// new VirtualMethod<>(TestVirtualMethod.class, "bogus");
+// });
+//
+// // Method publicTest(String) is not declared in TestClass2, so IAE should be thrown
+// expectThrows(IllegalArgumentException.class, () -> {
+// new VirtualMethod<>(TestClass2.class, "publicTest", String.class);
+// });
+//
+// // try to create a second instance of the same baseClass / method combination
+// expectThrows(UnsupportedOperationException.class, () -> {
+// new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
+// });
+// }
+//
+//}
diff --git a/lucene/demo/build.gradle b/lucene/demo/build.gradle
new file mode 100644
index 0000000..9d889eb
--- /dev/null
+++ b/lucene/demo/build.gradle
@@ -0,0 +1,17 @@
+apply plugin: 'java-library'
+
+
+dependencies {
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:facet')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementationTran project(':lucene:queryparser')
+ implementationTran project(':lucene:expressions')
+
+ runtimeOnly 'org.antlr:antlr4-runtime'
+ runtimeOnly 'org.ow2.asm:asm'
+ runtimeOnly 'org.ow2.asm:asm-commons'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/expressions/build.gradle b/lucene/expressions/build.gradle
new file mode 100644
index 0000000..9f3ef0e
--- /dev/null
+++ b/lucene/expressions/build.gradle
@@ -0,0 +1,12 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+
+ implementation 'org.antlr:antlr4-runtime'
+ implementation 'org.ow2.asm:asm'
+ implementation 'org.ow2.asm:asm-commons'
+}
diff --git a/lucene/facet/build.gradle b/lucene/facet/build.gradle
new file mode 100644
index 0000000..5c55e49
--- /dev/null
+++ b/lucene/facet/build.gradle
@@ -0,0 +1,12 @@
+apply plugin: 'java-library'
+
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ implementation 'com.carrotsearch:hppc:0.8.1'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':lucene:queries')
+}
\ No newline at end of file
diff --git a/lucene/grouping/build.gradle b/lucene/grouping/build.gradle
new file mode 100644
index 0000000..d587555
--- /dev/null
+++ b/lucene/grouping/build.gradle
@@ -0,0 +1,9 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:queries')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/highlighter/build.gradle b/lucene/highlighter/build.gradle
new file mode 100644
index 0000000..24c1e70
--- /dev/null
+++ b/lucene/highlighter/build.gradle
@@ -0,0 +1,11 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:memory')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':lucene:analysis:analyzers-common')
+}
\ No newline at end of file
diff --git a/lucene/join/build.gradle b/lucene/join/build.gradle
new file mode 100644
index 0000000..bfe347c
--- /dev/null
+++ b/lucene/join/build.gradle
@@ -0,0 +1,8 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/memory/build.gradle b/lucene/memory/build.gradle
new file mode 100644
index 0000000..d35fbf0
--- /dev/null
+++ b/lucene/memory/build.gradle
@@ -0,0 +1,8 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':lucene:queryparser')
+}
\ No newline at end of file
diff --git a/lucene/misc/build.gradle b/lucene/misc/build.gradle
new file mode 100644
index 0000000..970a184
--- /dev/null
+++ b/lucene/misc/build.gradle
@@ -0,0 +1,9 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-core')
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/queries/build.gradle b/lucene/queries/build.gradle
new file mode 100644
index 0000000..48a6ac6
--- /dev/null
+++ b/lucene/queries/build.gradle
@@ -0,0 +1,13 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+
+ runtimeOnly 'org.antlr:antlr4-runtime'
+ runtimeOnly 'org.ow2.asm:asm'
+ runtimeOnly 'org.ow2.asm:asm-commons'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':lucene:expressions')
+}
\ No newline at end of file
diff --git a/lucene/queryparser/build.gradle b/lucene/queryparser/build.gradle
new file mode 100644
index 0000000..b31d6ea
--- /dev/null
+++ b/lucene/queryparser/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'java-library'
+
+task jarTest (type: Jar) {
+ from sourceSets.test.output
+ classifier = 'test'
+}
+
+configurations {
+ testOutput
+}
+
+artifacts {
+ testOutput jarTest
+}
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:sandbox')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+
+}
diff --git a/lucene/replicator/build.gradle b/lucene/replicator/build.gradle
new file mode 100644
index 0000000..0ac3df5
--- /dev/null
+++ b/lucene/replicator/build.gradle
@@ -0,0 +1,22 @@
+
+apply plugin: 'java-library'
+
+dependencies {
+ api project(':lucene:lucene-core')
+ api project(':lucene:facet')
+
+ runtimeOnly 'org.slf4j:jcl-over-slf4j'
+
+ implementation 'org.apache.httpcomponents:httpclient'
+ implementation 'org.apache.httpcomponents:httpcore'
+ implementation 'org.eclipse.jetty:jetty-server'
+ implementation 'org.eclipse.jetty:jetty-servlet'
+ implementation 'org.eclipse.jetty:jetty-util'
+ implementation 'org.eclipse.jetty:jetty-io'
+ implementation 'org.eclipse.jetty:jetty-continuation'
+ implementation 'org.eclipse.jetty:jetty-http'
+ implementation 'javax.servlet:javax.servlet-api'
+ implementation 'org.slf4j:slf4j-api'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/sandbox/build.gradle b/lucene/sandbox/build.gradle
new file mode 100644
index 0000000..d2a0863
--- /dev/null
+++ b/lucene/sandbox/build.gradle
@@ -0,0 +1,8 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
diff --git a/lucene/spatial-extras/build.gradle b/lucene/spatial-extras/build.gradle
new file mode 100644
index 0000000..1dc7367
--- /dev/null
+++ b/lucene/spatial-extras/build.gradle
@@ -0,0 +1,17 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:spatial')
+ implementationTran project(':lucene:spatial3d')
+
+ implementation 'org.locationtech.spatial4j:spatial4j'
+ implementation 'io.sgr:s2-geometry-library-java'
+
+ testImplementation 'org.locationtech.jts:jts-core'
+ testImplementation 'org.locationtech.spatial4j:spatial4j::tests'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(path: ':lucene:spatial3d', configuration: 'testOutput')
+}
diff --git a/lucene/spatial/build.gradle b/lucene/spatial/build.gradle
new file mode 100644
index 0000000..bfe347c
--- /dev/null
+++ b/lucene/spatial/build.gradle
@@ -0,0 +1,8 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/spatial3d/build.gradle b/lucene/spatial3d/build.gradle
new file mode 100644
index 0000000..43d6294
--- /dev/null
+++ b/lucene/spatial3d/build.gradle
@@ -0,0 +1,21 @@
+apply plugin: 'java-library'
+
+task jarTest (type: Jar) {
+ from sourceSets.test.output
+ classifier = 'test'
+}
+
+configurations {
+ testOutput
+}
+
+artifacts {
+ testOutput jarTest
+}
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/suggest/build.gradle b/lucene/suggest/build.gradle
new file mode 100644
index 0000000..0c388ee
--- /dev/null
+++ b/lucene/suggest/build.gradle
@@ -0,0 +1,8 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/lucene/test-framework/build.gradle b/lucene/test-framework/build.gradle
new file mode 100644
index 0000000..5c7b684
--- /dev/null
+++ b/lucene/test-framework/build.gradle
@@ -0,0 +1,14 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'lucene-test-framework'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+
+ implementation "junit:junit"
+ implementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner"
+ implementation 'org.hamcrest:hamcrest-all'
+
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..c995608
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,73 @@
+/*
+ * This file was generated by the Gradle 'init' task.
+ *
+ * The settings file is used to specify which projects to include in your build.
+ *
+ * Detailed information about configuring a multi-project build in Gradle can be found
+ * in the user guide at https://docs.gradle.org/4.10.2/userguide/multi_project_builds.html
+ */
+
+rootProject.name = 'lucene-solr'
+
+include 'buildSrc'
+
+include 'lucene:analysis:common'
+project (':lucene:analysis:common').name='analyzers-common'
+include 'lucene:analysis:icu'
+project (':lucene:analysis:icu').name='analyzers-icu'
+include 'lucene:analysis:kuromoji'
+project (':lucene:analysis:kuromoji').name='analyzers-kuromoji'
+include 'lucene:analysis:morfologik'
+project (':lucene:analysis:morfologik').name='analyzers-morfologik'
+include 'lucene:analysis:nori'
+project (':lucene:analysis:nori').name='analyzers-nori'
+include 'lucene:analysis:opennlp'
+project (':lucene:analysis:opennlp').name='analyzers-opennlp'
+include 'lucene:analysis:phonetic'
+project (':lucene:analysis:phonetic').name='analyzers-phonetic'
+include 'lucene:analysis:smartcn'
+project (':lucene:analysis:smartcn').name='analyzers-smartcn'
+include 'lucene:analysis:stempel'
+project (':lucene:analysis:stempel').name='analyzers-stempel'
+include 'lucene:backward-codecs'
+include 'lucene:benchmark'
+include 'lucene:classification'
+include 'lucene:codecs'
+include 'lucene:core'
+project (':lucene:core').name='lucene-core'
+include 'lucene:demo'
+include 'lucene:expressions'
+include 'lucene:facet'
+include 'lucene:grouping'
+include 'lucene:highlighter'
+include 'lucene:join'
+include 'lucene:memory'
+include 'lucene:misc'
+include 'lucene:queries'
+include 'lucene:queryparser'
+include 'lucene:replicator'
+include 'lucene:sandbox'
+include 'lucene:spatial'
+include 'lucene:spatial-extras'
+include 'lucene:spatial3d'
+include 'lucene:suggest'
+include 'lucene:test-framework'
+project (':lucene:test-framework').name='lucene-test-framework'
+
+include 'solr:core'
+project (':solr:core').name='solr-core'
+include 'solr:server'
+include 'solr:solrj'
+include 'solr:test-framework'
+project (':solr:test-framework').name='solr-test-framework'
+include 'solr:example:example-DIH'
+include 'solr:contrib:analysis-extras'
+include 'solr:contrib:analytics'
+include 'solr:contrib:clustering'
+include 'solr:contrib:dataimporthandler'
+include 'solr:contrib:dataimporthandler-extras'
+include 'solr:contrib:extraction'
+include 'solr:contrib:langid'
+include 'solr:contrib:ltr'
+include 'solr:contrib:prometheus-exporter'
+include 'solr:contrib:velocity'
diff --git a/solr/build.gradle b/solr/build.gradle
new file mode 100644
index 0000000..794cfd0
--- /dev/null
+++ b/solr/build.gradle
@@ -0,0 +1,8 @@
+import org.apache.lucene.gradle.LicenseCheckTask
+
+subprojects {
+ group = 'org.apache.solr'
+}
+
+tasks.create("checkLicenses", LicenseCheckTask, new File(projectDir.getAbsolutePath()
+ + System.properties['file.separator'] + "licenses"))
\ No newline at end of file
diff --git a/solr/contrib/analysis-extras/build.gradle b/solr/contrib/analysis-extras/build.gradle
new file mode 100644
index 0000000..9548951
--- /dev/null
+++ b/solr/contrib/analysis-extras/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':solr:solrj')
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+ implementationTran project(':lucene:analysis:analyzers-icu')
+ implementationTran project(':lucene:analysis:analyzers-smartcn')
+ implementationTran project(':lucene:analysis:analyzers-stempel')
+ implementationTran project(':lucene:analysis:analyzers-morfologik')
+ implementationTran project(':lucene:analysis:analyzers-opennlp')
+
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'commons-io:commons-io'
+ implementation 'com.google.guava:guava'
+ implementation 'commons-codec:commons-codec'
+
+ testImplementationTran project(path: ':lucene:analysis:analyzers-common', configuration: 'testOutput')
+ testImplementationTran project(path: ':solr:contrib:dataimporthandler', configuration: 'testOutput')
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+
+}
\ No newline at end of file
diff --git a/solr/contrib/analytics/build.gradle b/solr/contrib/analytics/build.gradle
new file mode 100644
index 0000000..54b6def
--- /dev/null
+++ b/solr/contrib/analytics/build.gradle
@@ -0,0 +1,80 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:lucene-core')
+
+ implementation 'com.fasterxml.jackson.core:jackson-core'
+ implementation 'com.fasterxml.jackson.core:jackson-databind'
+ implementation 'com.fasterxml.jackson.core:jackson-annotations'
+ implementation'com.google.guava:guava'
+ implementation 'org.noggit:noggit'
+ implementation 'commons-codec:commons-codec'
+ implementation 'org.apache.commons:commons-lang3'
+ implementation 'io.dropwizard.metrics:metrics-core'
+
+ implementation 'org.slf4j:slf4j-api'
+
+ // if we try to make this compileOnly or testImplementation forbidden apis fails?
+ implementation 'javax.servlet:javax.servlet-api'
+
+ testRuntimeOnly 'org.noggit:noggit'
+
+ testRuntimeOnly 'javax.servlet:javax.servlet-api'
+ testRuntimeOnly 'commons-fileupload:commons-fileupload'
+ testRuntimeOnly 'org.apache.httpcomponents:httpclient'
+ testRuntimeOnly 'org.apache.httpcomponents:httpcore'
+ testRuntimeOnly 'org.apache.zookeeper:zookeeper'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-server'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-util'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-client'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-http'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-io'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-alpn-java-client'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-alpn-client'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-security'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-servlet'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-client'
+ testRuntimeOnly 'org.apache.commons:commons-lang3'
+ testRuntimeOnly 'org.rrd4j:rrd4j'
+
+ testRuntimeOnly 'io.dropwizard.metrics:metrics-jvm'
+ testRuntimeOnly 'io.dropwizard.metrics:metrics-jmx'
+
+ testRuntimeOnly 'org.eclipse.jetty:jetty-alpn-server'
+ testRuntimeOnly 'org.eclipse.jetty.http2:http2-server'
+ testRuntimeOnly 'org.eclipse.jetty.http2:http2-client'
+ testRuntimeOnly 'org.eclipse.jetty.http2:http2-http-client-transport'
+ testRuntimeOnly 'org.eclipse.jetty.http2:http2-common'
+ testRuntimeOnly 'org.eclipse.jetty.http2:http2-hpack'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-http'
+ testRuntimeOnly 'org.eclipse.jetty:jetty-client'
+
+ testRuntimeOnly 'io.dropwizard.metrics:metrics-core'
+ testRuntimeOnly 'io.dropwizard.metrics:metrics-jvm'
+ testRuntimeOnly 'io.dropwizard.metrics:metrics-jmx'
+
+ testRuntimeOnly 'org.apache.httpcomponents:httpmime'
+
+ testRuntimeOnly 'org.restlet.jee:org.restlet'
+ testRuntimeOnly 'org.restlet.jee:org.restlet.ext.servlet'
+
+ testRuntimeOnly 'commons-collections:commons-collections'
+
+ testRuntimeOnly 'commons-io:commons-io'
+ testRuntimeOnly project(':lucene:analysis:analyzers-common')
+ testRuntimeOnly project(':lucene:codecs')
+ testRuntimeOnly project(':lucene:join')
+ testRuntimeOnly project(':lucene:highlighter')
+ testRuntimeOnly project(':lucene:suggest')
+ testRuntimeOnly project(':lucene:grouping')
+ testRuntimeOnly project(':lucene:sandbox')
+ testRuntimeOnly project(':lucene:queries')
+ testRuntimeOnly project(':lucene:misc')
+
+ testRuntimeOnly "org.slf4j:jcl-over-slf4j"
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+}
\ No newline at end of file
diff --git a/solr/contrib/clustering/build.gradle b/solr/contrib/clustering/build.gradle
new file mode 100644
index 0000000..b37ed7f
--- /dev/null
+++ b/solr/contrib/clustering/build.gradle
@@ -0,0 +1,20 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:memory')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'org.carrot2:carrot2-mini'
+ implementation 'org.carrot2.shaded:carrot2-guava'
+ implementation 'org.carrot2.attributes:attributes-binder'
+ implementation 'org.simpleframework:simple-xml'
+ implementation 'com.fasterxml.jackson.core:jackson-annotations'
+ implementation 'com.fasterxml.jackson.core:jackson-databind'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+}
diff --git a/solr/contrib/dataimporthandler-extras/build.gradle b/solr/contrib/dataimporthandler-extras/build.gradle
new file mode 100644
index 0000000..223f502
--- /dev/null
+++ b/solr/contrib/dataimporthandler-extras/build.gradle
@@ -0,0 +1,17 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':solr:contrib:dataimporthandler')
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementationTran project(':solr:contrib:extraction')
+
+ implementation 'javax.activation:activation'
+ implementation 'com.sun.mail:javax.mail'
+ implementation 'com.sun.mail:gimap'
+
+ testImplementationTran project(path: ':solr:contrib:dataimporthandler', configuration: 'testOutput')
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+}
\ No newline at end of file
diff --git a/solr/contrib/dataimporthandler/build.gradle b/solr/contrib/dataimporthandler/build.gradle
new file mode 100644
index 0000000..4b38681
--- /dev/null
+++ b/solr/contrib/dataimporthandler/build.gradle
@@ -0,0 +1,40 @@
+apply plugin: 'java-library'
+
+task jarTest (type: Jar) {
+ from sourceSets.test.output
+ classifier = 'test'
+}
+
+configurations {
+ testOutput
+}
+
+artifacts {
+ testOutput jarTest
+}
+
+dependencies {
+
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementationTran project(':lucene:join')
+
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'com.google.guava:guava'
+ implementation 'commons-io:commons-io'
+ implementation 'org.apache.httpcomponents:httpclient'
+ implementation 'org.apache.zookeeper:zookeeper'
+ implementation 'io.dropwizard.metrics:metrics-core'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+
+ testImplementation 'org.hsqldb:hsqldb'
+ testImplementation 'org.apache.derby:derby'
+ testImplementation 'org.mockito:mockito-core'
+ testImplementation 'net.bytebuddy:byte-buddy'
+ testImplementation 'org.objenesis:objenesis'
+
+}
\ No newline at end of file
diff --git a/solr/contrib/extraction/build.gradle b/solr/contrib/extraction/build.gradle
new file mode 100644
index 0000000..8c3c9ce
--- /dev/null
+++ b/solr/contrib/extraction/build.gradle
@@ -0,0 +1,56 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'org.apache.tika:tika-core'
+ implementation 'org.apache.tika:tika-parsers'
+ implementation 'org.apache.tika:tika-xmp'
+ implementation 'org.apache.tika:tika-java7'
+ implementation 'com.healthmarketscience.jackcess:jackcess'
+ implementation 'com.healthmarketscience.jackcess:jackcess-encrypt'
+ implementation 'org.gagravarr:vorbis-java-tika'
+ implementation 'org.gagravarr:vorbis-java-core'
+ implementation 'org.apache.james:apache-mime4j-core'
+ implementation 'org.apache.james:apache-mime4j-dom'
+ implementation 'org.apache.commons:commons-compress'
+ implementation 'org.apache.pdfbox:pdfbox'
+ implementation 'org.apache.pdfbox:pdfbox-tools'
+ implementation 'org.apache.pdfbox:fontbox'
+ implementation 'org.apache.pdfbox:jempbox'
+ implementation 'org.bouncycastle:bcmail-jdk15on'
+ implementation 'org.bouncycastle:bcpkix-jdk15on'
+ implementation 'org.bouncycastle:bcprov-jdk15on'
+ implementation 'org.apache.poi:poi'
+ implementation 'org.apache.poi:poi-scratchpad'
+ implementation 'org.apache.poi:poi-ooxml'
+ implementation 'org.apache.poi:poi-ooxml-schemas'
+ implementation 'org.apache.xmlbeans:xmlbeans'
+ implementation 'org.apache.commons:commons-collections4'
+ implementation 'com.github.virtuald:curvesapi'
+ implementation 'org.ccil.cowan.tagsoup:tagsoup'
+ implementation 'com.googlecode.mp4parser:isoparser'
+ implementation 'org.aspectj:aspectjrt'
+ implementation 'com.drewnoakes:metadata-extractor'
+ implementation 'de.l3s.boilerpipe:boilerpipe'
+ implementation 'com.rometools:rome'
+ implementation 'com.rometools:rome-utils'
+ implementation 'org.jdom:jdom2'
+ implementation 'com.googlecode.juniversalchardet:juniversalchardet'
+ implementation 'org.tukaani:xz'
+ implementation 'com.adobe.xmp:xmpcore'
+ implementation 'com.pff:java-libpst'
+ implementation 'org.tallison:jmatio'
+ implementation 'com.epam:parso'
+ implementation 'org.brotli:dec'
+ implementation 'com.ibm.icu:icu4j'
+ implementation 'xerces:xercesImpl'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+
+}
\ No newline at end of file
diff --git a/solr/contrib/extraction/build.gradle.bak b/solr/contrib/extraction/build.gradle.bak
new file mode 100644
index 0000000..c55e693
--- /dev/null
+++ b/solr/contrib/extraction/build.gradle.bak
@@ -0,0 +1,69 @@
+apply plugin: 'java'
+
+dependencies {
+
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'io.dropwizard.metrics:metrics-core'
+ implementation 'commons-io:commons-io'
+
+ compile library.tika_core
+ compile library.tika_parsers
+ compile library.tika_xmp
+ compile library.tika_java7
+ // Tika dependencies - see http://tika.apache.org/1.3/gettingstarted.html#Using_Tika_as_a_Maven_dependency
+
+ //When upgrading Tika, upgrade dependencies versions and add any new ones
+ // (except slf4j-api, commons-codec, commons-logging, commons-httpclient, geronimo-stax-api_1.0_spec, jcip-annotations, xml-apis, asm)
+ // WARNING: Don't add netcdf / unidataCommon (partially LGPL code)
+ compile library.jackcess
+ compile library.jackcess_encrypt
+ compile library.vorbis_java_tika
+ compile library.vorbis_java_core
+ compile library.apache_mime4j_core
+ compile library.apache_mime4j_dom
+ compile library.commons_compress
+ compile library.pdfbox
+ compile library.pdfbox_tools
+ compile library.fontbox
+ compile library.jempbox
+ compile library.bcmail_jdk15on
+ compile library.bcpkix_jdk15on
+ compile library.bcprov_jdk15on
+ compile library.poi
+ compile library.poi_scratchpad
+ compile library.poi_ooxml
+ compile library.poi_ooxml_schemas
+ compile library.xmlbeans
+ compile library.commons_collections4
+ compile library.curvesapi
+ compile library.tagsoup
+ compile library.isoparser
+ compile library.aspectjrt
+ compile library.metadata_extractor
+ compile library.boilerpipe
+ compile library.rome
+ compile library.rome_utils
+ compile library.jdom2
+ compile library.juniversalchardet
+ compile library.xz
+ compile library.xmpcore
+ compile library.java_libpst
+ compile library.jmatio
+ compile library.parso
+ compile library.dec
+
+ // Other ExtractingRequestHandler dependencies
+ compile library.icu4j
+ compile library.xercesImpl
+
+ // if we try to make this compileOnly or testImplementation forbidden apis fails?
+ implementation 'javax.servlet:javax.servlet-api'
+
+ compile project(':lucene:core')
+ compile project(':solr:core')
+ compile project(':solr:solrj')
+ compile project(':lucene:analysis:common')
+
+ testProject project(':lucene:test-framework')
+ testProject project(':solr:test-framework')
+}
\ No newline at end of file
diff --git a/solr/contrib/langid/build.gradle b/solr/contrib/langid/build.gradle
new file mode 100644
index 0000000..d67ca30
--- /dev/null
+++ b/solr/contrib/langid/build.gradle
@@ -0,0 +1,19 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:lucene-core')
+
+ implementation 'com.cybozu.labs:langdetect'
+ implementation 'net.arnx:jsonic'
+ implementation 'org.apache.opennlp:opennlp-tools'
+ implementation 'org.apache.tika:tika-core'
+ implementation 'commons-io:commons-io'
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'commons-codec:commons-codec'
+ implementation'com.google.guava:guava'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+}
\ No newline at end of file
diff --git a/solr/contrib/ltr/build.gradle b/solr/contrib/ltr/build.gradle
new file mode 100644
index 0000000..7d0daff
--- /dev/null
+++ b/solr/contrib/ltr/build.gradle
@@ -0,0 +1,20 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'org.slf4j:slf4j-api'
+
+ testRuntimeOnly "org.slf4j:jcl-over-slf4j"
+
+ testImplementation 'org.mockito:mockito-core'
+ testImplementation 'net.bytebuddy:byte-buddy'
+ testImplementation 'org.objenesis:objenesis'
+
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+}
diff --git a/solr/contrib/prometheus-exporter/build.gradle b/solr/contrib/prometheus-exporter/build.gradle
new file mode 100644
index 0000000..8065a08
--- /dev/null
+++ b/solr/contrib/prometheus-exporter/build.gradle
@@ -0,0 +1,32 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'io.prometheus:simpleclient'
+ implementation 'io.prometheus:simpleclient_common'
+ implementation 'io.prometheus:simpleclient_httpserver'
+ implementation 'com.fasterxml.jackson.core:jackson-core'
+ implementation 'com.fasterxml.jackson.core:jackson-databind'
+ implementation 'com.fasterxml.jackson.core:jackson-annotations'
+ implementation 'net.thisptr:jackson-jq'
+ implementation 'net.sourceforge.argparse4j:argparse4j'
+ implementation 'org.slf4j:slf4j-api'
+ implementation'com.google.guava:guava'
+ implementation 'org.apache.zookeeper:zookeeper'
+ implementation 'org.noggit:noggit'
+ implementation 'commons-codec:commons-codec'
+ implementation 'commons-io:commons-io'
+ implementation 'org.apache.httpcomponents:httpclient'
+
+ testImplementation 'org.apache.httpcomponents:httpcore'
+ testImplementation 'org.eclipse.jetty:jetty-servlet'
+
+
+ testImplementationTran project(':solr:solr-test-framework')
+ testImplementationTran project(':lucene:lucene-test-framework')
+}
\ No newline at end of file
diff --git a/solr/contrib/velocity/build.gradle b/solr/contrib/velocity/build.gradle
new file mode 100644
index 0000000..faf5a96
--- /dev/null
+++ b/solr/contrib/velocity/build.gradle
@@ -0,0 +1,19 @@
+apply plugin: 'java-library'
+
+dependencies {
+
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':solr:solrj')
+
+ implementation 'commons-collections:commons-collections'
+ implementation "org.apache.velocity:velocity-engine-core"
+ implementation "org.apache.velocity.tools:velocity-tools-generic"
+ implementation "org.apache.velocity.tools:velocity-tools-view"
+ implementation "org.apache.velocity.tools:velocity-tools-view-jsp"
+ implementation 'org.slf4j:slf4j-api'
+
+ testImplementationTran project(':lucene:misc')
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+}
\ No newline at end of file
diff --git a/solr/core/build.gradle b/solr/core/build.gradle
new file mode 100644
index 0000000..77d2a2e
--- /dev/null
+++ b/solr/core/build.gradle
@@ -0,0 +1,154 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'solr-core'
+
+dependencies {
+
+ implementationTran project(':solr:solrj')
+
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+ implementationTran project(':lucene:analysis:analyzers-common')
+ implementationTran project(':lucene:analysis:analyzers-phonetic')
+ implementationTran project(':lucene:analysis:analyzers-kuromoji')
+ implementationTran project(':lucene:analysis:analyzers-nori')
+ implementationTran project(':lucene:suggest')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:highlighter')
+ implementationTran project(':lucene:spatial-extras')
+ implementationTran project(':lucene:grouping')
+ implementationTran project(':lucene:classification')
+ implementationTran project(':lucene:expressions')
+ implementationTran project(':lucene:sandbox')
+ implementationTran project(':lucene:queryparser')
+ implementationTran project(':lucene:misc')
+ implementationTran project(':lucene:join')
+
+ compileOnly 'javax.servlet:javax.servlet-api'
+
+ implementation 'org.eclipse.jetty:jetty-servlet'
+ implementation 'org.eclipse.jetty:jetty-server'
+
+ implementation 'org.apache.httpcomponents:httpclient'
+ implementation 'org.apache.httpcomponents:httpmime'
+ implementation 'org.apache.httpcomponents:httpcore'
+
+ // TODO: this is not good
+ implementation 'org.apache.logging.log4j:log4j-slf4j-impl'
+
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'org.slf4j:jcl-over-slf4j'
+ implementation 'org.codehaus.woodstox:stax2-api'
+ implementation 'org.codehaus.woodstox:woodstox-core-asl'
+ implementation 'org.apache.zookeeper:zookeeper'
+ implementation 'org.ow2.asm:asm'
+ implementation 'org.ow2.asm:asm-commons'
+ implementation 'io.dropwizard.metrics:metrics-core'
+ implementation 'io.dropwizard.metrics:metrics-graphite'
+ implementation 'io.dropwizard.metrics:metrics-jvm'
+ implementation 'io.dropwizard.metrics:metrics-jmx'
+ implementation 'org.noggit:noggit'
+ implementation 'commons-codec:commons-codec'
+ implementation 'commons-io:commons-io'
+ implementation 'org.apache.commons:commons-exec'
+ implementation 'commons-fileupload:commons-fileupload'
+ implementation 'commons-cli:commons-cli'
+ implementation 'org.apache.commons:commons-text'
+ implementation 'com.google.guava:guava'
+ implementation 'org.locationtech.spatial4j:spatial4j'
+ implementation 'org.apache.commons:commons-math3'
+ implementation 'org.ow2.asm:asm'
+
+ implementation 'org.restlet.jee:org.restlet'
+ implementation 'org.restlet.jee:org.restlet.ext.servlet'
+ implementation 'com.carrotsearch:hppc'
+
+ implementation 'org.apache.logging.log4j:log4j-api'
+ implementation 'org.apache.logging.log4j:log4j-core'
+ implementation 'org.apache.logging.log4j:log4j-1.2-api'
+ implementation 'org.slf4j:jcl-over-slf4j'
+
+ implementation 'com.fasterxml.jackson.core:jackson-core'
+ implementation 'com.fasterxml.jackson.core:jackson-databind'
+ implementation 'com.fasterxml.jackson.core:jackson-annotations'
+ implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile'
+ implementation 'org.apache.hadoop:hadoop-auth'
+ implementation 'org.apache.hadoop:hadoop-common'
+ implementation 'org.apache.hadoop:hadoop-hdfs-client'
+ implementation 'org.apache.hadoop:hadoop-annotations'
+ implementation 'org.apache.commons:commons-configuration2'
+ implementation 'commons-collections:commons-collections'
+ implementation 'commons-beanutils:commons-beanutils'
+ implementation 'com.github.ben-manes.caffeine:caffeine'
+ implementation 'com.google.re2j:re2j'
+ implementation 'org.apache.commons:commons-lang3'
+ implementation 'org.apache.htrace:htrace-core4'
+ implementation 'org.apache.curator:curator-framework'
+ implementation 'org.apache.curator:curator-client'
+ implementation 'org.apache.curator:curator-recipes'
+ implementation 'org.apache.kerby:kerb-core'
+ implementation 'org.apache.kerby:kerb-util'
+ implementation 'org.apache.kerby:kerby-asn1'
+ implementation 'org.apache.kerby:kerby-pkix'
+
+ implementation 'com.tdunning:t-digest:*'
+ implementation 'org.apache.calcite:calcite-core'
+ implementation 'org.apache.calcite:calcite-linq4j'
+ implementation 'org.apache.calcite.avatica:avatica-core'
+ implementation 'org.apache.commons:commons-lang3'
+ implementation 'net.hydromatic:eigenbase-properties'
+ implementation 'org.codehaus.janino:janino'
+ implementation 'org.codehaus.janino:commons-compiler'
+ implementation 'com.google.protobuf:protobuf-java'
+ implementation 'com.jayway.jsonpath:json-path'
+ implementation 'org.rrd4j:rrd4j'
+ implementation 'org.bitbucket.b_c:jose4j'
+
+ implementation 'org.eclipse.jetty:jetty-alpn-server'
+ implementation 'org.eclipse.jetty.http2:http2-server'
+ implementation 'org.eclipse.jetty.http2:http2-client'
+ implementation 'org.eclipse.jetty.http2:http2-http-client-transport'
+ implementation 'org.eclipse.jetty.http2:http2-common'
+ implementation 'org.eclipse.jetty.http2:http2-hpack'
+ implementation 'org.eclipse.jetty:jetty-client'
+ implementation 'org.eclipse.jetty:jetty-util'
+ implementation 'org.eclipse.jetty:jetty-http'
+ implementation 'org.eclipse.jetty:jetty-io'
+ implementation 'org.eclipse.jetty:jetty-xml'
+ implementation 'org.eclipse.jetty:jetty-alpn-java-client'
+ implementation 'org.eclipse.jetty:jetty-alpn-client'
+
+ testRuntimeOnly 'com.lmax:disruptor'
+
+ testImplementation 'org.eclipse.jetty:jetty-webapp'
+ testImplementation 'com.sun.jersey:jersey-servlet:1.19.4'
+ testImplementation 'org.apache.hadoop:hadoop-minicluster'
+ testImplementation 'org.apache.hadoop:hadoop-common::tests'
+ testImplementation 'org.apache.hadoop:hadoop-hdfs'
+ testImplementation 'org.apache.hadoop:hadoop-hdfs::tests'
+ testImplementation 'commons-logging:commons-logging'
+ testImplementation 'io.netty:netty-all'
+ testImplementation 'org.apache.commons:commons-text'
+ testImplementation 'org.apache.hadoop:hadoop-minikdc'
+ testImplementation 'org.apache.kerby:kerby-config'
+ testImplementation 'org.apache.kerby:kerb-client'
+ testImplementation 'org.apache.kerby:kerb-common'
+ testImplementation 'org.apache.kerby:kerb-crypto'
+ testImplementation 'org.apache.kerby:kerb-identity'
+ testImplementation 'org.apache.kerby:kerb-server'
+ testImplementation 'org.apache.kerby:kerb-simplekdc'
+ testImplementation 'org.apache.kerby:kerby-util'
+ testImplementation 'org.apache.kerby:kerb-admin'
+ testImplementation 'org.apache.kerby:kerby-kdc'
+ testImplementation 'org.mockito:mockito-core'
+ testImplementation 'net.bytebuddy:byte-buddy'
+ testImplementation 'org.objenesis:objenesis'
+
+ testImplementationTran project(path: ':lucene:backward-codecs', configuration: 'testOutput')
+ testImplementationTran project(path: ':lucene:queryparser', configuration: 'testOutput')
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':solr:solr-test-framework')
+ testImplementationTran project(':lucene:analysis:analyzers-icu')
+ testImplementationTran project(':solr:contrib:analysis-extras')
+
+}
\ No newline at end of file
diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
index a67ce57..386757b 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
@@ -19,13 +19,13 @@ package org.apache.solr.cloud;
import java.io.Closeable;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
-import org.apache.hadoop.fs.Path;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.solr.cloud.overseer.OverseerAction;
import org.apache.solr.common.SolrException;
@@ -136,7 +136,7 @@ class ShardLeaderElectionContextBase extends ElectionContext {
this.shardId = shardId;
this.collection = collection;
- String parent = new Path(leaderPath).getParent().toString();
+ String parent = Paths.get(leaderPath).getParent().toString();
ZkCmdExecutor zcmd = new ZkCmdExecutor(30000);
// only if /collections/{collection} exists already do we succeed in creating this path
log.info("make sure parent is created {}", parent);
@@ -162,7 +162,7 @@ class ShardLeaderElectionContextBase extends ElectionContext {
// version whenever a leader registers.
log.debug("Removing leader registration node on cancel: {} {}", leaderPath, leaderZkNodeParentVersion);
List<Op> ops = new ArrayList<>(2);
- ops.add(Op.check(new Path(leaderPath).getParent().toString(), leaderZkNodeParentVersion));
+ ops.add(Op.check(Paths.get(leaderPath).getParent().toString(), leaderZkNodeParentVersion));
ops.add(Op.delete(leaderPath, -1));
zkClient.multi(ops, true);
} catch (KeeperException.NoNodeException nne) {
@@ -188,7 +188,7 @@ class ShardLeaderElectionContextBase extends ElectionContext {
throws KeeperException, InterruptedException, IOException {
// register as leader - if an ephemeral is already there, wait to see if it goes away
- String parent = new Path(leaderPath).getParent().toString();
+ String parent = Paths.get(leaderPath).getParent().toString();
try {
RetryUtil.retryOnThrowable(NodeExistsException.class, 60000, 5000, () -> {
synchronized (lock) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java
index f66029b..9fc8198 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java
@@ -22,6 +22,8 @@ import java.io.IOException;
import com.carrotsearch.randomizedtesting.annotations.Nightly;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
@@ -40,6 +42,8 @@ import org.junit.BeforeClass;
import org.junit.Test;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@Nightly // test is too long for non nightly
diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java
index 8204027..0a4c7cc 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java
@@ -21,7 +21,9 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TimeUnits;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import org.junit.Test;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@TimeoutSuite(millis = TimeUnits.HOUR)
diff --git a/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java b/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java
index b362bfa..ac636f0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java
@@ -22,6 +22,8 @@ import java.lang.invoke.MethodHandles;
import java.nio.charset.Charset;
import org.apache.lucene.util.Constants;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.cloud.DefaultZkACLProvider;
import org.apache.solr.common.cloud.SaslZkACLProvider;
@@ -40,6 +42,8 @@ import org.slf4j.LoggerFactory;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadZookeeperThreadsFilter.class
})
public class SaslZkACLProviderTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
index 735cc20..1e0a7be 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
@@ -34,8 +34,11 @@ import java.util.stream.Collectors;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
import com.carrotsearch.randomizedtesting.annotations.Nightly;
+
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
@@ -75,6 +78,8 @@ import org.slf4j.LoggerFactory;
@Slow
@SuppressSSL
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@LogLevel("org.apache.solr.cloud.autoscaling=DEBUG;org.apache.solr.cloud.*=DEBUG")
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
index 9ceb826..9d03331 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
@@ -25,6 +25,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
import org.apache.commons.io.FileUtils;
import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
@@ -39,6 +41,8 @@ import org.slf4j.LoggerFactory;
* Test 5 nodes Solr cluster with Kerberos plugin enabled.
*/
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadZookeeperThreadsFilter.class // Zookeeper login leaks TGT renewal threads
})
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java
index 94b3102..614fd8b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java
@@ -21,7 +21,9 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TimeUnits;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -30,6 +32,8 @@ import org.junit.BeforeClass;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@TimeoutSuite(millis = TimeUnits.HOUR)
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java
index 0d876db..a4134ce 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java
@@ -26,6 +26,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@@ -36,6 +37,7 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
@@ -63,6 +65,8 @@ import static org.apache.solr.core.backup.BackupManager.ZK_STATE_DIR;
* This class implements the tests for HDFS integration for Solr backup/restore capability.
*/
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12866")
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java
index 8d8ef9c..7600bf4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java
@@ -21,7 +21,9 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TimeUnits;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -30,6 +32,8 @@ import org.junit.BeforeClass;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@TimeoutSuite(millis = TimeUnits.HOUR)
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java
index 6a93042..cf43b6a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java
@@ -19,6 +19,8 @@ package org.apache.solr.cloud.hdfs;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
@@ -32,6 +34,8 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HDFSCollectionsAPITest extends SolrCloudTestCase {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
index 0c7081b..599ecbb 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.BasicDistributedZk2Test;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// commented 20-July-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 26-Mar-2018
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
index 192e7ee..bc172b3 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.BasicDistributedZkTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsBasicDistributedZkTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java
index 3bdf77a..94ace06 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.ChaosMonkeyNothingIsSafeTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsChaosMonkeyNothingIsSafeTest extends ChaosMonkeyNothingIsSafeTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
index ab5eb33..402d5cf 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.ChaosMonkeySafeLeaderTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsChaosMonkeySafeLeaderTest extends ChaosMonkeySafeLeaderTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java
index b793268..566a654 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java
@@ -20,7 +20,9 @@ import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.BasicDistributedZkTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java
index ad8556c..84aee37 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java
@@ -26,6 +26,8 @@ import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.apache.solr.util.FSHDFSUtils;
@@ -39,6 +41,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsRecoverLeaseTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
index 6e6bd3d..18607ec 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
@@ -18,9 +18,11 @@ package org.apache.solr.cloud.hdfs;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.BadApple;
import org.apache.lucene.util.LuceneTestCase.Nightly;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.RecoveryZkTest;
import org.apache.solr.common.cloud.ZkConfigManager;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -31,6 +33,8 @@ import org.junit.BeforeClass;
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsRecoveryZkTest extends RecoveryZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java
index 64af109..ebc6068 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java
@@ -17,7 +17,9 @@
package org.apache.solr.cloud.hdfs;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.RestartWhileUpdatingTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -29,6 +31,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsRestartWhileUpdatingTest extends RestartWhileUpdatingTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
index 4999847..785ae6f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.SyncSliceTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java
index f250d53..2e04ee0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java
@@ -23,6 +23,8 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -32,6 +34,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsThreadLeakTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java
index ff19b09..42cfcaa 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java
@@ -17,7 +17,9 @@
package org.apache.solr.cloud.hdfs;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.TlogReplayBufferedWhileIndexingTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -29,6 +31,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsTlogReplayBufferedWhileIndexingTest extends TlogReplayBufferedWhileIndexingTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
index 0d3d23e..5944097 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
@@ -17,7 +17,9 @@
package org.apache.solr.cloud.hdfs;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.UnloadDistributedZkTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -29,6 +31,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsUnloadDistributedZkTest extends UnloadDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
index 1f31603..6086c59 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
@@ -31,8 +31,10 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.NRTCachingDirectory;
import org.apache.lucene.util.IOUtils;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Nightly;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
@@ -55,6 +57,8 @@ import org.junit.Test;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsWriteToMultipleCollectionsTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
index 04f9387..a12d4b9 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
@@ -24,7 +24,9 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
@@ -56,6 +58,8 @@ import java.util.concurrent.TimeUnit;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class StressHdfsTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java
index b2794df..88c61cd 100644
--- a/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java
@@ -34,7 +34,9 @@ import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.store.NoLockFactory;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TestUtil;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.common.util.NamedList;
@@ -52,6 +54,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsDirectoryFactoryTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java
index f51c4ac..9774777 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java
@@ -33,7 +33,9 @@ import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TestUtil;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
@@ -57,6 +59,8 @@ import org.slf4j.LoggerFactory;
import static org.apache.solr.common.cloud.ZkStateReader.BASE_URL_PROP;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@SolrTestCaseJ4.SuppressSSL // Currently unknown why SSL does not work with this test
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHistoryHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHistoryHandlerTest.java
index 4c058e5..2c03a3a 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHistoryHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHistoryHandlerTest.java
@@ -113,7 +113,7 @@ public class MetricsHistoryHandlerTest extends SolrCloudTestCase {
@Test
//Commented 14-Oct-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 15-Sep-2018
public void testBasic() throws Exception {
- timeSource.sleep(10000);
+ timeSource.sleep(15000);
List<Pair<String, Long>> list = handler.getFactory().list(100);
// solr.jvm, solr.node, solr.collection..system
assertEquals(list.toString(), 3, list.size());
diff --git a/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java b/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java
index 7a7ec78..64724b9 100644
--- a/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java
+++ b/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java
@@ -24,6 +24,8 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.index.BaseTestCheckIndex;
import org.apache.lucene.store.Directory;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
@@ -41,6 +43,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018
diff --git a/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java b/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
index e19895e..d0bd271 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
@@ -39,6 +39,8 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.common.util.IOUtils;
@@ -60,6 +62,8 @@ import org.junit.Test;
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// TODO: longer term this should be combined with TestRecovery somehow ??
diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
index cf1039a..eefd623 100644
--- a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
+++ b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
@@ -29,6 +29,8 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -41,6 +43,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsDirectoryTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
index 7a23240..3d8f91e 100644
--- a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
@@ -23,6 +23,8 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.store.Lock;
import org.apache.lucene.store.LockObtainFailedException;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -34,6 +36,8 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@Nightly
diff --git a/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java b/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java
index 5ba7f58..c2c0637 100644
--- a/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java
+++ b/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java
@@ -23,6 +23,8 @@ import java.net.URISyntaxException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.common.util.IOUtils;
@@ -35,6 +37,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class TestHdfsUpdateLog extends SolrTestCaseJ4 {
diff --git a/solr/example/example-DIH/build.gradle b/solr/example/example-DIH/build.gradle
new file mode 100644
index 0000000..9cd8074
--- /dev/null
+++ b/solr/example/example-DIH/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'java-library'
+
+dependencies {
+ implementation 'org.hsqldb:hsqldb'
+ implementation 'org.apache.derby:derby'
+}
\ No newline at end of file
diff --git a/solr/server/build.gradle b/solr/server/build.gradle
new file mode 100644
index 0000000..3e08fc0
--- /dev/null
+++ b/solr/server/build.gradle
@@ -0,0 +1,40 @@
+apply plugin: 'java'
+
+dependencies {
+
+
+ implementation "org.apache.logging.log4j:log4j-1.2-api"
+ implementation "org.apache.logging.log4j:log4j-api"
+ implementation "org.apache.logging.log4j:log4j-core"
+ implementation "org.apache.logging.log4j:log4j-slf4j-impl"
+
+ implementation "com.lmax:disruptor"
+ implementation "org.slf4j:jcl-over-slf4j"
+ implementation "org.slf4j:jul-to-slf4j"
+ implementation "org.slf4j:slf4j-api"
+
+ implementation 'io.dropwizard.metrics:metrics-core'
+ //implementation 'io.dropwizard.metrics:metrics-ganglia'
+ implementation 'io.dropwizard.metrics:metrics-graphite'
+ implementation 'io.dropwizard.metrics:metrics-jetty9'
+ implementation 'io.dropwizard.metrics:metrics-jvm'
+ //implementation 'info.ganglia.gmetric4j:gmetric4j'
+
+ implementation 'org.eclipse.jetty:jetty-continuation'
+ implementation 'org.eclipse.jetty:jetty-deploy'
+ implementation 'org.eclipse.jetty:jetty-http'
+ //jetty_io: "org.eclipse.jetty:jetty-io:$jetty_version",
+ implementation 'org.eclipse.jetty:jetty-jmx'
+ implementation 'org.eclipse.jetty:jetty-rewrite'
+ implementation 'org.eclipse.jetty:jetty-security'
+ implementation 'org.eclipse.jetty:jetty-server'
+ implementation 'org.eclipse.jetty:jetty-servlet'
+ implementation 'org.eclipse.jetty:jetty-servlets'
+ //jetty_start: "org.eclipse.jetty:jetty-start:$jetty_version",
+ implementation 'org.eclipse.jetty:jetty-util'
+ implementation 'org.eclipse.jetty:jetty-webapp'
+ implementation 'org.eclipse.jetty:jetty-xml'
+
+ implementation 'javax.servlet:javax.servlet-api'
+
+}
\ No newline at end of file
diff --git a/solr/server/etc/jetty.xml b/solr/server/etc/jetty.xml
index 1f6de77..3bceff1 100644
--- a/solr/server/etc/jetty.xml
+++ b/solr/server/etc/jetty.xml
@@ -136,13 +136,6 @@
</New>
</Set>
</New>
-
- <!-- =========================================================== -->
- <!-- Set handler Collection Structure -->
- <!-- =========================================================== -->
- <Set name="handler">
- <Ref id="RewriteHandler"/>
- </Set>
<!-- =========================================================== -->
<!-- Configure Request Log -->
diff --git a/solr/solrj/build.gradle b/solr/solrj/build.gradle
new file mode 100644
index 0000000..97b6e50
--- /dev/null
+++ b/solr/solrj/build.gradle
@@ -0,0 +1,52 @@
+plugins {
+ id 'java-library'
+ id 'eclipse'
+}
+
+repositories{
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'org.apache.zookeeper:zookeeper'
+ implementation 'org.apache.httpcomponents:httpclient'
+ implementation 'org.apache.httpcomponents:httpmime'
+ implementation 'org.apache.httpcomponents:httpcore'
+ implementation 'commons-io:commons-io'
+ implementation 'org.apache.commons:commons-math3'
+
+ implementation 'org.noggit:noggit'
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'org.slf4j:jcl-over-slf4j'
+ implementation 'org.eclipse.jetty.http2:http2-client'
+ implementation 'org.eclipse.jetty.http2:http2-http-client-transport'
+ implementation 'org.eclipse.jetty.http2:http2-common'
+ implementation 'org.eclipse.jetty.http2:http2-hpack'
+ implementation 'org.eclipse.jetty:jetty-client'
+ implementation 'org.eclipse.jetty:jetty-util'
+ implementation 'org.eclipse.jetty:jetty-http'
+ implementation 'commons-codec:commons-codec'
+
+ testImplementation 'org.eclipse.jetty:jetty-servlet'
+ testImplementation 'io.dropwizard.metrics:metrics-core'
+ testImplementation 'org.restlet.jee:org.restlet'
+ testImplementation 'org.restlet.jee:org.restlet.ext.servlet'
+ testImplementation 'org.eclipse.jetty:jetty-webapp'
+ testImplementation 'org.eclipse.jetty:jetty-server'
+ testImplementation 'org.eclipse.jetty:jetty-xml'
+ runtimeOnly 'org.eclipse.jetty:jetty-security'
+ testImplementation 'commons-collections:commons-collections'
+ testImplementation 'com.google.guava:guava'
+ testImplementation 'org.apache.commons:commons-compress'
+ testImplementation 'org.mockito:mockito-core'
+ testImplementation 'net.bytebuddy:byte-buddy'
+ testImplementation 'org.objenesis:objenesis'
+ testImplementation 'org.apache.commons:commons-lang3'
+ testImplementation 'javax.servlet:javax.servlet-api'
+ testImplementationTran project(':solr:solr-core')
+ testImplementationTran project(':lucene:lucene-core')
+ testImplementationTran project(':solr:solr-test-framework')
+ testImplementationTran project(':lucene:lucene-test-framework')
+ testImplementationTran project(':lucene:analysis:analyzers-common')
+ testImplementationTran project(':solr:example:example-DIH')
+}
\ No newline at end of file
diff --git a/solr/test-framework/build.gradle b/solr/test-framework/build.gradle
new file mode 100644
index 0000000..1ae06b1
--- /dev/null
+++ b/solr/test-framework/build.gradle
@@ -0,0 +1,61 @@
+apply plugin: 'java-library'
+
+archivesBaseName = 'solr-test-framework'
+
+dependencies {
+ runtimeOnly "org.slf4j:jcl-over-slf4j"
+
+ implementationTran project(':lucene:lucene-test-framework')
+ implementationTran project(':solr:solrj')
+ implementationTran project(':solr:solr-core')
+ implementationTran project(':lucene:lucene-core')
+ implementationTran project(':lucene:codecs')
+ implementationTran project(':lucene:queries')
+ implementationTran project(':lucene:analysis:analyzers-common')
+
+ implementation 'junit:junit'
+ implementation 'org.apache.httpcomponents:httpclient'
+ implementation 'org.apache.httpcomponents:httpcore'
+ implementation 'org.apache.httpcomponents:httpmime'
+ implementation 'org.slf4j:slf4j-api'
+ implementation 'org.apache.logging.log4j:log4j-api'
+ implementation 'org.noggit:noggit'
+ implementation 'org.apache.zookeeper:zookeeper'
+ implementation 'commons-io:commons-io'
+ implementation 'org.eclipse.jetty:jetty-util'
+ implementation 'org.apache.logging.log4j:log4j-core'
+ implementation 'javax.servlet:javax.servlet-api'
+ implementation 'io.dropwizard.metrics:metrics-core'
+ implementation 'org.bitbucket.b_c:jose4j'
+ implementation 'com.google.guava:guava'
+ implementation 'org.eclipse.jetty:jetty-server'
+ implementation 'org.eclipse.jetty:jetty-servlet'
+ implementation 'io.dropwizard.metrics:metrics-jetty9'
+
+ testImplementation 'org.eclipse.jetty:jetty-http'
+ testImplementation 'org.eclipse.jetty:jetty-io'
+ testImplementation 'org.eclipse.jetty:jetty-security'
+ testImplementation 'org.eclipse.jetty:jetty-client'
+ testImplementation 'org.eclipse.jetty:jetty-xml'
+ testImplementation 'org.apache.httpcomponents:httpclient'
+ testImplementation 'org.apache.httpcomponents:httpcore'
+ testImplementation 'io.dropwizard.metrics:metrics-core'
+ testImplementation 'io.dropwizard.metrics:metrics-jmx'
+ testImplementation 'org.rrd4j:rrd4j'
+ testImplementation 'io.dropwizard.metrics:metrics-jvm'
+
+ testImplementation 'org.eclipse.jetty.http2:http2-client'
+ testImplementation 'org.eclipse.jetty.http2:http2-http-client-transport'
+ testImplementation 'org.eclipse.jetty.http2:http2-common'
+ testImplementation 'org.eclipse.jetty.http2:http2-hpack'
+
+ testImplementation 'org.apache.hadoop:hadoop-minicluster'
+ testImplementation 'org.apache.hadoop:hadoop-common'
+ testImplementation 'org.apache.hadoop:hadoop-common::tests'
+ testImplementation 'org.apache.hadoop:hadoop-hdfs'
+ testImplementation 'org.apache.hadoop:hadoop-hdfs::tests'
+
+ testImplementation 'commons-fileupload:commons-fileupload'
+ testImplementation 'org.apache.commons:commons-lang3'
+
+}
\ No newline at end of file
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java b/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java
index 48c1482..3fce31d 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java
@@ -59,6 +59,11 @@ public class SolrIgnoredThreadsFilter implements ThreadFilter {
if (threadName.startsWith("Image Fetcher")) {
return true;
}
+
+ if (threadName.startsWith("Log4j2-TF-2-AsyncLoggerConfig")) {
+ return true;
+ }
+
return false;
}
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index 4b50a1a..e3d4319 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -25,6 +25,8 @@ import org.junit.AfterClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
+
/**
* All Solr test cases should derive from this class eventually. This is originally a result of async logging, see:
* SOLR-12055 and associated. To enable async logging, we must gracefully shut down logging. Many Solr tests subclass
@@ -36,7 +38,7 @@ import org.slf4j.LoggerFactory;
* Other changes that should affect every Solr test case may go here if they don't require the added capabilities in
* SolrTestCaseJ4.
*/
-
+@ThreadLeakFilters(defaultFilters = true, filters = { SolrIgnoredThreadsFilter.class })
public class SolrTestCase extends LuceneTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/versions.lock b/versions.lock
new file mode 100644
index 0000000..a65e0e8
--- /dev/null
+++ b/versions.lock
@@ -0,0 +1,168 @@
+# Run ./gradlew --write-locks to regenerate this file
+com.adobe.xmp:xmpcore:5.1.3 (1 constraints: 0b050a36)
+com.carrotsearch:hppc:0.8.1 (1 constraints: 0b050436)
+com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.2 (1 constraints: a908587e)
+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.9 (1 constraints: 0d05fe35)
+com.fasterxml.jackson.core:jackson-annotations:2.9.8 (1 constraints: b1086c7e)
+com.fasterxml.jackson.core:jackson-core:2.9.8 (1 constraints: b1086c7e)
+com.fasterxml.jackson.core:jackson-databind:2.9.8 (1 constraints: b1086c7e)
+com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.9.8 (1 constraints: b1086c7e)
+com.github.ben-manes.caffeine:caffeine:2.4.0 (1 constraints: 08050136)
+com.github.virtuald:curvesapi:1.04 (1 constraints: d904f330)
+com.google.guava:guava:25.1-jre (1 constraints: 4a06b047)
+com.google.protobuf:protobuf-java:3.7.1 (1 constraints: 0d051036)
+com.google.re2j:re2j:1.2 (1 constraints: a7041c2c)
+com.googlecode.javaewah:JavaEWAH:1.1.6 (1 constraints: 480e7e50)
+com.googlecode.juniversalchardet:juniversalchardet:1.0.3 (1 constraints: 0605f335)
+com.googlecode.mp4parser:isoparser:1.1.22 (1 constraints: 38052d3b)
+com.healthmarketscience.jackcess:jackcess:2.1.12 (1 constraints: 3805313b)
+com.healthmarketscience.jackcess:jackcess-encrypt:2.1.4 (1 constraints: 0905fc35)
+com.ibm.icu:icu4j:62.1 (1 constraints: dd040c31)
+com.jayway.jsonpath:json-path:2.4.0 (1 constraints: 08050136)
+com.jcraft:jsch:0.1.53 (1 constraints: 790ef15e)
+com.pff:java-libpst:0.8.1 (1 constraints: 0b050436)
+com.rometools:rome:1.5.1 (1 constraints: a508487e)
+com.rometools:rome-utils:1.5.1 (1 constraints: a508487e)
+com.sun.mail:gimap:1.5.1 (1 constraints: a508487e)
+com.sun.mail:javax.mail:1.5.1 (1 constraints: a508487e)
+com.tdunning:t-digest:3.1 (1 constraints: 16064448)
+commons-beanutils:commons-beanutils:1.9.3 (1 constraints: 0f050e36)
+commons-cli:commons-cli:1.2 (2 constraints: 161107d9)
+commons-codec:commons-codec:1.11 (2 constraints: c7145087)
+commons-collections:commons-collections:3.2.2 (2 constraints: d911ad14)
+commons-fileupload:commons-fileupload:1.3.3 (1 constraints: 0905fc35)
+commons-io:commons-io:2.5 (2 constraints: 1b11a4d9)
+commons-lang:commons-lang:2.6 (1 constraints: 750cf400)
+commons-logging:commons-logging:1.2 (2 constraints: c8149e7f)
+de.l3s.boilerpipe:boilerpipe:1.1.0 (1 constraints: 0405f335)
+de.thetaphi:forbiddenapis:2.6 (1 constraints: ac04232c)
+io.dropwizard.metrics:metrics-core:4.0.5 (1 constraints: a7084e7e)
+io.dropwizard.metrics:metrics-graphite:4.0.5 (1 constraints: a7084e7e)
+io.dropwizard.metrics:metrics-jetty9:4.0.5 (1 constraints: a7084e7e)
+io.dropwizard.metrics:metrics-jmx:4.0.5 (1 constraints: a7084e7e)
+io.dropwizard.metrics:metrics-jvm:4.0.5 (1 constraints: a7084e7e)
+io.prometheus:simpleclient:0.2.0 (1 constraints: a008347e)
+io.prometheus:simpleclient_common:0.2.0 (1 constraints: a008347e)
+io.prometheus:simpleclient_httpserver:0.2.0 (1 constraints: a008347e)
+io.sgr:s2-geometry-library-java:1.0.0 (1 constraints: 0305f035)
+javax.activation:activation:1.1.1 (1 constraints: 0505f435)
+javax.servlet:javax.servlet-api:3.1.0 (1 constraints: 0605fd35)
+junit:junit:4.12 (1 constraints: db04ff30)
+net.arnx:jsonic:1.2.7 (1 constraints: 0c05fd35)
+net.hydromatic:eigenbase-properties:1.1.5 (1 constraints: 0905f835)
+net.sourceforge.argparse4j:argparse4j:0.8.1 (1 constraints: 0b050436)
+net.sourceforge.nekohtml:nekohtml:1.9.17 (1 constraints: 4405503b)
+net.thisptr:jackson-jq:0.0.8 (1 constraints: 0a05f335)
+org.antlr:antlr4-runtime:4.5.1-1 (1 constraints: 6a05b240)
+org.apache.calcite:calcite-core:1.18.0 (1 constraints: d808db86)
+org.apache.calcite:calcite-linq4j:1.18.0 (1 constraints: d808db86)
+org.apache.calcite.avatica:avatica-core:1.13.0 (1 constraints: 3705323b)
+org.apache.commons:commons-collections4:4.2 (1 constraints: aa04252c)
+org.apache.commons:commons-compress:1.18 (2 constraints: 5011dae5)
+org.apache.commons:commons-configuration2:2.1.1 (1 constraints: 0605f935)
+org.apache.commons:commons-exec:1.3 (1 constraints: a8041d2c)
+org.apache.commons:commons-lang3:3.6 (1 constraints: ad04262c)
+org.apache.commons:commons-math3:3.6.1 (1 constraints: 0c050d36)
+org.apache.commons:commons-text:1.6 (1 constraints: ab04202c)
+org.apache.curator:curator-client:2.13.0 (1 constraints: d408ce86)
+org.apache.curator:curator-framework:2.13.0 (1 constraints: d408ce86)
+org.apache.curator:curator-recipes:2.13.0 (1 constraints: d408ce86)
+org.apache.derby:derby:10.9.1.0 (1 constraints: 9b054946)
+org.apache.hadoop:hadoop-annotations:3.2.0 (1 constraints: a308467e)
+org.apache.hadoop:hadoop-auth:3.2.0 (1 constraints: a308467e)
+org.apache.hadoop:hadoop-common:3.2.0 (1 constraints: a308467e)
+org.apache.hadoop:hadoop-hdfs-client:3.2.0 (1 constraints: a308467e)
+org.apache.htrace:htrace-core4:4.1.0-incubating (1 constraints: 58090086)
+org.apache.httpcomponents:httpclient:4.5.6 (2 constraints: 5d13565b)
+org.apache.httpcomponents:httpcore:4.4.10 (2 constraints: 9015d5cd)
+org.apache.httpcomponents:httpmime:4.5.6 (1 constraints: 11051436)
+org.apache.james:apache-mime4j-core:0.8.2 (1 constraints: a808507e)
+org.apache.james:apache-mime4j-dom:0.8.2 (1 constraints: a808507e)
+org.apache.kerby:kerb-core:1.0.1 (1 constraints: a008347e)
+org.apache.kerby:kerb-util:1.0.1 (1 constraints: a008347e)
+org.apache.kerby:kerby-asn1:1.0.1 (1 constraints: a008347e)
+org.apache.kerby:kerby-pkix:1.0.1 (1 constraints: a008347e)
+org.apache.logging.log4j:log4j-1.2-api:2.11.2 (1 constraints: d408ca86)
+org.apache.logging.log4j:log4j-api:2.11.2 (1 constraints: d408ca86)
+org.apache.logging.log4j:log4j-core:2.11.2 (1 constraints: d408ca86)
+org.apache.logging.log4j:log4j-slf4j-impl:2.11.2 (1 constraints: d408ca86)
+org.apache.opennlp:opennlp-tools:1.9.1 (1 constraints: 0d050c36)
+org.apache.pdfbox:fontbox:2.0.12 (1 constraints: d308c286)
+org.apache.pdfbox:jempbox:1.8.16 (1 constraints: 42054b3b)
+org.apache.pdfbox:pdfbox:2.0.12 (1 constraints: d308c286)
+org.apache.pdfbox:pdfbox-tools:2.0.12 (1 constraints: d308c286)
+org.apache.poi:poi:4.0.0 (1 constraints: a208447e)
+org.apache.poi:poi-ooxml:4.0.0 (1 constraints: a208447e)
+org.apache.poi:poi-ooxml-schemas:4.0.0 (1 constraints: a208447e)
+org.apache.poi:poi-scratchpad:4.0.0 (1 constraints: a208447e)
+org.apache.rat:apache-rat:0.11 (1 constraints: d604ee30)
+org.apache.rat:apache-rat-core:0.11 (2 constraints: e417c98c)
+org.apache.rat:apache-rat-tasks:0.11 (1 constraints: c90af0ca)
+org.apache.tika:tika-core:1.19.1 (1 constraints: da08e186)
+org.apache.tika:tika-java7:1.19.1 (1 constraints: da08e186)
+org.apache.tika:tika-parsers:1.19.1 (1 constraints: da08e186)
+org.apache.tika:tika-xmp:1.19.1 (1 constraints: da08e186)
+org.apache.velocity:velocity-engine-core:2.1 (1 constraints: 4308c66d)
+org.apache.velocity.tools:velocity-tools-generic:3.0 (1 constraints: 4308c86d)
+org.apache.velocity.tools:velocity-tools-view:3.0 (1 constraints: 4308c86d)
+org.apache.velocity.tools:velocity-tools-view-jsp:3.0 (1 constraints: 4308c86d)
+org.apache.xmlbeans:xmlbeans:3.0.1 (1 constraints: 0605fb35)
+org.apache.zookeeper:zookeeper:3.4.14 (1 constraints: 3e05453b)
+org.aspectj:aspectjrt:1.8.0 (1 constraints: 0b050836)
+org.bitbucket.b_c:jose4j:0.6.5 (1 constraints: 0d050236)
+org.bouncycastle:bcmail-jdk15on:1.60 (1 constraints: 7708f675)
+org.bouncycastle:bcpkix-jdk15on:1.60 (1 constraints: 7708f675)
+org.bouncycastle:bcprov-jdk15on:1.60 (1 constraints: 7708f675)
+org.brotli:dec:0.1.2 (1 constraints: 0505f035)
+org.carrot2:morfologik-fsa:2.1.5 (1 constraints: a608467e)
+org.carrot2:morfologik-polish:2.1.5 (1 constraints: a608467e)
+org.carrot2:morfologik-stemming:2.1.5 (1 constraints: a608467e)
+org.ccil.cowan.tagsoup:tagsoup:1.2.1 (1 constraints: 0605f735)
+org.codehaus.janino:commons-compiler:3.0.9 (1 constraints: aa08507e)
+org.codehaus.janino:janino:3.0.9 (1 constraints: aa08507e)
+org.codehaus.woodstox:stax2-api:4.2 (1 constraints: aa04252c)
+org.codehaus.woodstox:woodstox-core-asl:4.4.1 (1 constraints: 0b050c36)
+org.eclipse.jetty:jetty-alpn-client:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-alpn-java-client:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-alpn-server:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-client:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-continuation:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-deploy:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-http:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-io:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-jmx:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-rewrite:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-security:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-server:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-servlet:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-servlets:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-util:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-webapp:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty:jetty-xml:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty.http2:http2-client:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty.http2:http2-common:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty.http2:http2-hpack:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty.http2:http2-http-client-transport:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jetty.http2:http2-server:9.4.14.v20181114 (1 constraints: 160b1cea)
+org.eclipse.jgit:org.eclipse.jgit:4.6.0.201612231935-r (1 constraints: 3c085c99)
+org.gagravarr:vorbis-java-core:0.8 (1 constraints: 4808cc6d)
+org.gagravarr:vorbis-java-tika:0.8 (1 constraints: 4808cc6d)
+org.hamcrest:hamcrest-all:1.3 (1 constraints: 4408c66d)
+org.hsqldb:hsqldb:2.4.0 (1 constraints: 08050136)
+org.jdom:jdom2:2.0.6 (1 constraints: 0a05fb35)
+org.locationtech.spatial4j:spatial4j:0.7 (1 constraints: ab041e2c)
+org.noggit:noggit:0.8 (1 constraints: ac041f2c)
+org.ow2.asm:asm:5.1 (1 constraints: 4608d26d)
+org.ow2.asm:asm-commons:5.1 (1 constraints: 4608d26d)
+org.restlet.jee:org.restlet:2.3.0 (1 constraints: a308447e)
+org.restlet.jee:org.restlet.ext.servlet:2.3.0 (1 constraints: a308447e)
+org.rrd4j:rrd4j:3.5 (1 constraints: ac04252c)
+org.slf4j:jcl-over-slf4j:1.7.24 (1 constraints: dc08e586)
+org.slf4j:jul-to-slf4j:1.7.24 (1 constraints: dc08e586)
+org.slf4j:slf4j-api:1.7.24 (2 constraints: 25177d4b)
+org.tallison:jmatio:1.5 (1 constraints: aa041f2c)
+org.tukaani:xz:1.8 (1 constraints: ad04222c)
+ua.net.nlp:morfologik-ukrainian-search:3.9.0 (1 constraints: 0e051536)
+xerces:xercesImpl:2.9.1 (1 constraints: 0e051136)
diff --git a/versions.props b/versions.props
new file mode 100644
index 0000000..b1c1855
--- /dev/null
+++ b/versions.props
@@ -0,0 +1,115 @@
+
+#javax.ws.rs:javax.ws.rs-api=2.1.1
+#org.apache.cxf:cxf-bundle-jaxrs=2.3.0
+
+com.adobe.xmp:xmpcore=5.1.3
+com.carrotsearch.randomizedtesting:*=2.7.2
+com.carrotsearch:hppc=0.8.1
+com.cybozu.labs:langdetect=1.1-20120112
+com.drewnoakes:metadata-extractor=2.11.0
+com.epam:parso=2.0.9
+com.fasterxml.jackson*:*=2.9.8
+com.fasterxml.woodstox:*=5.2.0
+com.github.ben-manes.caffeine:caffeine=2.4.0
+com.github.virtuald:curvesapi=1.04
+com.google.guava:guava=25.1-jre
+com.google.protobuf:protobuf-java=3.7.1
+com.google.re2j:re2j=1.2
+com.googlecode.juniversalchardet:juniversalchardet=1.0.3
+com.googlecode.mp4parser:isoparser=1.1.22
+com.healthmarketscience.jackcess:jackcess-encrypt=2.1.4
+com.healthmarketscience.jackcess:jackcess=2.1.12
+com.ibm.icu:icu4j=62.1
+com.jayway.jsonpath:json-path=2.4.0
+com.lmax:disruptor=3.4.0
+com.pff:java-libpst=0.8.1
+com.rometools:*=1.5.1
+com.sun.jersey:*=1.19
+com.sun.jersey:jersey-json=1.19.4
+com.sun.mail:*=1.5.1
+com.tdunning:t-digest=3.1
+commons-beanutils:commons-beanutils=1.9.3
+commons-cli:commons-cli=1.2
+commons-codec:commons-codec=1.11
+commons-collections:commons-collections=3.2.2
+commons-collections:commons-collections=3.2.2
+commons-fileupload:commons-fileupload=1.3.3
+commons-io:commons-io:2.5
+commons-logging:commons-logging=1.1.3
+de.l3s.boilerpipe:boilerpipe=1.1.0
+info.ganglia.gmetric4j:gmetric4j=1.0.7
+io.dropwizard.metrics:*=4.0.5
+io.netty:netty-all=4.0.52.Final
+io.prometheus:*=0.2.0
+io.sgr:s2-geometry-library-java=1.0.0
+javax.activation:activation=1.1.1
+javax.servlet:javax.servlet-api=3.1.0
+junit:junit=4.12
+net.arnx:jsonic=1.2.7
+net.bytebuddy:byte-buddy=1.9.3
+net.hydromatic:eigenbase-properties=1.1.5
+net.sourceforge.argparse4j:argparse4j=0.8.1
+net.sourceforge.nekohtml:nekohtml=1.9.17
+net.thisptr:jackson-jq=0.0.8
+org.antlr:antlr4-runtime=4.5.1-1
+org.apache.calcite.avatica:avatica-core=1.13.0
+org.apache.calcite:*=1.18.0
+org.apache.commons:commons-collections4:4.2
+org.apache.commons:commons-compress=1.18
+org.apache.commons:commons-configuration2=2.1.1
+org.apache.commons:commons-exec=1.3
+org.apache.commons:commons-lang3=3.6
+org.apache.commons:commons-math3=3.6.1
+org.apache.commons:commons-text=1.6
+org.apache.curator:*=2.13.0
+org.apache.derby:derby=10.9.1.0
+org.apache.hadoop:*=3.2.0
+org.apache.htrace:htrace-core4=4.1.0-incubating
+org.apache.httpcomponents:httpclient=4.5.6
+org.apache.httpcomponents:httpcore=4.4.10
+org.apache.httpcomponents:httpmime=4.5.6
+org.apache.james:*=0.8.2
+org.apache.kerby:*=1.0.1
+org.apache.logging.log4j:*=2.11.2
+org.apache.opennlp:opennlp-tools=1.9.1
+org.apache.pdfbox:*=2.0.12
+org.apache.pdfbox:jempbox=1.8.16
+org.apache.poi:*=4.0.0
+org.apache.tika:*=1.19.1
+org.apache.velocity.tools:*=3.0
+org.apache.velocity:*=2.1
+org.apache.xmlbeans:xmlbeans=3.0.1
+org.apache.zookeeper:zookeeper=3.4.14
+org.aspectj:aspectjrt=1.8.0
+org.bitbucket.b_c:jose4j=0.6.5
+org.bouncycastle:*=1.60
+org.brotli:dec=0.1.2
+org.carrot2.attributes:attributes-binder=1.3.3
+org.carrot2:morfologik-*=2.1.5
+org.carrot2.shaded:carrot2-guava=18.0
+org.carrot2:carrot2-mini=3.16.0
+org.ccil.cowan.tagsoup:tagsoup=1.2.1
+org.codehaus.janino:*=3.0.9
+org.codehaus.woodstox:stax2-api=3.1.4
+org.codehaus.woodstox:woodstox-core-asl=4.4.1
+org.eclipse.jetty.http2:*=9.4.14.v20181114
+org.eclipse.jetty:*=9.4.14.v20181114
+org.gagravarr:*=0.8
+org.hamcrest:*=1.3
+org.hsqldb:hsqldb=2.4.0
+org.jdom:jdom2=2.0.6
+org.locationtech.jts:jts-core=1.15.0
+org.locationtech.spatial4j:*=0.7
+org.mockito:mockito-core=2.23.4
+org.noggit:noggit=0.8
+org.objenesis:objenesis=2.6
+org.ow2.asm:*=5.1
+org.restlet.jee:*=2.3.0
+org.rrd4j:rrd4j=3.5
+org.simpleframework:simple-xml=2.7.1
+org.slf4j:*=1.7.24
+org.slf4j:*=1.7.24
+org.tallison:jmatio=1.5
+org.tukaani:xz=1.8
+ua.net.nlp:morfologik-ukrainian-search=3.9.0
+xerces:xercesImpl=2.9.1