Skip to content

Commit

Permalink
Merge pull request #428 from jjiwooLim/localEsa
Browse files Browse the repository at this point in the history
Enable local esa install feature for OL
  • Loading branch information
cherylking authored Nov 16, 2023
2 parents 653a3be + a8679c5 commit ce03849
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,12 @@ public void installFeatures(boolean isAcceptLicense, List<String> featuresList)
info("Recommended user action: upgrade to OpenLiberty version " + MIN_USER_FEATURE_VERSION + " or higher and provide features-bom file for the user feature esa.");

copyUserFeature(pluginListedEsas, installDirectory);
}
} else {
featuresToInstall.addAll(pluginListedEsas);
}
}



for (String feature: featuresList) {
if (feature.contains(":")) {
Expand Down Expand Up @@ -723,7 +727,7 @@ public void installFeatures(boolean isAcceptLicense, List<String> featuresList)
mapBasedInstallKernel = createMapBasedInstallKernelInstance(bundle, installDirectory);


Collection<?> resolvedFeatures = resolveFeatures(featuresToInstall, jsonRepos, acceptLicenseMapValue);
Collection<?> resolvedFeatures = resolveFeatures(featuresToInstall, jsonRepos, acceptLicenseMapValue, pluginListedEsas);
if(resolvedFeatures == null || resolvedFeatures.isEmpty()) {
return;
}
Expand Down Expand Up @@ -813,16 +817,19 @@ public void installFeatures(boolean isAcceptLicense, List<String> featuresList)
* @throws PluginExecutionException
*/
private Collection<?> resolveFeatures(List<String> featuresToInstall, List<File> jsonRepos,
boolean acceptLicenseMapValue) throws PluginExecutionException {
boolean acceptLicenseMapValue, Set<String> localESA) throws PluginExecutionException {
info("Resolving features... " );

mapBasedInstallKernel.put("install.local.esa", true);
mapBasedInstallKernel.put("single.json.file", jsonRepos);
mapBasedInstallKernel.put("features.to.resolve", featuresToInstall);
mapBasedInstallKernel.put("license.accept", acceptLicenseMapValue);
mapBasedInstallKernel.put("is.install.server.feature", true);


if(!localESA.isEmpty()) {
mapBasedInstallKernel.put("install.individual.esas", true);
mapBasedInstallKernel.put("individual.esas", localESA.stream().map(File::new).collect(Collectors.toList()));
}

Collection<?> resolvedFeatures = (Collection<?>) mapBasedInstallKernel.get("action.result");
if (resolvedFeatures == null) {
debug("action.exception.stacktrace: " + mapBasedInstallKernel.get("action.exception.stacktrace"));
Expand Down

0 comments on commit ce03849

Please sign in to comment.