New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build] Use absolute path to locate license and checkstyle plugin config #8918
Conversation
6c0a619
to
f49d954
Compare
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
@lhotari I pushed a change to make sql integration become more stable. otherwise, CI will not pass. |
Fixes apache#8911, compiling a sub module individually in the sub module directory - use proposed solution of https://stackoverflow.com/a/37965143 to set a property "pulsar.basedir" which contains the absolute path to the root directory - all other solutions don't seem to work universally in all projects, for example "project.parent.basedir" isn't available in the root project and not all projects necessarily have the root project as their parent project. - when running "license:check" or "checkstyle:checkstyle" directly, it is necessary to add "initialize" phase to the command line, for example: "mvn initialize license:check" or "mvn initialize checkstyle:checkstyle" - maven isn't intended to be used for calling individual tasks, it's recommended to use phases such as "mvn verify"
9315079
to
6e67cb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you very much
/pulsarbot rerun-failure-checks |
Motivation
Fixes #8911, compiling a sub module individually in the sub module directory
Previously, the maven build failed if executed in other than the root directory if the license or checkstyle checks were run since
those plugins weren't able to find their configuration.
Modifications
use proposed solution of https://stackoverflow.com/a/37965143
to set a property
pulsar.basedir
which contains the absolute pathto the root directory
for example
project.parent.basedir
isn't available in theroot project and not all projects necessarily have the root project
as their parent project.
when running
license:check
orcheckstyle:checkstyle
directly,it is necessary to add
initialize
phase to the command line,since the
pulsar.basedir
property gets set in theinitialize
phase.for example:
mvn initialize license:check
ormvn initialize checkstyle:checkstyle
as
mvn verify
instead of listing plugin goals on the command line.