Skip to content

[JENKINS-63269] - Exclude JUnit and Hamcrest from the dependency list#2

Merged
oleg-nenashev merged 1 commit into
masterfrom
oleg-nenashev-patch-1
Aug 2, 2020
Merged

[JENKINS-63269] - Exclude JUnit and Hamcrest from the dependency list#2
oleg-nenashev merged 1 commit into
masterfrom
oleg-nenashev-patch-1

Conversation

@oleg-nenashev

@oleg-nenashev oleg-nenashev commented Aug 1, 2020

Copy link
Copy Markdown
Member

While working on Jenkinsfile Runner, I have noticed that the Jenkins Core includes JUnit JAR and Hamcrest JARs as transitive dependencies. Looks like it was my mistake in 2017 when I was working on a custom patch for commons-httpclient with vulnerability fix backports. It leads to 350KB of extra libraries, and, which is worse, potentially messes up the classpaths for testing environments and plugins.

https://issues.jenkins-ci.org/browse/JENKINS-63269

Dependency tree:

[INFO] +- io.jenkins.jenkinsfile-runner:setup:jar:1.0-beta-16-SNAPSHOT:compile
[INFO] |  +- org.jenkins-ci.main:jenkins-core:jar:2.246:compile
....
[INFO] |  |  +- org.kohsuke.stapler:json-lib:jar:2.4-jenkins-2:compile
[INFO] |  |  |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] |  |  +- commons-httpclient:commons-httpclient:jar:3.1-jenkins-1:compile
[INFO] |  |  |  \- junit:junit:jar:4.13:compile
[INFO] |  |  |     \- org.hamcrest:hamcrest-core:jar:1.3:compile

Screenshot of a jenkins.war:

image

image

@oleg-nenashev oleg-nenashev requested a review from a team August 1, 2020 18:58
@oleg-nenashev oleg-nenashev changed the title Exclude JUnit from the dependency list Exclude JUnit and Hamcrest from the dependency list Aug 1, 2020
@oleg-nenashev oleg-nenashev changed the title Exclude JUnit and Hamcrest from the dependency list [JENKINS-63269] - Exclude JUnit and Hamcrest from the dependency list Aug 1, 2020
@oleg-nenashev

Copy link
Copy Markdown
Member Author

Looks like I need to add CI there ...

@oleg-nenashev

Copy link
Copy Markdown
Member Author

I will verify it in the master branch. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants