HDDS-10496. Fetch dependencies using actual build #6359
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
maven-dependency-plugin
seems to ignore exclusions of transitive dependencies (MDEP-844), resulting in larger than necessary Maven cache (including a 250MB jar foraws-java-sdk-bundle
via Ranger).This PR changes the
populate-cache
workflow to run a regular build for creating the cache (suggested in MDEP-904). This reduces cache size from 750MB to 360MB.Shading is skipped to speed up the build. A new property
maven.shade.skip
is added to only skip actual shading while still building (some)ozonefs
modules. Onlyozonefs-hadoop2
is included, not the ones for Hadoop 3. The latter are unnecessary, since we already get the same dependencies by using the same version of Hadoop for Ozone elsewhere.Few plugins are not included in the cache this way, but they do not affect build time significantly.
https://issues.apache.org/jira/browse/HDDS-10496
How was this patch tested?
cache build:
https://github.com/adoroszlai/ozone/actions/runs/8215546994/job/22469127579
regular CI (using cache):
https://github.com/adoroszlai/ozone/actions/runs/8215582668