src/main/java/net/wasdev/wlp/common/plugins/util/InstallFeatureUtil.java
public static Set<String> getOpenLibertyFeatureSet(Set<File> jsons) throws PluginExecutionException {
        Set<String> libertyFeatures = new HashSet<String>();
        for (File file : jsons) {
            Scanner s = null;
            try {
                s = new Scanner(file);
                // scan Maven coordinates for artifactIds that belong to the Open Liberty groupId
                while (s.findWithinHorizon(OPEN_LIBERTY_GROUP_ID + ":([^:]*):", 0) != null) {
                    MatchResult match = s.match();
                    if (match.groupCount() >= 1) {
                        libertyFeatures.add(match.group(1));
                    }
                }
            } catch (FileNotFoundException e) {
                throw new PluginExecutionException("The JSON file is not found at " + file.getAbsolutePath(), e);
            } finally {
                if (s != null) {
                    s.close();
                }
            }
        }
        return libertyFeatures;
    }
public static Set<String> getOpenLibertyFeatureSet(Set<File> jsons) throws PluginExecutionException {
        Set<String> libertyFeatures = new HashSet<String>();
        for (File file : jsons) {
            Scanner s = null;
            try {
                s = new Scanner(file);
                // scan Maven coordinates for artifactIds that belong to the Open Liberty groupId
                while (s.findWithinHorizon(OPEN_LIBERTY_GROUP_ID + ":([^:]*):", 0) != null) {
                    MatchResult match = s.match();
                    if (match.groupCount() >= 1) {
                        libertyFeatures.add(match.group(1));
                    }
                }
            } catch (FileNotFoundException e) {
                throw new PluginExecutionException("The JSON file is not found at " + file.getAbsolutePath(), e);
            } finally {
                if (s != null) {
                    s.close();
                }
            }
        }
        return libertyFeatures;
    }
Gets the set of all Open Liberty features by scanning the product JSONs.

@param jsons The set of product JSON files to scan
@return set of all Open Liberty features
@throws PluginExecutionException if any of the JSONs could not be found