Skip to content

Commit

Permalink
Additional platform changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cbridgha committed Sep 5, 2024
1 parent aaf89ec commit 2dec508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ public void copyUserFeature(Set<String> pluginListedEsas, File installDirectory
* installed
*/
@SuppressWarnings("unchecked")
public void installFeatures(boolean isAcceptLicense, List<String> featuresList)
public void installFeatures(boolean isAcceptLicense, List<String> featuresList, List<String> platformsList)
throws PluginExecutionException {

Map<String, String> featureToExtMap = new HashMap<String, String>();
Expand Down Expand Up @@ -727,7 +727,7 @@ public void installFeatures(boolean isAcceptLicense, List<String> featuresList)
mapBasedInstallKernel = createMapBasedInstallKernelInstance(bundle, installDirectory);


Collection<?> resolvedFeatures = resolveFeatures(featuresToInstall, jsonRepos, acceptLicenseMapValue, pluginListedEsas);
Collection<?> resolvedFeatures = resolveFeatures(featuresToInstall, platformsList,jsonRepos, acceptLicenseMapValue, pluginListedEsas);
if(resolvedFeatures == null || resolvedFeatures.isEmpty()) {
return;
}
Expand Down Expand Up @@ -816,13 +816,14 @@ public void installFeatures(boolean isAcceptLicense, List<String> featuresList)
* @return Collection of resolved features
* @throws PluginExecutionException
*/
private Collection<?> resolveFeatures(List<String> featuresToInstall, List<File> jsonRepos,
private Collection<?> resolveFeatures(List<String> featuresToInstall,List<String> platforms, List<File> jsonRepos,
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("platforms", platforms);
mapBasedInstallKernel.put("license.accept", acceptLicenseMapValue);
mapBasedInstallKernel.put("is.install.server.feature", true);
if(!localESA.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void testInstallFeatures() throws Exception {
InstallFeatureUtil util = getNewInstallFeatureUtil();
List<String> featuresToInstall = new ArrayList<String>();
featuresToInstall.add("a-1.0");
util.installFeatures(true, featuresToInstall);
util.installFeatures(true, featuresToInstall, new ArrayList<String>());
}

@Test
Expand Down

0 comments on commit 2dec508

Please sign in to comment.