diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2dbfe5a7..1c73252b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -18,13 +18,13 @@ jobs: matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: RUNTIME: [ol, wlp] - RUNTIME_VERSION: [22.0.0.12, 22.0.0.9] + RUNTIME_VERSION: [22.0.0.12, 23.0.0.3] java: [17, 11, 8] exclude: - java: 8 - RUNTIME_VERSION: 22.0.0.9 + RUNTIME_VERSION: 22.0.0.12 - java: 17 - RUNTIME_VERSION: 22.0.0.9 + RUNTIME_VERSION: 22.0.0.12 name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux steps: # Checkout repos @@ -98,15 +98,15 @@ jobs: matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: RUNTIME: [ol, wlp] - RUNTIME_VERSION: [22.0.0.12, 22.0.0.9] + RUNTIME_VERSION: [22.0.0.12, 23.0.0.3] java: [17, 11, 8] exclude: - java: 8 - RUNTIME_VERSION: 22.0.0.9 + RUNTIME_VERSION: 22.0.0.12 - java: 8 RUNTIME: wlp - java: 17 - RUNTIME_VERSION: 22.0.0.9 + RUNTIME_VERSION: 22.0.0.12 name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows steps: # Checkout repos diff --git a/src/main/groovy/io/openliberty/tools/gradle/tasks/AbstractFeatureTask.groovy b/src/main/groovy/io/openliberty/tools/gradle/tasks/AbstractFeatureTask.groovy index 5ea5aa44..151d0f20 100644 --- a/src/main/groovy/io/openliberty/tools/gradle/tasks/AbstractFeatureTask.groovy +++ b/src/main/groovy/io/openliberty/tools/gradle/tasks/AbstractFeatureTask.groovy @@ -62,33 +62,33 @@ public class AbstractFeatureTask extends AbstractServerTask { } @Override - void debug(String msg) { + public void debug(String msg) { if (isDebugEnabled()) { logger.debug(msg); } } @Override - void error(String msg, Throwable throwable) { + public void error(String msg, Throwable throwable) { logger.error(msg, e); } @Override - void debug(String msg, Throwable throwable) { + public void debug(String msg, Throwable throwable) { if (isDebugEnabled()) { logger.debug(msg, (Throwable) e); } } @Override - void debug(Throwable throwable) { + public void debug(Throwable throwable) { if (isDebugEnabled()) { logger.debug("Throwable exception received: " + e.getMessage(), (Throwable) e); } } @Override - void warn(String msg) { + public void warn(String msg) { if (!suppressLogs) { logger.warn(msg); } else { @@ -97,7 +97,7 @@ public class AbstractFeatureTask extends AbstractServerTask { } @Override - void info(String msg) { + public void info(String msg) { if (!suppressLogs) { logger.lifecycle(msg); } else { @@ -245,9 +245,10 @@ public class AbstractFeatureTask extends AbstractServerTask { * @return instance of ServerFeatureUtil */ @Internal - protected ServerFeatureUtil getServerFeatureUtil(boolean suppressLogs) { + protected ServerFeatureUtil getServerFeatureUtil(boolean suppressLogs, Map libDirPropFiles) { if (servUtil == null) { servUtil = new ServerFeatureTaskUtil(); + servUtil.setLibertyDirectoryPropertyFiles(libDirPropFiles); } if (suppressLogs) { servUtil.setSuppressLogs(true); diff --git a/src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy b/src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy index 28a87c34..23e6885e 100644 --- a/src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy +++ b/src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corporation 2019, 2021. + * (C) Copyright IBM Corporation 2019, 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -315,8 +315,8 @@ class DevTask extends AbstractFeatureTask { false /* recompileDependencies only supported in ci.maven */, packagingType, buildFile, null /* parent build files */, generateFeatures, null /* compileArtifactPaths */, null /* testArtifactPaths */, new ArrayList() /* webResources */ ); - ServerFeatureUtil servUtil = getServerFeatureUtil(true); this.libertyDirPropertyFiles = AbstractServerTask.getLibertyDirectoryPropertyFiles(installDirectory, userDirectory, serverDirectory); + ServerFeatureUtil servUtil = getServerFeatureUtil(true, libertyDirPropertyFiles); this.existingFeatures = servUtil.getServerFeatures(serverDirectory, libertyDirPropertyFiles); this.existingLibertyFeatureDependencies = new HashSet(); @@ -686,7 +686,7 @@ class DevTask extends AbstractFeatureTask { @Override public void installFeatures(File configFile, File serverDir, boolean generateFeatures) { - ServerFeatureUtil servUtil = getServerFeatureUtil(true); + ServerFeatureUtil servUtil = getServerFeatureUtil(true, libertyDirPropertyFiles); Set features = servUtil.getServerFeatures(serverDir, libertyDirPropertyFiles); if (features == null) { @@ -738,7 +738,7 @@ class DevTask extends AbstractFeatureTask { @Override public ServerFeatureUtil getServerFeatureUtilObj() { // suppress logs from ServerFeatureUtil so that dev console is not flooded - return getServerFeatureUtil(true); + return getServerFeatureUtil(true, libertyDirPropertyFiles); } @Override @@ -748,7 +748,7 @@ class DevTask extends AbstractFeatureTask { @Override public void updateExistingFeatures() { - ServerFeatureUtil servUtil = getServerFeatureUtil(true); + ServerFeatureUtil servUtil = getServerFeatureUtil(true, libertyDirPropertyFiles); Set features = servUtil.getServerFeatures(getServerDir(project), libertyDirPropertyFiles); existingFeatures = features; } diff --git a/src/main/groovy/io/openliberty/tools/gradle/tasks/GenerateFeaturesTask.groovy b/src/main/groovy/io/openliberty/tools/gradle/tasks/GenerateFeaturesTask.groovy index 17729728..8db57926 100644 --- a/src/main/groovy/io/openliberty/tools/gradle/tasks/GenerateFeaturesTask.groovy +++ b/src/main/groovy/io/openliberty/tools/gradle/tasks/GenerateFeaturesTask.groovy @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corporation 2021, 2022. + * (C) Copyright IBM Corporation 2021, 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +98,7 @@ class GenerateFeaturesTask extends AbstractFeatureTask { } */ // get existing server features from source directory - ServerFeatureUtil servUtil = getServerFeatureUtil(true); + ServerFeatureUtil servUtil = getServerFeatureUtil(true, null); Set generatedFiles = new HashSet(); generatedFiles.add(GENERATED_FEATURES_FILE_NAME);