Skip to content

Commit

Permalink
[JENKINS-56321] Scan detached plugins to get proper group id
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-arabaolaza committed Feb 28, 2019
1 parent 653758c commit 9d0a51f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
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 9d0a51f

Please sign in to comment.