Skip to content

Commit

Permalink
Merge pull request #116 from raul-arabaolaza/JENKINS-56321
Browse files Browse the repository at this point in the history
[JENKINS-56321] Scan detached plugins to get proper group id
  • Loading branch information
Raúl Arabaolaza Barquin committed Feb 28, 2019
2 parents 02a7f3c + 9d0a51f commit 76930e5
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -608,8 +608,9 @@ private UpdateSite.Data scanWAR(File war, Map<String, String> 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);
Expand Down

0 comments on commit 76930e5

Please sign in to comment.