Skip to content

Commit

Permalink
[Build] Upgrade Apache Parent POM version to 23 and also upgrade mave…
Browse files Browse the repository at this point in the history
…n plugins (apache#9868)

- previous Apache Parent POM version 18 is from May 2016
- use surefire.version to set surefire version, since that's the way
  the parent pom supports
- use maven.compiler.source / maven.compiler.target properties since that's
  what the parent pom supports
- use maven.compiler.source / maven.compiler.target properties also for setting
  aspectj-maven-plugin configuration
- remove plugin overrides for plugins that are at sufficient level in parent pom
  - maven-clean-plugin
  - maven-compiler-plugin
  - maven-javadoc-plugin
- fix issue with Pulsar SQL / Presto distribution launcher not having execution permissions set
  - upgrade assembly descriptor files to use newer xml schema consistently
  - set fileMode 755 for launcher files
  - set fileMode 755 for lib/presto/bin files packaged in Pulsar distro
- upgrade most maven plugins to recent versions
  - exec-maven-plugin 1.6.0 -> 3.0.0
  - maven-enforcer-plugin 3.0.0-M2 -> 3.0.0-M3
  - maven-archiver 2.5 -> 3.5.1
  - maven-checkstyle-plugin 3.1.1 -> 3.1.2
  - wagon-ssh-external 2.10 -> 3.4.3
  - jacoco-maven-plugin 0.8.3 -> 0.8.6
  - spotbugs-maven-plugin 4.1.3 -> 4.2.2
- build related libraries
  - spotbugs 4.2.0 -> 4.2.2
  - errorprone 2.4.0 -> 2.5.1
- remove maven-archiver from plugins since it's not a plugin
  • Loading branch information
lhotari authored Mar 25, 2021
1 parent e4b4627 commit 511b0fe
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 85 deletions.
14 changes: 6 additions & 8 deletions buildtools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>18</version>
<version>23</version>
</parent>

<groupId>org.apache.pulsar</groupId>
Expand All @@ -34,6 +34,11 @@
<packaging>jar</packaging>
<name>Pulsar Build Tools</name>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.testng</groupId>
Expand Down Expand Up @@ -74,13 +79,6 @@
</mapping>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<extensions>
<extension>
Expand Down
2 changes: 1 addition & 1 deletion distribution/io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distro-assembly</id>
Expand Down
7 changes: 3 additions & 4 deletions distribution/io/src/assemble/io.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
under the License.
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>bin</id>
<formats>
<format>dir</format>
Expand Down
2 changes: 1 addition & 1 deletion distribution/offloaders/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distro-assembly</id>
Expand Down
7 changes: 3 additions & 4 deletions distribution/offloaders/src/assemble/offloaders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
under the License.
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
Expand Down
2 changes: 1 addition & 1 deletion distribution/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distro-assembly</id>
Expand Down
19 changes: 15 additions & 4 deletions distribution/server/src/assemble/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
under the License.
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
Expand Down Expand Up @@ -64,6 +63,18 @@
<fileSet>
<directory>${basedir}/../../pulsar-sql/presto-distribution/target/pulsar-presto-distribution</directory>
<outputDirectory>lib/presto</outputDirectory>
<excludes>
<exclude>bin</exclude>
<exclude>bin/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/../../pulsar-sql/presto-distribution/target/pulsar-presto-distribution</directory>
<outputDirectory>lib/presto</outputDirectory>
<includes>
<include>bin/**</include>
</includes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
<files>
Expand Down
5 changes: 5 additions & 0 deletions docker/pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<name>Apache Pulsar :: Docker Images :: Pulsar Latest Version</name>
<packaging>pom</packaging>

<properties>
<skipBuildPythonClient>false</skipBuildPythonClient>
<skipCopyPythonClients>false</skipCopyPythonClients>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
52 changes: 19 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>18</version>
<version>23</version>
</parent>

<groupId>org.apache.pulsar</groupId>
Expand Down Expand Up @@ -77,6 +77,9 @@ flexible messaging model and an intuitive client API.</description>
</issueManagement>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<!--config keys to congiure test selection -->
<include>*</include>
<exclude/>
Expand All @@ -93,6 +96,7 @@ flexible messaging model and an intuitive client API.</description>
<testRetryCount>1</testRetryCount>
<docker.organization>apachepulsar</docker.organization>
<skipSourceReleaseAssembly>false</skipSourceReleaseAssembly>
<skipBuildDistribution>false</skipBuildDistribution>

<!-- apache commons -->
<commons-compress.version>1.19</commons-compress.version>
Expand Down Expand Up @@ -206,30 +210,28 @@ flexible messaging model and an intuitive client API.</description>

<!-- Plugin dependencies -->
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
<aspectj-maven-plugin.version>1.11.1</aspectj-maven-plugin.version>
<license-maven-plugin.version>4.0.rc2</license-maven-plugin.version>
<directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
<maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<!-- surefire.version is defined in apache parent pom -->
<!-- it is used for surefire, failsafe and surefire-report plugins -->
<!-- do not upgrade surefire.version to 3.0.0-M5 since it runs slowly and breaks tests. -->
<surefire.version>3.0.0-M3</surefire.version>
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
<maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
<maven-clean-plugin.version>2.4.1</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-shade-plugin>3.2.4</maven-shade-plugin>
<maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
<maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<maven-archiver.version>2.5</maven-archiver.version>
<nifi-nar-maven-plugin.version>1.2.0</nifi-nar-maven-plugin.version>
<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
<git-commit-id-plugin.version>4.0.2</git-commit-id-plugin.version>
<wagon-ssh-external.version>2.10</wagon-ssh-external.version>
<wagon-ssh-external.version>3.4.3</wagon-ssh-external.version>
<os-maven-plugin.version>1.4.1.Final</os-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.3</jacoco-maven-plugin.version>
<spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
<spotbugs.version>4.2.0</spotbugs.version>
<errorprone.version>2.4.0</errorprone.version>
<jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
<spotbugs-maven-plugin.version>4.2.2</spotbugs-maven-plugin.version>
<spotbugs.version>4.2.2</spotbugs.version>
<errorprone.version>2.5.1</errorprone.version>
<errorprone.javac.version>9+181-r4173-1</errorprone.javac.version>
<errorprone-slf4j.version>0.1.4</errorprone-slf4j.version>
<lightproto-maven-plugin.version>0.2</lightproto-maven-plugin.version>
Expand Down Expand Up @@ -1129,8 +1131,6 @@ flexible messaging model and an intuitive client API.</description>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
Expand Down Expand Up @@ -1510,7 +1510,6 @@ flexible messaging model and an intuitive client API.</description>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<includes>
<include>${include}</include>
Expand All @@ -1527,24 +1526,16 @@ flexible messaging model and an intuitive client API.</description>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
Expand All @@ -1556,11 +1547,6 @@ flexible messaging model and an intuitive client API.</description>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>${maven-archiver.version}</version>
</plugin>
<plugin>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
Expand Down
1 change: 0 additions & 1 deletion pulsar-functions/runtime-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
Expand Down
18 changes: 5 additions & 13 deletions pulsar-sql/presto-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>18</version>
<version>23</version>
</parent>

<groupId>org.apache.pulsar</groupId>
Expand All @@ -34,7 +34,9 @@
<version>2.8.0-SNAPSHOT</version>

<properties>
<jersey.version>2.31</jersey.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jersey.version>2.31</jersey.version>
<presto.version>332</presto.version>
<airlift.version>0.170</airlift.version>
<objenesis.version>2.6</objenesis.version>
Expand Down Expand Up @@ -262,9 +264,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
Expand Down Expand Up @@ -324,19 +323,12 @@
</mapping>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>2.10</version>
<version>3.4.3</version>
</extension>
</extensions>
</build>
Expand Down
11 changes: 9 additions & 2 deletions pulsar-sql/presto-distribution/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
under the License.
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
Expand Down Expand Up @@ -55,6 +55,13 @@
<outputDirectory></outputDirectory>
<includes>
<include>io.airlift:launcher:tar.gz:bin:${airlift.version}</include>
</includes>
<unpack>true</unpack>
<fileMode>755</fileMode>
</dependencySet>
<dependencySet>
<outputDirectory></outputDirectory>
<includes>
<include>io.airlift:launcher:tar.gz:properties:${airlift.version}</include>
</includes>
<unpack>true</unpack>
Expand Down
3 changes: 0 additions & 3 deletions pulsar-sql/presto-pulsar-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
Expand Down
4 changes: 2 additions & 2 deletions pulsar-sql/presto-pulsar-plugin/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
under the License.
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
Expand Down
6 changes: 3 additions & 3 deletions pulsar-zookeeper-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@
<artifactId>aspectj-maven-plugin</artifactId>
<version>${aspectj-maven-plugin.version}</version>
<configuration>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
<complianceLevel>${maven.compiler.target}</complianceLevel>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
<executions>
Expand Down
Loading

0 comments on commit 511b0fe

Please sign in to comment.