diff --git a/src/main/groovy/io/openliberty/tools/gradle/tasks/InstallLibertyTask.groovy b/src/main/groovy/io/openliberty/tools/gradle/tasks/InstallLibertyTask.groovy index ac705f96..933f6ecf 100644 --- a/src/main/groovy/io/openliberty/tools/gradle/tasks/InstallLibertyTask.groovy +++ b/src/main/groovy/io/openliberty/tools/gradle/tasks/InstallLibertyTask.groovy @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corporation 2014, 2021. + * (C) Copyright IBM Corporation 2014, 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ class InstallLibertyTask extends AbstractLibertyTask { protected String detachedCoords protected String detachedConfigFilePath // default to install the latest Open Liberty kernel from Maven Central repository - protected String defaultRuntime = "io.openliberty:openliberty-kernel:[19.0.0.9,)" + protected String defaultRuntime = "io.openliberty:openliberty-kernel:[23.0.0.3,)" InstallLibertyTask() { configure({ diff --git a/src/test/groovy/io/openliberty/tools/gradle/BaseDevTest.groovy b/src/test/groovy/io/openliberty/tools/gradle/BaseDevTest.groovy index 1212dad7..d655408a 100644 --- a/src/test/groovy/io/openliberty/tools/gradle/BaseDevTest.groovy +++ b/src/test/groovy/io/openliberty/tools/gradle/BaseDevTest.groovy @@ -26,10 +26,7 @@ import java.nio.file.Files; import java.nio.file.Path; class BaseDevTest extends AbstractIntegrationTest { - static final String projectName = "basic-dev-project"; - - static File resourceDir = new File("build/resources/test/dev-test/" + projectName); - static File buildDir = new File(integTestDir, "dev-test/" + projectName + System.currentTimeMillis()); // append timestamp in case previous build was not deleted + static File buildDir; static String buildFilename = "build.gradle"; final String RUNNING_INSTALL_FEATURE = "Task :installFeature"; final String RUNNING_GENERATE_FEATURES = "Task :generateFeatures"; @@ -57,14 +54,13 @@ class BaseDevTest extends AbstractIntegrationTest { // the correct file. Use logFile for "compilation was successful" // and errFile for "compilation had errors" or Liberty messages like // "CWWKF0011I" or "The server installed the following features". - static File logFile = new File(buildDir, "output.log"); - static File errFile = new File(buildDir, "stderr.log"); + static File logFile; + static File errFile; + static Process process; - protected static void runDevMode() throws IOException, InterruptedException, FileNotFoundException { - System.out.println("Starting dev mode..."); - startProcess("--generateFeatures=true", true); - System.out.println("Started dev mode"); + protected static void runDevMode(File buildDirectory) throws IOException, InterruptedException, FileNotFoundException { + runDevMode("--generateFeatures=true", buildDirectory) } protected static void runDevMode(String params, File buildDirectory) throws IOException, InterruptedException, FileNotFoundException { diff --git a/src/test/groovy/io/openliberty/tools/gradle/DevRecompileTest.groovy b/src/test/groovy/io/openliberty/tools/gradle/DevRecompileTest.groovy index 76096594..f2e798ce 100644 --- a/src/test/groovy/io/openliberty/tools/gradle/DevRecompileTest.groovy +++ b/src/test/groovy/io/openliberty/tools/gradle/DevRecompileTest.groovy @@ -30,12 +30,16 @@ import java.nio.file.Files; import java.nio.file.Path; class DevRecompileTest extends BaseDevTest { + static final String projectName = "basic-dev-project"; + + static File resourceDir = new File("build/resources/test/dev-test/" + projectName); + static File buildDir = new File(integTestDir, "dev-test/" + projectName + System.currentTimeMillis()); // append timestamp in case previous build was not deleted @BeforeClass public static void setup() throws IOException, InterruptedException, FileNotFoundException { createDir(buildDir); createTestProject(buildDir, resourceDir, buildFilename); - runDevMode(); + runDevMode(buildDir); } @Test diff --git a/src/test/groovy/io/openliberty/tools/gradle/DevTest.groovy b/src/test/groovy/io/openliberty/tools/gradle/DevTest.groovy index e883f21a..6f3990f0 100644 --- a/src/test/groovy/io/openliberty/tools/gradle/DevTest.groovy +++ b/src/test/groovy/io/openliberty/tools/gradle/DevTest.groovy @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corporation 2020, 2022. + * (C) Copyright IBM Corporation 2020, 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,12 +30,16 @@ import java.nio.file.Files; import java.nio.file.Path; class DevTest extends BaseDevTest { + static final String projectName = "basic-dev-project"; + + static File resourceDir = new File("build/resources/test/dev-test/" + projectName); + static File buildDir = new File(integTestDir, "dev-test/" + projectName + System.currentTimeMillis()); // append timestamp in case previous build was not deleted @BeforeClass public static void setup() throws IOException, InterruptedException, FileNotFoundException { createDir(buildDir); createTestProject(buildDir, resourceDir, buildFilename); - runDevMode(); + runDevMode(buildDir); } @Test diff --git a/src/test/groovy/io/openliberty/tools/gradle/PollingDevTest.groovy b/src/test/groovy/io/openliberty/tools/gradle/PollingDevTest.groovy index 5e6bd5b6..25ad3849 100644 --- a/src/test/groovy/io/openliberty/tools/gradle/PollingDevTest.groovy +++ b/src/test/groovy/io/openliberty/tools/gradle/PollingDevTest.groovy @@ -35,13 +35,7 @@ class PollingDevTest extends DevTest { public static void setup() throws IOException, InterruptedException, FileNotFoundException { createDir(buildDir); createTestProject(buildDir, resourceDir, buildFilename); - runDevModePolling(); + runDevMode("--pollingTest --generateFeatures=true", buildDir) } - - private static void runDevModePolling() throws IOException, InterruptedException, FileNotFoundException { - System.out.println("Starting dev mode with polling..."); - startProcess("--pollingTest --generateFeatures=true", true); - System.out.println("Started dev mode with polling"); - } - + }