[JENKINS-10629] Migrate from Commons Compress to Ant #9311
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.
We originally used Ant for tar/untar functionality, but we migrated to Commons Compress in #1670, which also added the Commons Compress library to the WAR. Fast forward to today, and recent releases of Commons Compress depend on Commons Lang 3. We don't want to keep increasing the API surface area of the WAR by pulling in these random libraries. And pulling in Commons Lang 3 would override the library plugin we ship today.
A solution can be found by migrating from Commons Compress back to Ant. Our original reason for migrating away from it was that it did not support large files > 8 GiB in size. Today, it does, and I verified this with an automated test. We are unlikely to ever remove Ant from Jenkins core, as it is used in a lot of places in core, so why not use it for tar/untar functionality as well. And unlike Commons Compress, it has no dependency on Commons Lang 3.
In the meantime, we're still blocked from upgrading to the latest release of Commons Compress, because the latest release depends on Commons Lang 3 which we do not want to introduce. But this PR shows a path forward. With core's dependency on Commons Compress removed, plugins can then be adapted, and we can eventually remove Commons Compress from core. Plugins could be adapted by either migrating to core's copy of Ant (as in this PR) or a new Commons Compress library plugin could be created and plugins migrated to that instead. That Commons Compress library plugin could depend on Commons Lang 3 as a plugin-to-plugin dependency.
Testing done
Ran the new test and it passed after about 2 minutes. I am not enabling it by default as it requires a lot of time and disk space to run.
Proposed changelog entries
N/A
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist