diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..237dda4
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,8 @@
+#!/usr/bin/groovy
+
+buildPlugin(failFast: false,
+ configurations: [
+ [platform: 'linux', jdk: '17', jenkins: '2.346.1'],
+ [platform: 'linux', jdk: '11'],
+ [platform: 'windows', jdk: '8'],
+ ])
diff --git a/pom.xml b/pom.xml
index 3841976..349e6d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 2.5
+ 4.47
org.jvnet.hudson.tools
@@ -14,17 +14,7 @@
hpi
-
- 1.625.3
-
- 7
-
-
- 2.1
-
+ 2.332.4
Version Number Plug-In
@@ -89,32 +79,38 @@
+
+
+
+ io.jenkins.tools.bom
+ bom-2.332.x
+ 1607.va_c1576527071
+ pom
+ import
+
+
+
+
org.jenkins-ci.plugins.workflow
workflow-api
- 1.15
org.jenkins-ci.plugins.workflow
- workflow-aggregator
- 1.14
+ workflow-cps
test
org.jenkins-ci.plugins.workflow
- workflow-support
- 1.14
- tests
+ workflow-job
test
-
- org.jenkins-ci.modules
- sshd
- 1.6
+ org.jenkins-ci.plugins.workflow
+ workflow-basic-steps
test
diff --git a/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberCommon.java b/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberCommon.java
index 3cf6f39..bf7d548 100644
--- a/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberCommon.java
+++ b/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberCommon.java
@@ -180,7 +180,7 @@ public static String formatVersionNumber(String versionNumberFormatString,
else {
LOGGER.fine("Special case: A variable could not be resolved. (Does it resolve to itself?)" +
" [var == " + expressionKey + "]");
- if (enVars != null) {
+
for (Map.Entry entry : enVars.entrySet()) {
if (entry.getKey().equals(expressionKey)) {
// Check for variable which resolves to itself!
@@ -195,7 +195,7 @@ public static String formatVersionNumber(String versionNumberFormatString,
replaceValue = selectSubstringOfReplaceValue(replaceValue, argumentString);
}
}
- }
+
}
}
vnf = vnf.substring(0, blockStart) + replaceValue + vnf.substring(blockEnd, vnf.length());