From 24ea915d7f3f1e352cc8d59eeea2aad707e8b0e8 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Mon, 21 Mar 2022 14:29:40 -0700 Subject: [PATCH] Correct split Maven properties with equals signs --- .../java/org/jenkins/tools/test/PluginCompatTesterCli.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins-compat-tester-cli/src/main/java/org/jenkins/tools/test/PluginCompatTesterCli.java b/plugins-compat-tester-cli/src/main/java/org/jenkins/tools/test/PluginCompatTesterCli.java index 2e75d031a..bd3a8125e 100644 --- a/plugins-compat-tester-cli/src/main/java/org/jenkins/tools/test/PluginCompatTesterCli.java +++ b/plugins-compat-tester-cli/src/main/java/org/jenkins/tools/test/PluginCompatTesterCli.java @@ -161,9 +161,9 @@ public static void main(String[] args) throws IOException, PlexusContainerExcept String[] split = options.getMavenProperties().split("\\s*:\\s*"); Map mavenProps = new HashMap<>(split.length); for (String expr : split) { - String[] split2 = expr.split("="); + String[] split2 = expr.split("=", 2); String key = split2[0]; - String value = split2.length >= 2 ? split2[1] : null; + String value = split2.length == 2 ? split2[1] : null; mavenProps.put(key, value); } config.setMavenProperties(mavenProps);