Skip to content

Commit

Permalink
GH-43229: [Java] Update Maven project info (#43231)
Browse files Browse the repository at this point in the history
### 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 <laurent@apache.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
  • Loading branch information
laurentgo authored Jul 17, 2024
1 parent 25434bb commit de17643
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 11 deletions.
11 changes: 11 additions & 0 deletions dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,17 @@ def test_version_pre_tag
"+#{new_line}",
]
end
tag = "<tag>main</tag>"
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

Expand Down
9 changes: 7 additions & 2 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 49 additions & 1 deletion java/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" child.project.url.inherit.append.path="false" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -30,8 +30,51 @@ under the License.
<artifactId>arrow-bom</artifactId>
<version>18.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Arrow Bill of Materials</name>
<description>Arrow Bill of Materials</description>
<url>https://arrow.apache.org/</url>

<mailingLists>
<mailingList>
<name>Developer List</name>
<subscribe>dev-subscribe@arrow.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@arrow.apache.org</unsubscribe>
<post>dev@arrow.apache.org</post>
<archive>https://lists.apache.org/list.html?dev@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>Commits List</name>
<subscribe>commits-subscribe@arrow.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@arrow.apache.org</unsubscribe>
<post>commits@arrow.apache.org</post>
<archive>https://lists.apache.org/list.html?commits@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>Issues List</name>
<subscribe>issues-subscribe@arrow.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@arrow.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?issues@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>GitHub List</name>
<subscribe>github-subscribe@arrow.apache.org</subscribe>
<unsubscribe>github-unsubscribe@arrow.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?github@arrow.apache.org</archive>
</mailingList>
</mailingLists>

<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
<connection>scm:git:https://github.com/apache/arrow.git</connection>
<developerConnection>scm:git:https://github.com/apache/arrow.git</developerConnection>
<tag>main</tag>
<url>https://github.com/apache/arrow/tree/${project.scm.tag}</url>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/apache/arrow/issues</url>
</issueManagement>

<properties>
<arrow.vector.classifier></arrow.vector.classifier>
Expand Down Expand Up @@ -169,6 +212,11 @@ under the License.
<artifactId>spotless-maven-plugin</artifactId>
<version>2.30.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.17.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down
50 changes: 49 additions & 1 deletion java/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" child.project.url.inherit.append.path="false" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
Note: Do not inherit from the Arrow parent POM as plugins can be referenced
Expand All @@ -34,12 +34,55 @@ under the License.
<artifactId>arrow-maven-plugins</artifactId>
<version>18.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Arrow Maven Plugins</name>
<url>https://arrow.apache.org/</url>

<mailingLists>
<mailingList>
<name>Developer List</name>
<subscribe>dev-subscribe@arrow.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@arrow.apache.org</unsubscribe>
<post>dev@arrow.apache.org</post>
<archive>https://lists.apache.org/list.html?dev@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>Commits List</name>
<subscribe>commits-subscribe@arrow.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@arrow.apache.org</unsubscribe>
<post>commits@arrow.apache.org</post>
<archive>https://lists.apache.org/list.html?commits@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>Issues List</name>
<subscribe>issues-subscribe@arrow.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@arrow.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?issues@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>GitHub List</name>
<subscribe>github-subscribe@arrow.apache.org</subscribe>
<unsubscribe>github-unsubscribe@arrow.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?github@arrow.apache.org</archive>
</mailingList>
</mailingLists>

<modules>
<module>module-info-compiler-maven-plugin</module>
</modules>

<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
<connection>scm:git:https://github.com/apache/arrow.git</connection>
<developerConnection>scm:git:https://github.com/apache/arrow.git</developerConnection>
<tag>main</tag>
<url>https://github.com/apache/arrow/tree/${project.scm.tag}</url>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/apache/arrow/issues</url>
</issueManagement>

<properties>
<checkstyle.failOnViolation>true</checkstyle.failOnViolation>
<!-- org.apache:apache overrides -->
Expand Down Expand Up @@ -75,6 +118,11 @@ under the License.
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>2.8.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.17.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down
25 changes: 18 additions & 7 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" child.project.url.inherit.append.path="false" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -41,20 +41,26 @@ under the License.
<subscribe>dev-subscribe@arrow.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@arrow.apache.org</unsubscribe>
<post>dev@arrow.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/arrow-dev/</archive>
<archive>https://lists.apache.org/list.html?dev@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>Commits List</name>
<subscribe>commits-subscribe@arrow.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@arrow.apache.org</unsubscribe>
<post>commits@arrow.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/arrow-commits/</archive>
<archive>https://lists.apache.org/list.html?commits@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>Issues List</name>
<subscribe>issues-subscribe@arrow.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@arrow.apache.org</unsubscribe>
<archive>https://mail-archives.apache.org/mod_mbox/arrow-issues/</archive>
<archive>https://lists.apache.org/list.html?issues@arrow.apache.org</archive>
</mailingList>
<mailingList>
<name>GitHub List</name>
<subscribe>github-subscribe@arrow.apache.org</subscribe>
<unsubscribe>github-unsubscribe@arrow.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?github@arrow.apache.org</archive>
</mailingList>
</mailingLists>

Expand All @@ -73,11 +79,11 @@ under the License.
<module>compression</module>
</modules>

<scm>
<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
<connection>scm:git:https://github.com/apache/arrow.git</connection>
<developerConnection>scm:git:https://github.com/apache/arrow.git</developerConnection>
<tag>apache-arrow-2.0.0</tag>
<url>https://github.com/apache/arrow</url>
<tag>main</tag>
<url>https://github.com/apache/arrow/tree/${project.scm.tag}</url>
</scm>

<issueManagement>
Expand Down Expand Up @@ -507,6 +513,11 @@ under the License.
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.17.0</version>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
Expand Down

0 comments on commit de17643

Please sign in to comment.