Skip to content

Conversation

@jonesbusy
Copy link
Contributor

See my comment here #152 (comment)

I did a very quick test to ensure it work as expected

Screenshot from 2025-01-05 06-36-02

@gounthar gounthar enabled auto-merge (squash) January 5, 2025 08:46
@gounthar gounthar merged commit 9fdc0d2 into jenkinsci:master Jan 5, 2025
17 checks passed
@jonesbusy jonesbusy deleted the feature/reduce-hpi-size branch January 5, 2025 09:40
@MarkEWaite
Copy link
Contributor

MarkEWaite commented Jan 5, 2025

As far as I can tell, this pull request did not change the contents of the hpi file. It also did not remove the transient inclusion of commons-collections4 from the hpi file.

The build log from ci.jenkins.io build 160 includes the change and says:

 [INFO] Assembling webapp plot in /home/jenkins/agent/workspace/Plugins_plot-plugin_master/target/plot
 [INFO] Bundling direct dependency opencsv-5.9.jar
 [WARNING] Bundling transitive dependency commons-collections4-4.4.jar (via opencsv)
 [INFO] Generating hpi /home/jenkins/agent/workspace/Plugins_plot-plugin_master/target/plot.hpi

The build log from ci.jenkins.io build 159 does not include the change and says:

 [INFO] Assembling webapp plot in /home/jenkins/agent/workspace/Plugins_plot-plugin_master/target/plot
 [INFO] Bundling direct dependency opencsv-5.9.jar
 [WARNING] Bundling transitive dependency commons-collections4-4.4.jar (via opencsv)
 [INFO] Generating hpi /home/jenkins/agent/workspace/Plugins_plot-plugin_master/target/plot.hpi

The mvn dependency:tree output for the current code on the master branch shows:

[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.4:provided
[INFO] |  \- commons-collections:commons-collections:jar:3.2.2:provided
[INFO] +- io.jenkins.plugins:commons-lang3-api:jar:3.17.0-84.vb_b_938040b_078:compile
[INFO] |  \- org.apache.commons:commons-lang3:jar:3.17.0:compile
[INFO] +- io.jenkins.plugins:commons-text-api:jar:1.12.0-129.v99a_50df237f7:compile
[INFO] |  \- org.apache.commons:commons-text:jar:1.12.0:compile
[INFO] +- org.jenkins-ci.plugins:matrix-project:jar:839.vff91cd7e3a_b_2:compile
...
[INFO] +- com.opencsv:opencsv:jar:5.9:compile
[INFO] |  \- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-job:jar:1400.v7fd111b_ec82f:test

As far as I can tell from that output, commons-collections4 needs to be included as a transitive dependency because no other dependency provides it.

The most recent commons text API plugin release 1.12.0-129.v99a_50df237f7 does not include commons-collections4, The jar files it includes are:

WEB-INF/lib/commons-text-1.12.0.jar
WEB-INF/lib/commons-text-api.jar

@jonesbusy where did you find that commons-text API provides commons-collections4? I don't see that in any of my checks.

@MarkEWaite MarkEWaite added the chore General project maintenance label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore General project maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants