From de17643e3176d821e02873c776ee91f6e53d3314 Mon Sep 17 00:00:00 2001 From: Laurent Goujon Date: Wed, 17 Jul 2024 02:04:37 +0200 Subject: [PATCH] GH-43229: [Java] Update Maven project info (#43231) ### Rationale for this change Some Maven modules are missing project information like the website url, the mailing lists, and scm and issues url Other may have incorrect links because of the way Maven interpolates those values at build time ### What changes are included in this PR? Update/Fix Maven project information for all modules: * Add project url, mailing lists, scm and issueManagement information to bom and maven parent modules * Fix top-level parent by preventing Maven to rewrite project url, and scm connections/urls based on the module hierarchy * Change project.scm.tag to `main` and update version change script to also change the tag value to `apache-arrow-${version}` ### Are these changes tested? CI/CD only ### Are there any user-facing changes? No * GitHub Issue: #43229 Authored-by: Laurent Goujon Signed-off-by: David Li --- dev/release/01-prepare-test.rb | 11 ++++++++ dev/release/utils-prepare.sh | 9 ++++-- java/bom/pom.xml | 50 +++++++++++++++++++++++++++++++++- java/maven/pom.xml | 50 +++++++++++++++++++++++++++++++++- java/pom.xml | 25 ++++++++++++----- 5 files changed, 134 insertions(+), 11 deletions(-) diff --git a/dev/release/01-prepare-test.rb b/dev/release/01-prepare-test.rb index fbd0b2996077c..fec99ef058c5b 100644 --- a/dev/release/01-prepare-test.rb +++ b/dev/release/01-prepare-test.rb @@ -323,6 +323,17 @@ def test_version_pre_tag "+#{new_line}", ] end + tag = "main" + target_lines = lines.grep(/#{Regexp.escape(tag)}/) + target_lines.each do |line| + new_line = line.gsub("main") do + "apache-arrow-#{@release_version}" + end + hunks << [ + "-#{line}", + "+#{new_line}", + ] + end expected_changes << {hunks: hunks, path: path} end diff --git a/dev/release/utils-prepare.sh b/dev/release/utils-prepare.sh index c255e728a335b..760a7f404a74d 100644 --- a/dev/release/utils-prepare.sh +++ b/dev/release/utils-prepare.sh @@ -83,8 +83,13 @@ update_versions() { popd pushd "${ARROW_DIR}/java" - mvn versions:set -DnewVersion=${version} -DprocessAllModules - find . -type f -name pom.xml.versionsBackup -delete + mvn versions:set -DnewVersion=${version} -DprocessAllModules -DgenerateBackupPoms=false + if [ "${type}" = "release" ]; then + # versions-maven-plugin:set-scm-tag does not update the whole reactor. Invoking separately + mvn versions:set-scm-tag -DnewTag=apache-arrow-${version} -DgenerateBackupPoms=false -pl :arrow-java-root + mvn versions:set-scm-tag -DnewTag=apache-arrow-${version} -DgenerateBackupPoms=false -pl :arrow-bom + mvn versions:set-scm-tag -DnewTag=apache-arrow-${version} -DgenerateBackupPoms=false -pl :arrow-maven-plugins + fi git add "pom.xml" git add "**/pom.xml" popd diff --git a/java/bom/pom.xml b/java/bom/pom.xml index b0fe96d6d5ce0..e51906cd77e35 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 @@ -30,8 +30,51 @@ under the License. arrow-bom 18.0.0-SNAPSHOT pom + Arrow Bill of Materials Arrow Bill of Materials + https://arrow.apache.org/ + + + + Developer List + dev-subscribe@arrow.apache.org + dev-unsubscribe@arrow.apache.org + dev@arrow.apache.org + https://lists.apache.org/list.html?dev@arrow.apache.org + + + Commits List + commits-subscribe@arrow.apache.org + commits-unsubscribe@arrow.apache.org + commits@arrow.apache.org + https://lists.apache.org/list.html?commits@arrow.apache.org + + + Issues List + issues-subscribe@arrow.apache.org + issues-unsubscribe@arrow.apache.org + https://lists.apache.org/list.html?issues@arrow.apache.org + + + GitHub List + github-subscribe@arrow.apache.org + github-unsubscribe@arrow.apache.org + https://lists.apache.org/list.html?github@arrow.apache.org + + + + + scm:git:https://github.com/apache/arrow.git + scm:git:https://github.com/apache/arrow.git + main + https://github.com/apache/arrow/tree/${project.scm.tag} + + + + GitHub + https://github.com/apache/arrow/issues + @@ -169,6 +212,11 @@ under the License. spotless-maven-plugin 2.30.0 + + org.codehaus.mojo + versions-maven-plugin + 2.17.0 + diff --git a/java/maven/pom.xml b/java/maven/pom.xml index efa074deec5f5..d342b629358dd 100644 --- a/java/maven/pom.xml +++ b/java/maven/pom.xml @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 @@ -75,6 +118,11 @@ under the License. cyclonedx-maven-plugin 2.8.0 + + org.codehaus.mojo + versions-maven-plugin + 2.17.0 + diff --git a/java/pom.xml b/java/pom.xml index f3f7432ba6aa1..4ce0c1981d295 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 @@ -41,20 +41,26 @@ under the License. dev-subscribe@arrow.apache.org dev-unsubscribe@arrow.apache.org dev@arrow.apache.org - https://mail-archives.apache.org/mod_mbox/arrow-dev/ + https://lists.apache.org/list.html?dev@arrow.apache.org Commits List commits-subscribe@arrow.apache.org commits-unsubscribe@arrow.apache.org commits@arrow.apache.org - https://mail-archives.apache.org/mod_mbox/arrow-commits/ + https://lists.apache.org/list.html?commits@arrow.apache.org Issues List issues-subscribe@arrow.apache.org issues-unsubscribe@arrow.apache.org - https://mail-archives.apache.org/mod_mbox/arrow-issues/ + https://lists.apache.org/list.html?issues@arrow.apache.org + + + GitHub List + github-subscribe@arrow.apache.org + github-unsubscribe@arrow.apache.org + https://lists.apache.org/list.html?github@arrow.apache.org @@ -73,11 +79,11 @@ under the License. compression - + scm:git:https://github.com/apache/arrow.git scm:git:https://github.com/apache/arrow.git - apache-arrow-2.0.0 - https://github.com/apache/arrow + main + https://github.com/apache/arrow/tree/${project.scm.tag} @@ -507,6 +513,11 @@ under the License. exec-maven-plugin 3.3.0 + + org.codehaus.mojo + versions-maven-plugin + 2.17.0 + pl.project13.maven git-commit-id-plugin