Removing Commons Compress from Jenkins core

38 views
Skip to first unread message

Basil Crow

unread,
May 28, 2024, 11:48:57 AMMay 28
to jenkin...@googlegroups.com
We originally used Ant for tar/untar functionality, but we migrated to
Commons Compress in https://github.com/jenkinsci/jenkins/pull/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 adding Commons Lang 3 to
the WAR would override the library plugin we ship today.

A solution was found in 2.460 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, as verified
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 are 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 add to the WAR. But the
release of 2.460 shows a path forward. With core's dependency on
Commons Compress removed, plugins can be adapted, and we can
eventually remove Commons Compress from core.

Plugins can be adapted by either (in the vast majority of simple
cases) migrating to core's copy of Ant or (in the case of e.g.
pipeline-utility-steps and jobcacher-plugin, both of which use Commons
Compress features that are not currently available in Ant) 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.

Basil Crow

unread,
Jun 24, 2024, 1:21:35 PM (8 days ago) Jun 24
to jenkin...@googlegroups.com
I have filed https://issues.jenkins.io/browse/JENKINS-73355 to track this task.
Reply all
Reply to author
Forward
0 new messages