This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 6d838cb3de9 build: remove gradle/ant-compat (#3030)
6d838cb3de9 is described below
commit 6d838cb3de9774e1a17208a78210f8968ce4e959
Author: David Smiley <[email protected]>
AuthorDate: Tue Jan 14 23:29:32 2025 -0500
build: remove gradle/ant-compat (#3030)
(just a refactoring)
Note that defaults-maven.gradle change merely limited the use of
gradle.projectsEvaluated to the only remaining portion that needed it --
"signing".
---
build.gradle | 11 ---
gradle/ant-compat/artifact-naming.gradle | 21 -----
gradle/ant-compat/misc.gradle | 24 -----
gradle/ant-compat/solr.folder-layout.gradle | 23 -----
gradle/globals.gradle | 5 +-
gradle/maven/defaults-maven.gradle | 139 ++++++++++++++--------------
solr/webapp/build.gradle | 2 +
7 files changed, 75 insertions(+), 150 deletions(-)
diff --git a/build.gradle b/build.gradle
index 9439438f9a8..2ff703ce8f5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -122,10 +122,6 @@ ext {
apply from: file('gradle/conventions.gradle')
apply from: file('gradle/generation/local-settings.gradle')
-// Ant-compatibility layer: apply folder layout early so that
-// evaluation of other scripts doesn't need to be deferred.
-apply from: file('gradle/ant-compat/solr.folder-layout.gradle')
-
// Set up defaults and configure aspects for certain modules or functionality
// (java, tests)
apply from: file('gradle/java/folder-layout.gradle')
@@ -188,13 +184,6 @@ apply from: file('gradle/help.gradle')
// Configures development for joint Lucene/ Solr composite build.
apply from: file('gradle/lucene-dev/lucene-dev-repo-composite.gradle')
-// Ant-compatibility layer. ALL OF THESE SHOULD BE GONE at some point. They are
-// here so that we can coexist with current ant build but they are indicative
-// of potential problems with the build conventions, dependencies, etc.
-apply from: file('gradle/ant-compat/misc.gradle')
-
-apply from: file('gradle/ant-compat/artifact-naming.gradle')
-
apply from: file('gradle/documentation/pull-lucene-javadocs.gradle')
apply from: file('gradle/documentation/documentation.gradle')
apply from: file('gradle/documentation/changes-to-html.gradle')
diff --git a/gradle/ant-compat/artifact-naming.gradle
b/gradle/ant-compat/artifact-naming.gradle
deleted file mode 100644
index cd6451724bb..00000000000
--- a/gradle/ant-compat/artifact-naming.gradle
+++ /dev/null
@@ -1,21 +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.
- */
-
-// Stick to previous artifact names (not identical to path/ folders).
-configure(subprojects.findAll { it.path.contains(':solr:modules:') }) {
- project.archivesBaseName = project.archivesBaseName.replace("-modules-", "-")
-}
diff --git a/gradle/ant-compat/misc.gradle b/gradle/ant-compat/misc.gradle
deleted file mode 100644
index 213f992fcf7..00000000000
--- a/gradle/ant-compat/misc.gradle
+++ /dev/null
@@ -1,24 +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.
- */
-
-
-// Exclude inner classes from testing.
-allprojects {
- tasks.withType(Test) { task ->
- exclude '**/*$*'
- }
-}
diff --git a/gradle/ant-compat/solr.folder-layout.gradle
b/gradle/ant-compat/solr.folder-layout.gradle
deleted file mode 100644
index ad7adee4796..00000000000
--- a/gradle/ant-compat/solr.folder-layout.gradle
+++ /dev/null
@@ -1,23 +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.
- */
-
-// Adapt to custom 'web' folder location.
-configure(project(":solr:webapp")) {
- plugins.withType(WarPlugin) {
- webAppDirName = "web"
- }
-}
diff --git a/gradle/globals.gradle b/gradle/globals.gradle
index d8a99de69c2..70aa7ef3ab5 100644
--- a/gradle/globals.gradle
+++ b/gradle/globals.gradle
@@ -35,7 +35,10 @@ allprojects {
// Artifacts will have names after full gradle project path
// so :solr:core will have solr-core.jar, etc.
- project.archivesBaseName = project.path.replaceAll("^:", "").replace(':',
'-')
+ project.archivesBaseName = project.path
+ .replaceAll("^:", "")
+ .replace(':', '-')
+ .replace("-modules-", "-")
project.ext {
// Utility method to support passing overrides via -P or -D.
diff --git a/gradle/maven/defaults-maven.gradle
b/gradle/maven/defaults-maven.gradle
index 3239c04acfc..beba30c6a9f 100644
--- a/gradle/maven/defaults-maven.gradle
+++ b/gradle/maven/defaults-maven.gradle
@@ -76,93 +76,92 @@ configure(subprojects.findAll { it.path in
rootProject.published }) { prj ->
from javadoc.destinationDir
}
- // This moves publishing configuration after all the scripts of all
projects
- // have been evaluated. This is required because we set artifact groups
- // and archivesBaseName in other scripts (artifact-naming.gradle) and
- // maven pom does not accept lazy property providers (so everything must
- // be in its final form).
- //
- // In theory project.afterEvaluate closure should also work but for some
reason
- // it fired earlier than artifact-naming.gradle; don't know whether it's a
bug
- // in gradle or just complex relationships between lazy collection hooks.
- gradle.projectsEvaluated {
- publishing {
- def configurePom = {
- name = "Apache Solr (module: ${project.name})"
- description = name
- url = 'https://solr.apache.org/'
-
- licenses {
- license {
- name = 'Apache 2'
- url = 'https://apache.org/licenses/LICENSE-2.0.txt'
- }
- }
+ // Add aliases of convention tasks with shorter names.
+ task mavenToApacheSnapshots() {
+ group "Publishing"
+ description "Publish Maven JARs and POMs to Apache Snapshots repository:
${apacheNexusSnapshots}"
- inceptionYear = "2006"
+ dependsOn "publishJarsPublicationToApacheSnapshotsRepository"
+ }
- issueManagement {
- system = "JIRA"
- url = "https://issues.apache.org/jira/browse/SOLR"
- }
+ publishing {
+ def configurePom = {
+ name = "Apache Solr (module: ${project.name})"
+ description = name
+ url = 'https://solr.apache.org/'
- ciManagement {
- system = "Jenkins"
- url = "https://builds.apache.org/job/Solr/"
+ licenses {
+ license {
+ name = 'Apache 2'
+ url = 'https://apache.org/licenses/LICENSE-2.0.txt'
}
+ }
- mailingLists {
- mailingList {
- name = "Solr User List"
- subscribe = "[email protected]"
- unsubscribe = "[email protected]"
- archive =
"https://lists.apache.org/[email protected]"
- }
-
- mailingList {
- name = "Solr Developer List"
- subscribe = "[email protected]"
- unsubscribe = "[email protected]"
- archive =
"https://lists.apache.org/[email protected]"
- }
-
- mailingList {
- name = "Solr Commits List"
- subscribe = "[email protected]"
- unsubscribe = "[email protected]"
- archive =
"https://lists.apache.org/[email protected]"
- }
- }
+ inceptionYear = "2006"
- scm {
- connection = 'scm:git:https://gitbox.apache.org/repos/asf/solr.git'
- developerConnection =
'scm:git:https://gitbox.apache.org/repos/asf/solr.git'
- url = 'https://gitbox.apache.org/repos/asf?p=solr.git'
- }
+ issueManagement {
+ system = "JIRA"
+ url = "https://issues.apache.org/jira/browse/SOLR"
}
- publications {
- jars(MavenPublication) {
- from components.java
- groupId = project.group
- artifactId = project.archivesBaseName
+ ciManagement {
+ system = "Jenkins"
+ url = "https://builds.apache.org/job/Solr/"
+ }
- artifact sourcesJar
- artifact javadocJar
+ mailingLists {
+ mailingList {
+ name = "Solr User List"
+ subscribe = "[email protected]"
+ unsubscribe = "[email protected]"
+ archive =
"https://lists.apache.org/[email protected]"
+ }
- pom(configurePom)
+ mailingList {
+ name = "Solr Developer List"
+ subscribe = "[email protected]"
+ unsubscribe = "[email protected]"
+ archive = "https://lists.apache.org/[email protected]"
}
+
+ mailingList {
+ name = "Solr Commits List"
+ subscribe = "[email protected]"
+ unsubscribe = "[email protected]"
+ archive =
"https://lists.apache.org/[email protected]"
+ }
+ }
+
+ scm {
+ connection = 'scm:git:https://gitbox.apache.org/repos/asf/solr.git'
+ developerConnection =
'scm:git:https://gitbox.apache.org/repos/asf/solr.git'
+ url = 'https://gitbox.apache.org/repos/asf?p=solr.git'
}
}
- // Add aliases of convention tasks with shorter names.
- task mavenToApacheSnapshots() {
- group "Publishing"
- description "Publish Maven JARs and POMs to Apache Snapshots
repository: ${apacheNexusSnapshots}"
+ publications {
+ jars(MavenPublication) {
+ from components.java
+ groupId = project.group
+ artifactId = project.archivesBaseName
- dependsOn "publishJarsPublicationToApacheSnapshotsRepository"
+ artifact sourcesJar
+ artifact javadocJar
+
+ pom(configurePom)
+ }
}
+ }
+ // This moves some configuration after all the scripts of all projects
+ // have been evaluated. This is required because we compute some aspects
dynamically and
+ // maven pom does not accept lazy property providers (so everything must
+ // be in its final form).
+ //
+ // In theory project.afterEvaluate closure should also work but for some
reason
+ // it fired earlier; don't know whether it's a bug
+ // in gradle or just complex relationships between lazy collection hooks.
+ gradle.projectsEvaluated {
signing {
if (project(":solr:distribution").ext.useGpgForSigning) {
useGpgCmd()
diff --git a/solr/webapp/build.gradle b/solr/webapp/build.gradle
index f4a27d7a465..b08950c61af 100644
--- a/solr/webapp/build.gradle
+++ b/solr/webapp/build.gradle
@@ -125,6 +125,8 @@ task finalizeJsBundleDir(type: Sync) {
}
war {
+ webAppDirName = "web"
+
// Why are they in the source code at all if they're excluded from the
distribution?
exclude "libs/angular-cookies.js"
exclude "libs/angular-route.js"