diff --git a/plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java b/plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java index 6cf128c5e..b6357ba68 100644 --- a/plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java +++ b/plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java @@ -608,8 +608,9 @@ private UpdateSite.Data scanWAR(File war, Map pluginGroupIds) th top.put("core", new JSONObject().accumulate("name", "core").accumulate("version", m.group(1)).accumulate("url", "https://foobar")); } - //TODO: should it also scan detached plugins info? - m = Pattern.compile("WEB-INF/(?:optional-)?plugins/([^/.]+)[.][hj]pi").matcher(name); + // We should also scan detached plugins to make sure we get the proper groupId for detached not using the + // default org.jenkins-ci one + m = Pattern.compile("WEB-INF/(?:(optional-|detached-))?plugins/([^/.]+)[.][hj]pi").matcher(name); if (m.matches()) { JSONObject plugin = new JSONObject().accumulate("url", ""); InputStream is = jf.getInputStream(entry);