From 5188ae062f42cb821e30458f083fff9820c044bb Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 1 Mar 2023 06:34:39 -0800 Subject: [PATCH] SOLR-16540 Fix eclipse import errors (#1357) --- .gitignore | 9 +++++---- gradle/documentation/render-javadoc.gradle | 1 + gradle/ide/eclipse.gradle | 2 ++ gradle/validation/rat-sources.gradle | 3 +++ .../validate-source-patterns.gradle | 1 + .../solr/handler/admin/api/package-info.java | 19 ------------------- ....java => HadoopSSLConfigurationsTest.java} | 2 +- .../solr/security/jwt/api/package-info.java | 19 ------------------- .../cloud/api/collections/package-info.java | 19 ------------------- 9 files changed, 13 insertions(+), 62 deletions(-) delete mode 100644 solr/core/src/test/org/apache/solr/handler/admin/api/package-info.java rename solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/{SSLConfigurationsTest.java => HadoopSSLConfigurationsTest.java} (98%) delete mode 100644 solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/api/package-info.java delete mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/api/collections/package-info.java diff --git a/.gitignore b/.gitignore index 18542bd60d4..44c1d680b1c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,9 +15,10 @@ out/ /dev-tools/missing-doclet/out/ # Eclipse -/.project -/.classpath -/.settings/ +**/.project +**/.classpath +**/.settings/ +/.metadata # Eclipse Gradle oddity **/bin/default/ @@ -41,4 +42,4 @@ __pycache__ # Ignore gradle wrapper gradle/wrapper/gradle-wrapper.jar -.gradletasknamecache \ No newline at end of file +.gradletasknamecache diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle index f39f53e53da..99275293657 100644 --- a/gradle/documentation/render-javadoc.gradle +++ b/gradle/documentation/render-javadoc.gradle @@ -160,6 +160,7 @@ configure(project(":solr:test-framework")) { "org.apache.solr", "org.apache.solr.analysis", "org.apache.solr.cloud", + "org.apache.solr.cloud.api.collections", "org.apache.solr.common.cloud", "org.apache.solr.core", "org.apache.solr.handler", diff --git a/gradle/ide/eclipse.gradle b/gradle/ide/eclipse.gradle index 3721c3184aa..1c1b626048b 100644 --- a/gradle/ide/eclipse.gradle +++ b/gradle/ide/eclipse.gradle @@ -31,6 +31,8 @@ configure(rootProject) { } classpath { + downloadSources = true + downloadJavadoc = true defaultOutputDir = file('build/eclipse') file { diff --git a/gradle/validation/rat-sources.gradle b/gradle/validation/rat-sources.gradle index b72d4338d3b..3f81e3b4966 100644 --- a/gradle/validation/rat-sources.gradle +++ b/gradle/validation/rat-sources.gradle @@ -58,6 +58,9 @@ allprojects { include "**/*.gradle" exclude ".gradle/**" + // Exclude Eclipse + exclude ".metadata" + // Include selected patterns from any source folders. We could make this // relative to source sets but it seems to be of little value - all our source sets // live under 'src' anyway. diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradle index eb178fb7220..373bacbb8c9 100644 --- a/gradle/validation/validate-source-patterns.gradle +++ b/gradle/validation/validate-source-patterns.gradle @@ -82,6 +82,7 @@ allprojects { exclude '**/build/**' exclude '**/.idea/**' exclude '**/.gradle/**' + exclude '.metadata/**' if (project == rootProject) { // ourselves :-) diff --git a/solr/core/src/test/org/apache/solr/handler/admin/api/package-info.java b/solr/core/src/test/org/apache/solr/handler/admin/api/package-info.java deleted file mode 100644 index eb4e334bff9..00000000000 --- a/solr/core/src/test/org/apache/solr/handler/admin/api/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - -/** Unit tests for v2 "admin" API implementations. */ -package org.apache.solr.handler.admin.api; diff --git a/solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/SSLConfigurationsTest.java b/solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/HadoopSSLConfigurationsTest.java similarity index 98% rename from solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/SSLConfigurationsTest.java rename to solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/HadoopSSLConfigurationsTest.java index 140c726802c..65b4ae96fca 100644 --- a/solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/SSLConfigurationsTest.java +++ b/solr/modules/hadoop-auth/src/test/org/apache/solr/util/configuration/HadoopSSLConfigurationsTest.java @@ -38,7 +38,7 @@ import org.junit.rules.TestRule; import org.mockito.Mockito; -public class SSLConfigurationsTest extends SolrTestCaseJ4 { +public class HadoopSSLConfigurationsTest extends SolrTestCaseJ4 { private Map envs; private SSLConfigurations sut; diff --git a/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/api/package-info.java b/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/api/package-info.java deleted file mode 100644 index 8705daf787a..00000000000 --- a/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/api/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - -/** Tests for the API(s) bundled with the jwt-auth module. */ -package org.apache.solr.security.jwt.api; diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/package-info.java b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/package-info.java deleted file mode 100644 index 071898b53c9..00000000000 --- a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - -/** Test framework classes for collection APIs */ -package org.apache.solr.cloud.api.collections;