Is an explicit dependency on jenkins-test-harness now needed?

52 views
Skip to first unread message

Chris Kilding

unread,
Sep 14, 2021, 5:44:57 AM9/14/21
to jenkin...@googlegroups.com
Hi,

I've seen the following dependency error in 2 plugins regarding jenkins-test-harness:

Require upper bound dependencies error for org.jenkins-ci.main:jenkins-test-harness:1529.v4fd5bafdcd33 paths to dependency are:
22:20:04 +-io.jenkins.plugins:aws-secrets-manager-secret-source:0.0.2-SNAPSHOT
22:20:04 +-org.jenkins-ci.main:jenkins-test-harness:1529.v4fd5bafdcd33
22:20:04 and
22:20:04 +-io.jenkins.plugins:aws-secrets-manager-secret-source:0.0.2-SNAPSHOT
22:20:04 +-io.jenkins.configuration-as-code:test-harness:1.52
22:20:04 +-org.jenkins-ci.main:jenkins-test-harness:1529.v4fd5bafdcd33 (managed) <-- org.jenkins-ci.main:jenkins-test-harness:1589.vc23fca066d5c

Both projects use CasC, so they have been inheriting the actual jenkins-test-harness dependency transitively through config-as-code test harness. This was fine until BOM 937.v51fde92016ed, when the error started.

Is it now necessary to include an explicit jenkins-test-harness dependency in a project's POM (to fix this), and if so is this stated anywhere?

Regards,

Chris

Oleg Nenashev

unread,
Sep 14, 2021, 5:55:11 AM9/14/21
to Jenkins Developers
I'd guess it is a temporary issue caused by JCasC test dependency being higher than your current version of Plugin POM. JCasC test harness depends on JTH explicitly.

IMHO it is time to make one step forward and to include JCasC test harness and into Jenkins Test Harness or to Plugin POM by default. There is wide adoption of JCasC test automation thanks to so many contributors, and IMHO there is no particular point in making users to explicitly define it these days. Opinions?

Tim Jacomb

unread,
Sep 14, 2021, 6:27:27 AM9/14/21
to Jenkins Developers
Yeah that happens when JCasC bumps the parent pom, you need to bump your parent pom as well

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/033ceeaf-187a-4012-9f7a-c576d172fdfcn%40googlegroups.com.

Chris Kilding

unread,
Sep 14, 2021, 6:35:46 AM9/14/21
to jenkin...@googlegroups.com
I'm a bit stuck on that as parent POM 4.20+ requires Maven 3.8.1+. IntelliJ's embedded Maven is only 3.6.2 at the moment which leads to build troubles inside the IDE.

I emailed Jetbrains support to ask if they can bump the embedded Maven version to at least 3.8.1 - but that'll be a while coming. If they're going to do it we're probably looking this landing in IDEA 2022.1.

I believe there is a ticket for this on Youtrack that can be upvoted: https://youtrack.jetbrains.com/issue/IDEA-274703

Chris

Chris Kilding

unread,
Sep 14, 2021, 6:39:55 AM9/14/21
to jenkin...@googlegroups.com

IMHO it is time to make one step forward and to include JCasC test harness and into Jenkins Test Harness or to Plugin POM by default. There is wide adoption of JCasC test automation thanks to so many contributors, and IMHO there is no particular point in making users to explicitly define it these days. Opinions?

+1 from my perspective, as a plugin developer who uses them. (Though the people that maintain them may have a different view.)

Chris

Jesse Glick

unread,
Sep 14, 2021, 8:35:13 AM9/14/21
to Jenkins Dev
On Tue, Sep 14, 2021 at 5:55 AM Oleg Nenashev <o.v.ne...@gmail.com> wrote:
it is time [to] include JCasC test harness […] into Jenkins Test Harness

Not possible. It depends on plugins.
 
or to Plugin POM

No. If you want to depend on JCasC the `bom` sets up versions for you. (For most cases you should not need to explicitly mention JCasC in your plugin since you should just be defining settings using simple, plain idioms that work automatically in any context—GUI forms, Pipeline, JCasC. It is necessary however when you are forced into weird Java structures for compatibility reasons.)

The correct solution here is to update the parent POM as Tim says, or use an older version of JCasC. If your IDE does not let you run a current version of a tool, run it from a shell instead, or use a different IDE to run local tests. As a workaround you could specify an explicit `jenkins-test-harness.version` in your POM pending a parent update, or even try to add an `exclusion` from `io.jenkins.configuration-as-code:test-harness` and hope that JCasC was not actually relying on recently introduced features.

Tim Jacomb

unread,
Sep 14, 2021, 4:35:23 PM9/14/21
to jenkin...@googlegroups.com
Why do you need to use the embedded version of maven?

I use IntelliJ and have no problem setting it to use my local maven 3.8.x.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages