From e5b32d4b1b48b875e257723b420362b8b113ef74 Mon Sep 17 00:00:00 2001 From: James Nord Date: Fri, 13 Dec 2019 13:57:35 +0000 Subject: [PATCH 01/33] remove findbugs legacy and skip profile --- pom.xml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index 6d0a83a6e5..79d4f2f69a 100644 --- a/pom.xml +++ b/pom.xml @@ -64,19 +64,12 @@ 1 ${concurrency} false - - true - Medium - default - - - ${findbugs.failOnError} - ${findbugs.threshold} + Medium - ${findbugs.effort} + Default true @@ -1136,18 +1129,6 @@ 4 - - skip-spotbugs-with-tests - - - skipTests - true - - - - true - - skip-node-tests From a0be78d2f547451f0656f8d967469cce78628a02 Mon Sep 17 00:00:00 2001 From: James Nord Date: Fri, 13 Dec 2019 16:34:13 +0000 Subject: [PATCH 02/33] always run integration tests for this pom --- pom.xml | 95 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 46 insertions(+), 49 deletions(-) diff --git a/pom.xml b/pom.xml index 79d4f2f69a..923b15eb00 100644 --- a/pom.xml +++ b/pom.xml @@ -745,6 +745,52 @@ + + + + org.codehaus.mojo + mrm-maven-plugin + 1.2.0 + false + + + + start + stop + + + repository.proxy.url + + + + + + + + + maven-invoker-plugin + 3.2.1 + false + + + integration-test + + install + run + + + true + true + ${project.build.directory}/its + ${basedir}/target/local-repo + src/it/settings.xml + + ${repository.proxy.url} + + + + + @@ -1571,55 +1617,6 @@ - - run-plugin-pom-its - - - - org.codehaus.mojo - mrm-maven-plugin - 1.2.0 - - - - start - stop - - - repository.proxy.url - - - - - - - - - maven-invoker-plugin - 3.2.1 - - - integration-test - - install - run - - - true - true - ${project.build.directory}/its - ${basedir}/target/local-repo - src/it/settings.xml - - ${repository.proxy.url} - - - - - - - - jmh-benchmark From 9ca3bdb82b12a1034a367757a110984418bfb606 Mon Sep 17 00:00:00 2001 From: James Nord Date: Fri, 13 Dec 2019 18:29:57 +0000 Subject: [PATCH 03/33] remove old concurrency override --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 923b15eb00..a816776b01 100644 --- a/pom.xml +++ b/pom.xml @@ -61,8 +61,7 @@ ${java.level} - 1 - ${concurrency} + false + quick-build + + + true + true + true + true + true + + From 09cde3789f44281f2594f018885023628e08b42f Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 16:42:38 +0000 Subject: [PATCH 06/33] findbugs is dead --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 705e12f987..0b72119f48 100644 --- a/pom.xml +++ b/pom.xml @@ -1054,7 +1054,6 @@ jenkins-release ${release.skipTests} - ${release.skipTests} ${release.skipTests} From 38a5f3c672d7a19d3cde6424f23b926c23dbf288 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 16:43:23 +0000 Subject: [PATCH 07/33] executable-war is not needed, just use the war --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0b72119f48..ab79379dce 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ org.jenkins-ci.main jenkins-war ${jenkins-war.version} - executable-war + war test @@ -209,7 +209,7 @@ org.jenkins-ci.main jenkins-war - executable-war + war test From 320374a6f6e5ffd2c96b34851523ac3fa08516f3 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 21:40:17 +0000 Subject: [PATCH 08/33] [JENKINS-60474] unconditionally enable the jenkins-bom for library dep versions --- pom.xml | 261 +++++---------------- src/it/benchmark/pom.xml | 2 +- src/it/beta-fail/pom.xml | 2 +- src/it/beta-just-testing/pom.xml | 2 +- src/it/beta-pass/pom.xml | 2 +- src/it/incrementals-and-plugin-bom/pom.xml | 2 +- src/it/sample-plugin/pom.xml | 2 +- src/it/undefined-java-level/pom.xml | 2 +- 8 files changed, 65 insertions(+), 210 deletions(-) diff --git a/pom.xml b/pom.xml index ab79379dce..64e37b99c6 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.jenkins-ci.plugins plugin - 3.55-SNAPSHOT + 4.0-SNAPSHOT pom Jenkins Plugin Parent POM @@ -49,10 +49,11 @@ -Xms768M -Xmx768M -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 - 2.138.4 + 2.204 ${jenkins.version} ${jenkins.version} + ${jenkins.version} 2.56 3.11 1.17 @@ -104,6 +105,13 @@ + + org.jenkins-ci.main + jenkins-bom + ${jenkins-bom.version} + pom + import + org.jenkins-ci.main jenkins-core @@ -194,12 +202,7 @@ - - - javax.servlet - javax.servlet-api - provided - + org.jenkins-ci.main jenkins-core @@ -212,6 +215,53 @@ war test + + + javax.servlet + javax.servlet-api + provided + + + + + com.github.spotbugs + spotbugs-annotations + provided + true + + + net.jcip + jcip-annotations + provided + true + + + + + org.codehaus.mojo + animal-sniffer-annotations + provided + true + + + + commons-logging + commons-logging + provided + + + org.kohsuke + access-modifier-annotation + provided + + + + org.jenkins-ci + annotation-indexer + + + + org.jenkins-ci.main jenkins-test-harness @@ -814,201 +864,6 @@ - - - no-jenkins-bom - - - !use-jenkins-bom - - - - 1.7.25 - - - - - com.github.spotbugs - spotbugs-annotations - 3.1.12 - - - net.jcip - jcip-annotations - 1.0 - - - - commons-logging - commons-logging - 1.2 - provided - - - log4j - log4j - 1.2.17 - provided - - - org.slf4j - slf4j-api - ${slf4jVersion} - - provided - - true - - - org.slf4j - log4j-over-slf4j - ${slf4jVersion} - test - - - org.slf4j - jcl-over-slf4j - ${slf4jVersion} - test - - - org.slf4j - slf4j-jdk14 - ${slf4jVersion} - test - - - - - - - com.github.spotbugs - spotbugs-annotations - provided - true - - - net.jcip - jcip-annotations - provided - true - - - - org.codehaus.mojo - animal-sniffer-annotations - provided - true - - - - org.slf4j - log4j-over-slf4j - test - - - org.slf4j - jcl-over-slf4j - test - - - org.slf4j - slf4j-jdk14 - test - - - org.kohsuke - access-modifier-annotation - ${access-modifier-annotation.version} - provided - - - org.jenkins-ci - annotation-indexer - - - - - commons-logging - commons-logging - provided - - - - - - use-jenkins-bom - - - use-jenkins-bom - - - - 2.195 - - - - - org.jenkins-ci.main - jenkins-bom - ${jenkins.version} - pom - import - - - - - - - com.github.spotbugs - spotbugs-annotations - provided - true - - - net.jcip - jcip-annotations - provided - true - - - - org.codehaus.mojo - animal-sniffer-annotations - provided - true - - - commons-logging - commons-logging - provided - - - org.kohsuke - access-modifier-annotation - ${access-modifier-annotation.version} - provided - - - org.jenkins-ci - annotation-indexer - - - - - uninherited-java.level diff --git a/src/it/benchmark/pom.xml b/src/it/benchmark/pom.xml index e56be8c582..84a3b22fb6 100644 --- a/src/it/benchmark/pom.xml +++ b/src/it/benchmark/pom.xml @@ -13,7 +13,7 @@ 1.0-SNAPSHOT jar - 2.60.3 + 2.204 8 diff --git a/src/it/beta-fail/pom.xml b/src/it/beta-fail/pom.xml index d8e8fb8064..153ab36869 100644 --- a/src/it/beta-fail/pom.xml +++ b/src/it/beta-fail/pom.xml @@ -13,7 +13,7 @@ 1.0-SNAPSHOT pom - 2.60.3 + 2.204 8 true diff --git a/src/it/beta-just-testing/pom.xml b/src/it/beta-just-testing/pom.xml index f837065afb..29d795760c 100644 --- a/src/it/beta-just-testing/pom.xml +++ b/src/it/beta-just-testing/pom.xml @@ -13,7 +13,7 @@ 1.0-SNAPSHOT pom - 2.60.3 + 2.204 8 true diff --git a/src/it/beta-pass/pom.xml b/src/it/beta-pass/pom.xml index 53453574bd..9a32cd10b0 100644 --- a/src/it/beta-pass/pom.xml +++ b/src/it/beta-pass/pom.xml @@ -13,7 +13,7 @@ 1.0-SNAPSHOT pom - 2.107.1 + 2.204 8 true diff --git a/src/it/incrementals-and-plugin-bom/pom.xml b/src/it/incrementals-and-plugin-bom/pom.xml index 1fea796056..30f3fe96d9 100644 --- a/src/it/incrementals-and-plugin-bom/pom.xml +++ b/src/it/incrementals-and-plugin-bom/pom.xml @@ -14,7 +14,7 @@ 1.0 -SNAPSHOT - 2.176.4 + 2.204 8 diff --git a/src/it/sample-plugin/pom.xml b/src/it/sample-plugin/pom.xml index a93ae2429b..2eb60ee04d 100644 --- a/src/it/sample-plugin/pom.xml +++ b/src/it/sample-plugin/pom.xml @@ -13,7 +13,7 @@ 1.0-SNAPSHOT hpi - 2.60.3 + 2.204 8 diff --git a/src/it/undefined-java-level/pom.xml b/src/it/undefined-java-level/pom.xml index 38736d5245..067bc56328 100644 --- a/src/it/undefined-java-level/pom.xml +++ b/src/it/undefined-java-level/pom.xml @@ -13,7 +13,7 @@ 1.0-SNAPSHOT hpi - 2.32.3 + 2.204 From 45699826ecef116ffd46cbd601160f6af6603b36 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 22:23:09 +0000 Subject: [PATCH 09/33] there is no excuse for allowing evry single plugin to have falky tests. Plugins that have flaky tests due to infra requirements etc should opt in to this. --- pom.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pom.xml b/pom.xml index 64e37b99c6..9c4549514a 100644 --- a/pom.xml +++ b/pom.xml @@ -1011,17 +1011,6 @@ always - - rerunFailingTests - - - !test - - - - 4 - - skip-node-tests From 50bfd7322f2f25aae0510c6f918570e7f489140e Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 22:39:39 +0000 Subject: [PATCH 10/33] remove an unneeded property (plugin.minimumJavaVersion) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9c4549514a..d4d9d18f85 100644 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,7 @@ -Xms768M -Xmx768M -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 + 2.204 ${jenkins.version} @@ -58,7 +59,6 @@ 3.11 1.17 you-must-override-the-java.level-property - 1.${java.level} ${java.level} @@ -642,7 +642,7 @@ /jenkins - ${plugin.minimumJavaVersion} + 1.${java.level} ${hudson.Main.development} From 11afd7d52c8a9afbfbf0b434d005717e0fb72b71 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 22:47:42 +0000 Subject: [PATCH 11/33] inline trimStackTrace and add failsafe to the build. Adding failsafe allows people to write JenkinsRule style tests as ITs so that they can easily run normal unit tests and git quicker feedback in isolation from failsafe style tests with slower feedback should they desire. jacoco needs to be bound to its default verify in order to pick up coverage from IT tests --- pom.xml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d4d9d18f85..c14425ca58 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,6 @@ ${java.level} - false @@ -732,6 +731,26 @@ maven-surefire-plugin + + false + + + hudson.udp + -1 + + + java.io.tmpdir + ${surefireTempDir} + + + alphabetical + + + + maven-failsafe-plugin + + + false hudson.udp @@ -1085,7 +1104,6 @@ report - prepare-package report From f21e6cbcc4751055fd9707f2705c8b7d9890d2cf Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 22:48:06 +0000 Subject: [PATCH 12/33] whitespace changes to make following easier --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index c14425ca58..8a7224495a 100644 --- a/pom.xml +++ b/pom.xml @@ -55,6 +55,7 @@ ${jenkins.version} ${jenkins.version} ${jenkins.version} + 2.56 3.11 1.17 @@ -82,6 +83,7 @@ + git 1.11.2 From 111563636bc5d606f0890eb1ec9caaffbf954c45 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 22:49:18 +0000 Subject: [PATCH 13/33] remove support for jgit provider installing and configuring git should be pretty simple. --- pom.xml | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/pom.xml b/pom.xml index 8a7224495a..732bddb909 100644 --- a/pom.xml +++ b/pom.xml @@ -84,9 +84,6 @@ - - git - 1.11.2 true @@ -1295,50 +1292,6 @@ - - jgit-scm-provider - - - git.provider - jgit - - - - - - maven-release-plugin - - - ${git.provider} - - - - - org.apache.maven.scm - maven-scm-provider-jgit - ${maven-scm.version} - - - - - maven-scm-plugin - ${maven-scm.version} - - - ${git.provider} - - - - - org.apache.maven.scm - maven-scm-provider-jgit - ${maven-scm.version} - - - - - - consume-incrementals From 9afd792ac0391c8115d8ddf8d3d0212c0084f0c2 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 23:49:09 +0000 Subject: [PATCH 14/33] leave a better reference for people about timestamped snapshots --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 732bddb909..a71b0e74a2 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ -Xms768M -Xmx768M -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 2.204 - + ${jenkins.version} ${jenkins.version} ${jenkins.version} From 5efade228cf698ad508c9b956da861012ffa45cb Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 16 Dec 2019 23:53:49 +0000 Subject: [PATCH 15/33] InjectedTest is a generated test source and these are already excluded. --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index a71b0e74a2..b054d4c99b 100644 --- a/pom.xml +++ b/pom.xml @@ -355,11 +355,6 @@ maven-source-plugin 3.2.0 - - - InjectedTest.java - - maven-war-plugin From 755371c3a3dc14939723cfe2323531e13b9f2dfa Mon Sep 17 00:00:00 2001 From: James Nord Date: Tue, 17 Dec 2019 16:21:57 +0000 Subject: [PATCH 16/33] enforce no snapshots for releases. WHilst the m-r-p should do this there are occaisons where it does not, and we do not actually force people to release with the m-r-p --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index b054d4c99b..7b5b0d9000 100644 --- a/pom.xml +++ b/pom.xml @@ -558,6 +558,10 @@ net.java.dev.jna:jna + + No Snapshots Allowed For Release Versions + true + From 97cabd7e41f8ae7b350a4641ac7b0c10a9711803 Mon Sep 17 00:00:00 2001 From: James Nord Date: Tue, 17 Dec 2019 18:21:07 +0000 Subject: [PATCH 17/33] the snapshot rule needs special handling so we can run an ITs against a snapshot parent... --- pom.xml | 17 ++++++++++++++++- src/it/incrementals-and-plugin-bom/pom.xml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b5b0d9000..82129ddae3 100644 --- a/pom.xml +++ b/pom.xml @@ -558,8 +558,23 @@ net.java.dev.jna:jna + + + + + no-snapshots-in-release + validate + + enforce + + + + - No Snapshots Allowed For Release Versions + No SNAPSHOT versions are allowed for releases true diff --git a/src/it/incrementals-and-plugin-bom/pom.xml b/src/it/incrementals-and-plugin-bom/pom.xml index 30f3fe96d9..8f3671eff9 100644 --- a/src/it/incrementals-and-plugin-bom/pom.xml +++ b/src/it/incrementals-and-plugin-bom/pom.xml @@ -17,6 +17,22 @@ 2.204 8 + + + + + maven-enforcer-plugin + + + + no-snapshots-in-release + none + + + + + + repo.jenkins-ci.org From 367d4e942b726f2e22459979f4a8f8493b787380 Mon Sep 17 00:00:00 2001 From: James Nord Date: Tue, 17 Dec 2019 18:27:52 +0000 Subject: [PATCH 18/33] remove old animal sniffer versions we only need to support 1.8 or newer (but in reality it is just 1.8) --- pom.xml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pom.xml b/pom.xml index 82129ddae3..e100896888 100644 --- a/pom.xml +++ b/pom.xml @@ -148,24 +148,6 @@ animal-sniffer-annotations ${animal.sniffer.version} - - org.codehaus.mojo.signature - java15 - 1.0 - signature - - - org.codehaus.mojo.signature - java16 - 1.1 - signature - - - org.codehaus.mojo.signature - java17 - 1.0 - signature - org.codehaus.mojo.signature java18 From 48070e4cfad80cb3d4e6a264f2fc6df4900b28b1 Mon Sep 17 00:00:00 2001 From: James Nord Date: Tue, 17 Dec 2019 18:29:13 +0000 Subject: [PATCH 19/33] you can not activate profiles based on properties defined in a project thus this profile was as much use as a chocolate fire guard and has been terminated with extreme prejudice --- pom.xml | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/pom.xml b/pom.xml index e100896888..6755637534 100644 --- a/pom.xml +++ b/pom.xml @@ -889,36 +889,6 @@ 8 - - deprecated-java.level-7 - - - java.level - 7 - - - - - - maven-antrun-plugin - - - warn-deprecated-java.level - initialize - - - WARNING: Plugin POM defines java.level=${java.level} which is deprecated in the current Plugin POM version. See https://github.com/jenkinsci/plugin-pom/blob/master/README.md#java-support - - - - run - - - - - - - jenkins-release From a498d8a20116111e10b4f7cbec8af87979e56490 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 18 Dec 2019 13:07:29 +0000 Subject: [PATCH 20/33] tidy up some comments --- pom.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6755637534..a677d41f2a 100644 --- a/pom.xml +++ b/pom.xml @@ -188,13 +188,14 @@ jenkins-core provided - + org.jenkins-ci.main jenkins-war war test + javax.servlet @@ -225,6 +226,7 @@ + commons-logging commons-logging provided From b28f137064c08f5b943da6d9f52d719f3cbda088 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 18 Dec 2019 13:08:37 +0000 Subject: [PATCH 21/33] define spotbugs plugin version in pluginManagement --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a677d41f2a..b2a822d831 100644 --- a/pom.xml +++ b/pom.xml @@ -436,6 +436,11 @@ false + + com.github.spotbugs + spotbugs-maven-plugin + 3.1.12.2 + @@ -576,7 +581,6 @@ com.github.spotbugs spotbugs-maven-plugin - 3.1.12.2 ${spotbugs.failOnError} From 2e284e71d8684316708f106524732e69c0319d79 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 18 Dec 2019 13:10:19 +0000 Subject: [PATCH 22/33] make this a beta version as suggested by @oleg-nenashev --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b2a822d831..647f58a43b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.jenkins-ci.plugins plugin - 4.0-SNAPSHOT + 4.0-beta-SNAPSHOT pom Jenkins Plugin Parent POM From 793f39fe5b6bc81d9b6843ab337db5d04fa24b6a Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 18 Dec 2019 13:14:38 +0000 Subject: [PATCH 23/33] no need to enable the profile - its always active now --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 340a9745d0..e58a9d988e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ node('maven') { // TODO Azure mirror ansiColor('xterm') { withEnv(['MAVEN_OPTS=-Djansi.force=true']) { - sh 'mvn -B -Dstyle.color=always -ntp -Prun-plugin-pom-its clean verify' + sh 'mvn -B -Dstyle.color=always -ntp clean verify' } } } From 3e6251453c32ad4e53d2bb28fbb6889c1ffdf504 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 18 Dec 2019 13:23:46 +0000 Subject: [PATCH 24/33] skip the invoker plugin in the quick-build profile --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 647f58a43b..d510a56880 100644 --- a/pom.xml +++ b/pom.xml @@ -1432,6 +1432,7 @@ true true true + true From 7dc1c18872deddcc7a3be23f39884cd43dc7313d Mon Sep 17 00:00:00 2001 From: James Nord Date: Fri, 20 Dec 2019 14:32:20 +0000 Subject: [PATCH 25/33] turns out the executable-war is magic. without it JenkinsRule tests fail with things like ``` 26.565 [id=86] WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=jenkins.slaves.JnlpSlaveAgentProtocol4, annotation=[none]]; skipping this component java.security.KeyStoreException: JENKINS-41987: no X509Certificate found; perhaps instance-identity module is missing or too old at jenkins.slaves.JnlpSlaveAgentProtocol4.(JnlpSlaveAgentProtocol4.java:105) at jenkins.slaves.JnlpSlaveAgentProtocol4$$FastClassByGuice$$b470638c.newInstance() at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32) at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:567) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) Caused: com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) Error injecting constructor, java.security.KeyStoreException: JENKINS-41987: no X509Certificate found; perhaps instance-identity module is missing or too old at jenkins.slaves.JnlpSlaveAgentProtocol4.(JnlpSlaveAgentProtocol4.java:101) 1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:439) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:401) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:392) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344) at hudson.ExtensionList.load(ExtensionList.java:381) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317) at hudson.ExtensionList.iterator(ExtensionList.java:172) at jenkins.AgentProtocol.of(AgentProtocol.java:112) at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:284) ``` --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b0828c6f1f..f9477862e7 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,7 @@ org.jenkins-ci.main jenkins-war ${jenkins-war.version} - war + executable-war test @@ -193,7 +193,7 @@ org.jenkins-ci.main jenkins-war - war + executable-war test From 642ef9d6d7e8f7c8c7f8c712048ba0f602173982 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 12:29:31 +0000 Subject: [PATCH 26/33] Fix up building now that we always run the integration tests --- CONTRIBUTING.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 36ab93ba7c..a7bb1d64cc 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -13,7 +13,7 @@ For major changes we usually expect a reference implementation to be provided in To run and build the repository with integration tests, you can execute - mvn -Prun-plugin-pom-its clean verify + mvn clean verify ## Building and using snapshots @@ -21,8 +21,8 @@ Snapshots might be needed to provide reference implementations for Plugin POM pa If you are a plugin maintainer with account on Jenkins artifactory, you can deploy a Plugin POM snapshot using this command: - mvn clean deploy - + mvn clean deploy + Once the snapshot is deployed, you will see a timestamped snapshot version in Maven console output. Then you can just replace the Plugin POM version in your downstream PRs by this version so that you can demonstrate the build on ci.jenkins.io From d246f1c6054263e9571e34f9898aaf80908271d5 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 12:30:58 +0000 Subject: [PATCH 27/33] there is no information and that URL is garbage so just remove it It just caused confusion introduced in #204 with comment https://github.com/jenkinsci/plugin-pom/pull/204/files#r288900798 --- CONTRIBUTING.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index a7bb1d64cc..fc641fcc4c 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -31,7 +31,6 @@ Then you can just replace the Plugin POM version in your downstream PRs by this ### Managing release notes * Changelog drafts are automatically by link:https://github.com/toolmantim/release-drafter[Release Drafter] -* See the documentation about Jenkins Release Drafter configuration link:https://github.com/jenkinsci/.github/blob/master/docs/release-drafter.adoc[here] * When merging pull requests... ** Make sure to modify pull request titles to make them user-friendly ** Set proper labels so the changelog is categorized From 59018c0b1a0f043507cf05111a52a798da3fd19f Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 13:54:13 +0000 Subject: [PATCH 28/33] just activate the benchmark profile with a standard profile activation Do not use a property to activate a profile, just activate the profile directly --- README.md | 4 ++-- pom.xml | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b787082795..bf14da5431 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,9 @@ See [Incrementals](https://github.com/jenkinsci/incrementals-tools) for details. To run JMH benchmarks from JUnit tests, you must run you must activate the `benchmark` profile. For example: ```bash -mvn -Dbenchmark test +mvn -P jmh-benchmark test ``` -When the `benchmark` property is set, no tests apart from JMH benchmarks will be run. +When the `jmh-benchmark` profile is enabled, no tests apart from JMH benchmarks will be run. The names of the classes containing the benchmark runners should either begin with or end with the word `Benchmark`. For example, `FooBenchmark` and `BenchmarkFoo` will be detected when using `-Dbenchmark`, however, `FooBar` will be ignored. diff --git a/pom.xml b/pom.xml index d3069e8aa1..6e9db18805 100644 --- a/pom.xml +++ b/pom.xml @@ -1402,11 +1402,6 @@ jmh-benchmark - - - benchmark - - From bf90d5998d354a71b0a029f213cc62fef055efc7 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 13:54:37 +0000 Subject: [PATCH 29/33] Update README --- README.md | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index bf14da5431..de93b19e39 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ This new parent POM is decoupled from the core Jenkins project, both from the Maven and repository perspectives. +Since version 4.0 the plugin pom supports Jenkins 2.200 and higher and a select few older LTS lines (TBD) + The main changes are: * Reduced number of overridable properties. All references (e.g. dependencies and plugin versions) not thought to be overridden are no longer based on properties. The main remaining overridable properties are: @@ -15,12 +17,11 @@ thought to be overridden are no longer based on properties. The main remaining o See [Java Support](#java-support) for more info. * `jenkins-test-harness.version`: The [JTH version](https://github.com/jenkinsci/jenkins-test-harness/releases) used to test plugin. Uses split test-harness (see [JENKINS-32478](https://issues.jenkins-ci.org/browse/JENKINS-32478)). - If the required Jenkins version is 1.580.1 or higher, JTH 2.1+ is recommended. * `hpi-plugin.version`: The HPI Maven Plugin version used by the plugin. (Generally you should not set this to a version _lower_ than that specified in the parent POM.) * `stapler-plugin.version`: The Stapler Maven plugin version required by the plugin. * `java.level.test`: The Java version to use to build the plugin tests. - * In order to make their versions the same as the used core version, `slf4jVersion`, `node.version` and `npm.version` + * In order to make their versions the same as the used core version, `node.version` and `npm.version` properties are provided. * Tests are skipped during the `perform` phase of a release (can be overridden by setting `release.skipTests` to false). * Javadoc has been set to _quiet_ by default in 2.20+, which means it will only log errors and warnings. @@ -60,27 +61,9 @@ If you had a `jar:test-jar` execution, delete it and add to `properties`: The plugin POM is designed for plugin builds with JDK 8 or above, but target `java.level` for a plugin may differ from a JDK version used for the build. -Starting from Plugin POM `3.44`, support of Java 7 targets in Plugin POM is deprecated, -`java.level=8` and `jenkins.version>2.59` are expected to be used for most plugins. +Starting from Plugin POM `3.44`, support of Java 7 targets in Plugin POM is deprecated and has been removed in `4.0`, +`java.level=8` and `jenkins.version>2.204.1` are expected to be used for most plugins. -### Using deprecated Java targets - -If recent plugin POM versions are required for a plugin with older baselines, -a developer can use dependency version system properties to downgrade components incompatible with Java 7. - -Example: - -```xml - - 2.32.3 - 7 - - 1.17 - -``` - -Such mode is no longer tested in the repository, -and the list of incompatible dependencies will expand without further notice in new releases. ## Incrementals @@ -213,13 +196,7 @@ By default, the setup wizard (Jenkins >= 2.0) is skipped when using `hpi:run`. I ## Jenkins Core BOM Since version 2.195, Jenkins provides a [Maven Bill Of Materials (BOM)](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies) -that centrally defines versions of various libraries used by Jenkins Core. -The default behaviour of `plugin-pom` is to _not_ use the BOM, but when jenkins.version>=2.195 (and plugin-pom>=3.54) you can switch on Jenkins BOM support by setting the Maven property `use-jenkins-bom`. -For example: - -`mvn -Djenkins.version=2.195 -Duse-jenkins-bom package` - -This will import the BOM for Jenkins 2.195 +that centrally defines versions of various libraries used by Jenkins Core and should make it easier to update to newer Jenkins Core versions For more information, see the [Dependency Management](https://jenkins.io/doc/developer/plugin-development/dependency-management/) section of the [plugin development guide](https://jenkins.io/doc/developer/plugin-development/). From 15e346fb0c6f7605b17477244159f761a6220bb4 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 14:04:03 +0000 Subject: [PATCH 30/33] change version to 4.0-beta-1-SNAPSHOT Co-Authored-By: Oleg Nenashev --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6e9db18805..fe6e7d9a4b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.jenkins-ci.plugins plugin - 4.0-beta-SNAPSHOT + 4.0-beta-1-SNAPSHOT pom Jenkins Plugin Parent POM From 19dab6c2b2c50cfee46dd9fb59105579a31de782 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 14:21:14 +0000 Subject: [PATCH 31/33] benchmark activation is via profile --- src/it/benchmark/invoker.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/it/benchmark/invoker.properties b/src/it/benchmark/invoker.properties index 3de462e252..06c07a105c 100644 --- a/src/it/benchmark/invoker.properties +++ b/src/it/benchmark/invoker.properties @@ -1 +1 @@ -invoker.goals=-Dstyle.color=always -ntp -Dbenchmark clean test +invoker.goals=-P jmh-benchmark -Dstyle.color=always -ntp clean test From 8c9203c241a4bec5a40f502e62979dee97f2cc28 Mon Sep 17 00:00:00 2001 From: James Nord Date: Mon, 23 Dec 2019 14:27:14 +0000 Subject: [PATCH 32/33] make it easier to consume a plugin-pom PR in a incrementals PR --- pom.xml | 2 ++ src/it/incrementals-and-plugin-bom/pom.xml | 15 --------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index fe6e7d9a4b..da09d54fc6 100644 --- a/pom.xml +++ b/pom.xml @@ -566,6 +566,8 @@ No SNAPSHOT versions are allowed for releases true + + false diff --git a/src/it/incrementals-and-plugin-bom/pom.xml b/src/it/incrementals-and-plugin-bom/pom.xml index 8f3671eff9..70a3694cdf 100644 --- a/src/it/incrementals-and-plugin-bom/pom.xml +++ b/src/it/incrementals-and-plugin-bom/pom.xml @@ -18,21 +18,6 @@ 8 - - - - maven-enforcer-plugin - - - - no-snapshots-in-release - none - - - - - - repo.jenkins-ci.org From c13f62671dc3b8e5cb3b26c3d3cb1a4867e9f237 Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Tue, 24 Dec 2019 11:08:38 +0100 Subject: [PATCH 33/33] Restore the release drafter link --- CONTRIBUTING.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index fc641fcc4c..f6c23bf8b3 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -31,6 +31,7 @@ Then you can just replace the Plugin POM version in your downstream PRs by this ### Managing release notes * Changelog drafts are automatically by link:https://github.com/toolmantim/release-drafter[Release Drafter] +** See the documentation about Jenkins Release Drafter configuration link:https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc[here] * When merging pull requests... ** Make sure to modify pull request titles to make them user-friendly ** Set proper labels so the changelog is categorized