From fcedbcec5bfff3786d0b8868bbec2e38bbfdbec0 Mon Sep 17 00:00:00 2001 From: James Nord Date: Wed, 13 Nov 2019 16:53:29 +0000 Subject: [PATCH 1/3] Use BOM from Jenkins (#229) * Use BOM from Jenkins * Remove dependencies duplicated from jenkins-bom. * Moved some more entries from dependencyManagement to bom. * Created no-jenkins-bom profile to capture the 'old' dependencyManagement. * Add some missing dependencies when not using Jenkins BOM. * Reset jenkins.version to 2.190-SNAPSHOT. * Update pom.xml Co-Authored-By: Tim Jacomb * Use jenkins.version 2.195 now that it includes the BOM. * java.level=8 for compatibility with animal-sniffer-annotations@1.18 * Put default no-bom jenkins.version back to 2.138.4 use-jenkins-bom profile sets jenkins.version=2.195 as minimum bom-capable version. * Add some Core BOM info & links to README. * Update pom.xml Co-Authored-By: Oleg Nenashev * Match test jenkins.version to java.level. --- README.md | 13 +++ pom.xml | 174 +++++++++++++++++++++++++------ src/it/beta-just-testing/pom.xml | 4 +- 3 files changed, 156 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index ae554cfc6f..e199af0962 100644 --- a/README.md +++ b/README.md @@ -210,3 +210,16 @@ By default, the setup wizard (Jenkins >= 2.0) is skipped when using `hpi:run`. I mvn -Dhudson.Main.development=false hpi:run +## 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>=4.0) 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 + +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/). diff --git a/pom.xml b/pom.xml index f26691fc98..9883c50a51 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,6 @@ true - 1.7.25 4.0.0 2.13.1 0.23.0 @@ -96,11 +95,13 @@ 1.11.2 true - 1.16 + + 1.16 ${access-modifier.version} ${access-modifier.version} - 1.17 + 1.18 + false https://repo.jenkins-ci.org/incrementals/ @@ -111,17 +112,6 @@ - - - com.github.spotbugs - spotbugs-annotations - 3.1.12 - - - net.jcip - jcip-annotations - 1.0 - org.jenkins-ci.main jenkins-core @@ -149,6 +139,7 @@ junit 4.12 + javax.servlet javax.servlet-api @@ -183,20 +174,6 @@ 1.0 signature - - - commons-logging - commons-logging - 1.2 - provided - - - log4j - log4j - 1.2.17 - provided - - @@ -286,7 +264,6 @@ org.slf4j slf4j-api - ${slf4jVersion} provided true @@ -295,25 +272,21 @@ org.slf4j log4j-over-slf4j - ${slf4jVersion} test org.slf4j jcl-over-slf4j - ${slf4jVersion} test org.slf4j slf4j-jdk14 - ${slf4jVersion} test org.kohsuke access-modifier-annotation - ${access-modifier-annotation.version} provided @@ -328,6 +301,7 @@ provided + + no-jenkins-bom + + + !use-jenkins-bom + + + + 1.7.26 + + + + + 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 + + + + + + + org.slf4j + log4j-over-slf4j + ${slf4jVersion} + test + + + org.slf4j + jcl-over-slf4j + ${slf4jVersion} + test + + + org.slf4j + slf4j-jdk14 + ${slf4jVersion} + test + + + org.kohsuke + access-modifier-annotation + ${access-modifier-annotation.version} + provided + + + org.jenkins-ci + annotation-indexer + + + + + + + + use-jenkins-bom + + + use-jenkins-bom + + + + 2.195 + + + + + org.jenkins-ci.main + jenkins-bom + ${jenkins.version} + pom + import + + + + uninherited-java.level diff --git a/src/it/beta-just-testing/pom.xml b/src/it/beta-just-testing/pom.xml index 64d3d093d2..f837065afb 100644 --- a/src/it/beta-just-testing/pom.xml +++ b/src/it/beta-just-testing/pom.xml @@ -13,8 +13,8 @@ 1.0-SNAPSHOT pom - 2.7.3 - 7 + 2.60.3 + 8 true From cd144ee9b5cf2f6513463a1114b864356e24020b Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Wed, 13 Nov 2019 18:14:08 +0100 Subject: [PATCH 2/3] [maven-release-plugin] prepare release plugin-3.52 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9883c50a51..a26883bbff 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.jenkins-ci.plugins plugin - 3.52-SNAPSHOT + 3.52 pom Jenkins Plugin Parent POM @@ -39,7 +39,7 @@ scm:git:ssh://git@github.com/jenkinsci/plugin-pom.git scm:git:ssh://git@github.com/jenkinsci/plugin-pom.git https://github.com/jenkinsci/plugin-pom - HEAD + plugin-3.52 @@ -844,7 +844,7 @@