Skip to content

Commit

Permalink
Revert jenkinsci#156 as it makes PCT sensitive to the Internet
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Feb 24, 2020
1 parent e5bb882 commit 4653bf4
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,7 @@ public PluginCompatReport testPlugins()
UpdateSite.Data data = config.getWar() == null ? extractUpdateCenterData(pluginGroupIds) : scanWAR(config.getWar(), pluginGroupIds, "WEB-INF/(?:optional-)?plugins/([^/.]+)[.][hj]pi");
if (!data.plugins.isEmpty()) {
// Scan detached plugins to recover proper Group IDs for them
// We always poll the update center so that we extract groupIDs for dependencies
// In the case of Group ID renaming across version, groupID from the WAR file will have a priority
UpdateSite.Data detachedData = extractUpdateCenterData(pluginGroupIds);
if (config.getWar() != null) {
detachedData = scanWAR(config.getWar(), pluginGroupIds, "WEB-INF/(?:detached-)?plugins/([^/.]+)[.][hj]pi");
}

UpdateSite.Data detachedData = config.getWar() == null ? extractUpdateCenterData(pluginGroupIds) : scanWAR(config.getWar(), pluginGroupIds, "WEB-INF/(?:detached-)?plugins/([^/.]+)[.][hj]pi");

// Add detached if and only if no added as normal one
detachedData.plugins.forEach((key, value) -> {
Expand Down Expand Up @@ -595,6 +589,9 @@ private boolean onlyOnePluginIncluded() {
* @return Update site Data
*/
private UpdateSite.Data extractUpdateCenterData(Map<String, String> groupIDs){
if (config.getWar() != null) {
throw new IllegalStateException("Not to be used when -war is specified");
}
URL url;
String jsonp;
try {
Expand Down

0 comments on commit 4653bf4

Please sign in to comment.