Skip to content

Commit

Permalink
apacheGH-41307: [Java] Use org.apache:apache parent pom version 31 (a…
Browse files Browse the repository at this point in the history
…pache#41309)

### Rationale for this change

Use/update Maven modules to `org.apache:parent:31` and clean up Maven modules to remove unnecessary configuration or outdated workarounds

### What changes are included in this PR?

* Add `org.apache:parent:31` to `org.apache.arrow:arrow-bom` and `org.apache.arrow.maven.plugins:arrow-maven-plugins` to make them conformant with ASF standards
* Update `org.apache.arrow:arrow-java-root` parent to `org.apache:parent:31`
* Use `version.*` and other properties to override plugin versions defined by `org.apache:parent`
* Move standalone plugin versions under pluginManagement at the top level
* Cleanup redundant plugin version or configuration declaration
* Update `maven-dependency-plugin` to 3.6.1 and add the required overrides when necessary
* Update `maven-shade-plugin` to 3.5.1 (via `org.apache:parent`)
* Remove enforcer check for java and maven version (handled by `org.apache:parent`)
* Remove unnecessary `mvnrepository` link comments
* Remove `m2e.version` property check in profiles (only needed for errorprone plugin configuration which is incompatible with M2E)
* Cleanup `argLine` overrides for surefire/failsafe plugins
* Remove unnecessary `../pom.xml` `<relativePath>` directives
* Remove source/target/encoding configuration properties for `maven-compiler-plugin`, `maven-javadoc-plugin` and `maven-resources-plugin` as it is handled by `org.apache:parent` and plugin themselves
* Remove unnecessary copy of codegen templates in `arrow-vector` module
* Remove unnecessary junit jupiter engine dependencies for surefire/failsafe plugins.

### Are these changes tested?

No net new code. tested via CI jobs

### Are there any user-facing changes?

None
* GitHub Issue: apache#41307

Authored-by: Laurent Goujon <laurent@apache.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
  • Loading branch information
laurentgo committed Apr 29, 2024
1 parent 4b2cf22 commit 9090e67
Show file tree
Hide file tree
Showing 20 changed files with 177 additions and 450 deletions.
9 changes: 0 additions & 9 deletions java/adapter/avro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,27 @@
<url>http://maven.apache.org</url>

<dependencies>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-memory-core -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-core</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-memory-netty -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
<scope>runtime</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-vector -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
</dependency>

<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
</dependency>

<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${dep.avro.version}</version>
</dependency>
</dependencies>

</project>
7 changes: 0 additions & 7 deletions java/adapter/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@

<dependencies>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-memory-core -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-core</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-memory-netty -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
<scope>runtime</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-vector -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
Expand All @@ -51,7 +48,6 @@
<artifactId>value</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand Down Expand Up @@ -94,9 +90,6 @@
<id>jdk11+</id>
<activation>
<jdk>[11,]</jdk>
<property>
<name>!m2e.version</name>
</property>
</activation>
<build>
<plugins>
Expand Down
17 changes: 17 additions & 0 deletions java/adapter/orc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,22 @@
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>analyze</id>
<configuration>
<ignoredDependencies combine.children="append">
<!-- indirect use of org.apache.arrow.flatbuf.Message in OrcStripeReader -->
<ignoredDependency>org.apache.arrow:arrow-format</ignoredDependency>
</ignoredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
21 changes: 14 additions & 7 deletions java/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>18</version>
<version>31</version>
</parent>

<groupId>org.apache.arrow</groupId>
Expand All @@ -27,6 +27,19 @@

<properties>
<arrow.vector.classifier></arrow.vector.classifier>
<!-- org.apache:apache overrides -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.plugin.tools.version>3.11.0</maven.plugin.tools.version>
<surefire.version>3.2.5</surefire.version>
<version.apache-rat-plugin>0.16.1</version.apache-rat-plugin>
<version.maven-assembly-plugin>3.7.1</version.maven-assembly-plugin>
<version.maven-compiler-plugin>3.12.1</version.maven-compiler-plugin>
<version.maven-dependency-plugin>3.6.1</version.maven-dependency-plugin>
<version.maven-gpg-plugin>3.2.0</version.maven-gpg-plugin>
<version.maven-jar-plugin>3.2.2</version.maven-jar-plugin>
<version.maven-javadoc-plugin>3.6.3</version.maven-javadoc-plugin>
<version.maven-project-info-reports-plugin>3.5.0</version.maven-project-info-reports-plugin>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -138,11 +151,9 @@
<version>${project.version}</version>
</dependency>
</dependencies>

</dependencyManagement>

<build>

<pluginManagement>
<plugins>
<plugin>
Expand All @@ -156,12 +167,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
Expand All @@ -188,12 +197,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
</plugins>
</reporting>
Expand Down
1 change: 0 additions & 1 deletion java/c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,4 @@
</resource>
</resources>
</build>

</project>
12 changes: 2 additions & 10 deletions java/dataset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<description>Java implementation of Arrow Dataset API/Framework</description>
<properties>
<arrow.cpp.build.dir>../../../cpp/release-build/</arrow.cpp.build.dir>
<protobuf.version>2.5.0</protobuf.version>
<parquet.version>1.13.1</parquet.version>
<avro.version>1.11.3</avro.version>
</properties>
Expand Down Expand Up @@ -195,21 +194,14 @@
<id>jdk11+</id>
<activation>
<jdk>[11,]</jdk>
<property>
<name>!m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration combine.self="override">
<enableAssertions>false</enableAssertions>
<systemPropertyVariables>
<arrow.test.dataRoot>${project.basedir}/../../testing/data</arrow.test.dataRoot>
</systemPropertyVariables>
<argLine>--add-reads=org.apache.arrow.dataset=com.fasterxml.jackson.databind --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
<configuration>
<argLine combine.self="override">--add-reads=org.apache.arrow.dataset=com.fasterxml.jackson.databind --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
27 changes: 2 additions & 25 deletions java/flight/flight-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-flight</artifactId>
<version>17.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>flight-core</artifactId>
Expand Down Expand Up @@ -151,13 +150,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<!--
Downgrade maven-shade-plugin specifically for this module.
Using a newer version up to at least 3.5.1 will cause
issues in the arrow-tools tests looking up FlatBuffer
dependencies.
-->
<version>3.2.4</version>
<executions>
<execution>
<id>shade-main</id>
Expand Down Expand Up @@ -244,7 +236,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>analyze</id>
Expand All @@ -264,7 +255,6 @@
<!-- add generated sources to classpath -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-generated-sources-to-classpath</id>
Expand All @@ -282,7 +272,6 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand All @@ -299,32 +288,21 @@
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.1</version>
</extension>
</extensions>
</build>

<profiles>
<profile>
<id>jdk11+</id>
<activation>
<jdk>[11,]</jdk>
<property>
<name>!m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration combine.self="override">
<argLine>--add-opens=org.apache.arrow.flight.core/org.apache.arrow.flight.perf.impl=protobuf.java --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
<enableAssertions>false</enableAssertions>
<configuration>
<argLine combine.self="override">--add-opens=org.apache.arrow.flight.core/org.apache.arrow.flight.perf.impl=protobuf.java --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
<systemPropertyVariables>
<arrow.test.dataRoot>${project.basedir}/../../../testing/data</arrow.test.dataRoot>
</systemPropertyVariables>
Expand All @@ -334,5 +312,4 @@
</build>
</profile>
</profiles>

</project>
2 changes: 0 additions & 2 deletions java/flight/flight-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-flight</artifactId>
<version>17.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>flight-integration-tests</artifactId>
Expand Down Expand Up @@ -63,7 +62,6 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand Down
10 changes: 0 additions & 10 deletions java/flight/flight-sql-jdbc-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-flight</artifactId>
<version>17.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>flight-sql-jdbc-core</artifactId>
Expand Down Expand Up @@ -47,20 +46,17 @@
</exclusions>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-memory-core -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-core</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-memory-netty -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
<scope>runtime</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.arrow/arrow-vector -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
Expand Down Expand Up @@ -136,11 +132,6 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -154,7 +145,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>write-project-properties-to-file</id>
Expand Down
1 change: 0 additions & 1 deletion java/flight/flight-sql-jdbc-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-flight</artifactId>
<version>17.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>flight-sql-jdbc-driver</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions java/flight/flight-sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-flight</artifactId>
<version>17.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>flight-sql</artifactId>
Expand Down Expand Up @@ -119,9 +118,6 @@
<id>jdk11+</id>
<activation>
<jdk>[11,]</jdk>
<property>
<name>!m2e.version</name>
</property>
</activation>
<build>
<plugins>
Expand All @@ -136,5 +132,4 @@
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit 9090e67

Please sign in to comment.