Repository navigation
HDDS-17838. Add Maven Wrapper - #12070
Conversation
chihsuan
left a comment
There was a problem hiding this comment.
Thanks for working on this! @adoroszlai
Left two inline comments. Also, should s3a-test.sh use the wrapper too? It still runs plain mvn.
| echo "protobuf=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.protobuf.version)" >> $GITHUB_OUTPUT | ||
| echo "grpc=$(./mvnw help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.grpc.version)" >> $GITHUB_OUTPUT | ||
| echo "netty=$(./mvnw help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.netty.version)" >> $GITHUB_OUTPUT | ||
| echo "protobuf=$(./mvnw help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.protobuf.version)" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
Looks like this runs in the ratis-thirdparty checkout. Should we keep mvn here, or every ratis-thirdparty we check out here have mvnw?
There was a problem hiding this comment.
Looks like this runs in the
ratis-thirdpartycheckout.
Correct.
Should we keep
mvnhere, or every ratis-thirdparty we check out here havemvnw?
ratis-thirdparty had mvnw for few months, since 1.1.0. In practice, I think past versions are unlikely to be built here (although the workflow is not "smart", it re-builds releases as well).
Yes, keeping mvn would be safer, I can restore it.
|
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
|
Thanks @chihsuan for the review. |
What changes were proposed in this pull request?
Maven repository downloaded with Maven 3.10 does not work with Maven 3.9, entries are downloaded again. Currently GitHub's Ubuntu 24.04 runner comes with Maven 3.10, while Ubuntu 26.04 includes.
populate-cacheruns on 24.04, so it produces a cache that is not usable by some other jobs that run on 26.04 (basic, acceptance).This PR adds Maven Wrapper to Ozone to ensure the same Maven version independent of the environment. (Ratis already uses it.)
errorprone.batsused to fake themvncommand to testerrorprone.sh. The latter is now split to two parts, and only the processing ofoutput.logis tested.get_versionhelper function added to reduce duplicatedmvn help:evaluatecommands.Fetch plugin dependenciesbeforeGet versions, which needs those plugins.https://issues.apache.org/jira/browse/HDDS-17838
How was this patch tested?
populate-cache: https://github.com/adoroszlai/ozone/actions/runs/43956117342
CI: https://github.com/adoroszlai/ozone/actions/runs/43958031996