Skip to content

[Build] Upgrade Apache parent pom version and upgrade maven plugins#9868

Merged
eolivelli merged 1 commit intoapache:masterfrom
lhotari:lh-upgrade-apache-parent-pom
Mar 25, 2021
Merged

[Build] Upgrade Apache parent pom version and upgrade maven plugins#9868
eolivelli merged 1 commit intoapache:masterfrom
lhotari:lh-upgrade-apache-parent-pom

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Mar 10, 2021

Motivation

Modifications

  • use most recent Apache Parent POM version 23 from January 2020
  • use surefire.version property 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
  • 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-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

@eolivelli
Copy link
Contributor

This change may impact the list of jars that we bundle into the binary tarballs and in general the execution of the build.
It may also impact the release procedure.

this is because this upgrade will implicitly upgrade a few Maven plugins.

I like this change but we will have to carefully compare the results of the builds.

This change will also enable "reproducible Maven builds" to some extent, but this is another story

@lhotari
Copy link
Member Author

lhotari commented Mar 10, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member Author

lhotari commented Mar 11, 2021

This change may impact the list of jars that we bundle into the binary tarballs and in general the execution of the build.

Wouldn't the build fail in the src/check-binary-license script if this would happen?

It may also impact the release procedure.

How? Any details of what the impact could be? It's probably something that should be addressed sooner or later. Version 18 is from May 2016. That's ancient. :)

@lhotari lhotari marked this pull request as draft March 11, 2021 08:12
@eolivelli
Copy link
Contributor

My point is only about the fact that we are upgrading a few Maven plugins, so the results may be different.
This in general happens if we do not set explicitly a version for all of the plugins that we are using.
Most notably the shade and assembly plugin sometimes introduce changes, but we are already setting our own favourite version.
If CI validation passes then we are on our way.

I just wanted to say my 'heads up', as PR that does not change code sometimes are not taken much into consideration but they may have an effect anyway (usually a positive effect)

@lhotari lhotari force-pushed the lh-upgrade-apache-parent-pom branch from 3944992 to ce5c21d Compare March 22, 2021 05:28
@lhotari
Copy link
Member Author

lhotari commented Mar 22, 2021

/pulsarbot run-failure-checks

@lhotari lhotari marked this pull request as ready for review March 22, 2021 08:30
@lhotari
Copy link
Member Author

lhotari commented Mar 22, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member Author

lhotari commented Mar 22, 2021

This PR depends on #10007

@lhotari lhotari force-pushed the lh-upgrade-apache-parent-pom branch 2 times, most recently from cc03cce to d77668c Compare March 23, 2021 07:28
@lhotari lhotari requested a review from eolivelli March 23, 2021 07:31
@lhotari lhotari changed the title [Build] Upgrade Apache parent pom version to 23 [Build] Upgrade Apache parent pom version and upgrade maven plugins Mar 23, 2021
@lhotari lhotari force-pushed the lh-upgrade-apache-parent-pom branch from d77668c to 324c5b7 Compare March 23, 2021 11:14
@lhotari
Copy link
Member Author

lhotari commented Mar 23, 2021

/pulsarbot run-failure-checks

4 similar comments
@lhotari
Copy link
Member Author

lhotari commented Mar 23, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member Author

lhotari commented Mar 23, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member Author

lhotari commented Mar 23, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member Author

lhotari commented Mar 23, 2021

/pulsarbot run-failure-checks

…n plugins

- 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
@lhotari lhotari force-pushed the lh-upgrade-apache-parent-pom branch from 324c5b7 to 9e21c59 Compare March 25, 2021 04:52
@lhotari
Copy link
Member Author

lhotari commented Mar 25, 2021

/pulsarbot run-failure-checks

@lhotari
Copy link
Member Author

lhotari commented Mar 25, 2021

@merlimat @aahmed-se @sijie @codelipenghui @jerrypeng @zymap @rdhabalia Please review this change. This PR is finally ready for review.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eolivelli eolivelli merged commit 511b0fe into apache:master Mar 25, 2021
@codelipenghui codelipenghui added this to the 2.8.0 milestone Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants