From 928211010e2cd2442d5c8b3fae5afe343cbb6e22 Mon Sep 17 00:00:00 2001 From: Cheryl King Date: Wed, 10 Jan 2024 10:22:03 -0600 Subject: [PATCH 1/4] Change warnings to info or debug --- .../maven/server/StartDebugMojoSupport.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java index a909ef918..442b2a06f 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java @@ -548,7 +548,7 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { // copy server.xml file to server directory if end-user explicitly set it. if (serverXmlFile != null && serverXmlFile.exists()) { if (serverXMLPath != null && ! serverXmlFile.getCanonicalPath().equals(serverXMLPath)) { - getLog().warn("The " + serverXMLPath + " file is overwritten by the "+serverXmlFile.getCanonicalPath()+" file."); + getLog().info("The " + serverXMLPath + " file is overwritten by the "+serverXmlFile.getCanonicalPath()+" file."); } Copy copy = (Copy) ant.createTask("copy"); copy.setFile(serverXmlFile); @@ -563,20 +563,20 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { if (optionsFile.exists() && jvmOptionsPath == null) { // if using pre-existing installation, do not delete file if (installType != InstallType.ALREADY_EXISTS) { - getLog().warn(optionsFile.getCanonicalPath() + " file deleted before processing plugin configuration."); + getLog().info(optionsFile.getCanonicalPath() + " file deleted before processing plugin configuration."); optionsFile.delete(); } } if (jvmOptions != null || !jvmMavenPropValues.isEmpty()) { if (jvmOptionsPath != null) { - getLog().warn("The " + jvmOptionsPath + " file is overwritten by inlined configuration."); + getLog().info("The " + jvmOptionsPath + " file is overwritten by inlined configuration."); } jvmOptionsResolved = handleLatePropertyResolution(jvmOptions); writeJvmOptions(optionsFile, jvmOptionsResolved, jvmMavenPropValues); jvmOptionsPath = "inlined configuration"; } else if (jvmOptionsFile != null && jvmOptionsFile.exists()) { if (jvmOptionsPath != null) { - getLog().warn("The " + jvmOptionsPath + " file is overwritten by the "+jvmOptionsFile.getCanonicalPath()+" file."); + getLog().info("The " + jvmOptionsPath + " file is overwritten by the "+jvmOptionsFile.getCanonicalPath()+" file."); } Copy copy = (Copy) ant.createTask("copy"); copy.setFile(jvmOptionsFile); @@ -591,20 +591,20 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { if (bootstrapFile.exists() && bootStrapPropertiesPath == null) { // if using pre-existing installation, do not delete file if (installType != InstallType.ALREADY_EXISTS) { - getLog().warn(bootstrapFile.getCanonicalPath() + " file deleted before processing plugin configuration."); + getLog().info(bootstrapFile.getCanonicalPath() + " file deleted before processing plugin configuration."); bootstrapFile.delete(); } } if (bootstrapProperties != null || !bootstrapMavenProps.isEmpty()) { if (bootStrapPropertiesPath != null) { - getLog().warn("The " + bootStrapPropertiesPath + " file is overwritten by inlined configuration."); + getLog().info("The " + bootStrapPropertiesPath + " file is overwritten by inlined configuration."); } bootstrapPropertiesResolved = handleLatePropertyResolution(bootstrapProperties); writeBootstrapProperties(bootstrapFile, bootstrapPropertiesResolved, bootstrapMavenProps); bootStrapPropertiesPath = "inlined configuration"; } else if (bootstrapPropertiesFile != null && bootstrapPropertiesFile.exists()) { if (bootStrapPropertiesPath != null) { - getLog().warn("The " + bootStrapPropertiesPath + " file is overwritten by the "+ bootstrapPropertiesFile.getCanonicalPath()+" file."); + getLog().info("The " + bootStrapPropertiesPath + " file is overwritten by the "+ bootstrapPropertiesFile.getCanonicalPath()+" file."); } Copy copy = (Copy) ant.createTask("copy"); copy.setFile(bootstrapPropertiesFile); @@ -626,7 +626,7 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { // Do a special case merge but ONLY if there are no other config options present envPropsToWrite = mergeSpecialPropsFromInstallServerEnvIfAbsent(envMavenProps); } else if (serverEnvPath != null) { - getLog().warn("The " + serverEnvPath + " file is overwritten by inlined configuration."); + getLog().info("The " + serverEnvPath + " file is overwritten by inlined configuration."); } writeServerEnvProperties(envFile, envPropsToWrite); serverEnvPath = "inlined configuration"; @@ -642,7 +642,7 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { File pluginVariableConfig = new File(serverDirectory, PLUGIN_VARIABLE_CONFIG_OVERRIDES_XML); if (pluginVariableConfig.exists()) { - getLog().warn(pluginVariableConfig.getCanonicalPath() + " file deleted before processing plugin configuration."); + getLog().debug(pluginVariableConfig.getCanonicalPath() + " file deleted before processing plugin configuration."); pluginVariableConfig.delete(); } if (!varMavenProps.isEmpty()) { @@ -651,7 +651,7 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { pluginVariableConfig = new File(serverDirectory, PLUGIN_VARIABLE_CONFIG_DEFAULTS_XML); if (pluginVariableConfig.exists()) { - getLog().warn(pluginVariableConfig.getCanonicalPath() + " file deleted before processing plugin configuration."); + getLog().debug(pluginVariableConfig.getCanonicalPath() + " file deleted before processing plugin configuration."); pluginVariableConfig.delete(); } if (!defaultVarMavenProps.isEmpty()) { From 3b257c0a55c0d36ef8341a331d17a74e9321c120 Mon Sep 17 00:00:00 2001 From: Cheryl King Date: Wed, 10 Jan 2024 14:24:57 -0600 Subject: [PATCH 2/4] Debug dev-it test --- .github/workflows/maven.yml | 121 +++++++++--------- .../dev/it/MultiModuleRunInstallEarTest.java | 17 ++- 2 files changed, 73 insertions(+), 65 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f02835fb8..ccbef5bee 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,14 +21,9 @@ jobs: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: - RUNTIME: [ol, wlp] - RUNTIME_VERSION: [23.0.0.10] - java: [21, 17, 11, 8] - exclude: - - java: 8 - RUNTIME: wlp - - java: 11 - RUNTIME: ol + RUNTIME: [ol] + RUNTIME_VERSION: [23.0.0.12] + java: [21] name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux steps: # Checkout repos @@ -67,60 +62,60 @@ jobs: # Run tests that require a minimum of Java 17 or later - name: Run tests that require a minimum of Java 17 or later if: ${{ matrix.java == '17' || matrix.java == '21'}} - run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" - # Run tests - - name: Run tests - run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*dev-i*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + # # Run tests + # - name: Run tests + # run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" # WINDOWS BUILD - build-windows: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - # test against latest update of each major Java version, as well as specific updates of LTS versions: - RUNTIME: [ol, wlp] - RUNTIME_VERSION: [23.0.0.10] - java: [21, 17, 11, 8] - exclude: - - java: 8 - RUNTIME: ol - - java: 11 - RUNTIME: wlp - name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows - steps: - # Checkout repos - - name: Checkout ci.maven - uses: actions/checkout@v3 - - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - cache: 'maven' - # Move and cloning to C: drive for Windows for more disk space - - name: Clone ci.ant, ci.common, ci.maven repos to C drive - run: | - cp -r D:/a/ci.maven/ci.maven C:/ci.maven - git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common - git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant - - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 - with: - maven-version: 3.9.2 - # Install ci.ant - - name: Install ci.ant - working-directory: C:/ci.ant - run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests - # Install ci.common - - name: Install ci.common - working-directory: C:/ci.common - run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests - # Run tests that require a minimum of Java 17 or later - - name: Run tests that require a minimum of Java 17 or later - if: ${{ matrix.java == '17' || matrix.java == '21'}} - run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" - # Run tests - - name: Run tests - working-directory: C:/ci.maven - run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + # build-windows: + # runs-on: windows-latest + # strategy: + # fail-fast: false + # matrix: + # # test against latest update of each major Java version, as well as specific updates of LTS versions: + # RUNTIME: [ol, wlp] + # RUNTIME_VERSION: [23.0.0.10] + # java: [21, 17, 11, 8] + # exclude: + # - java: 8 + # RUNTIME: ol + # - java: 11 + # RUNTIME: wlp + # name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows + # steps: + # # Checkout repos + # - name: Checkout ci.maven + # uses: actions/checkout@v3 + # - name: Setup Java ${{ matrix.java }} + # uses: actions/setup-java@v3 + # with: + # distribution: 'temurin' + # java-version: ${{ matrix.java }} + # cache: 'maven' + # # Move and cloning to C: drive for Windows for more disk space + # - name: Clone ci.ant, ci.common, ci.maven repos to C drive + # run: | + # cp -r D:/a/ci.maven/ci.maven C:/ci.maven + # git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common + # git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant + # - name: Set up Maven + # uses: stCarolas/setup-maven@v4.5 + # with: + # maven-version: 3.9.2 + # # Install ci.ant + # - name: Install ci.ant + # working-directory: C:/ci.ant + # run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests + # # Install ci.common + # - name: Install ci.common + # working-directory: C:/ci.common + # run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests + # # Run tests that require a minimum of Java 17 or later + # - name: Run tests that require a minimum of Java 17 or later + # if: ${{ matrix.java == '17' || matrix.java == '21'}} + # run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + # # Run tests + # - name: Run tests + # working-directory: C:/ci.maven + # run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" diff --git a/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java b/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java index e77a8ab38..1efc9919c 100644 --- a/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java +++ b/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java @@ -52,8 +52,21 @@ public static void setUpBeforeClass() throws Exception { @Test public void notOverwriteExistingM2Test() throws Exception { // Check that the file was already created (from the run() during setup) - File ear = new File(System.getProperty("user.home"), ".m2/repository/io/openliberty/guides/guide-maven-multimodules-ear/1.0-SNAPSHOT/guide-maven-multimodules-ear-1.0-SNAPSHOT.ear"); - assertTrue(ear.exists()); + File m2Repo = new File(System.getProperty("user.home"), ".m2/repository"); + assertTrue("The local .m2 repo does not exist at: "+m2Repo.getAbsolutePath(), m2Repo.exists()); + File earModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-ear"); + if (!earModule.exists()) { + // try sleeping a bit in case it is not built yet? + Thread.sleep(30000); // 30 secs + // look for jar/war modules? + File jarModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-jar"); + assertTrue("The jar module does not exist in the local .m2 repo at: "+jarModule.getAbsolutePath(), jarModule.exists()); + File warModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-war"); + assertTrue("The war module does not exist in the local .m2 repo at: "+warModule.getAbsolutePath(), warModule.exists()); + } + assertTrue("The ear module does not exist in the local .m2 repo at: "+earModule.getAbsolutePath(), earModule.exists()); + File ear = new File(earModule, "1.0-SNAPSHOT/guide-maven-multimodules-ear-1.0-SNAPSHOT.ear"); + assertTrue("The .ear file does not exist at: "+ear.getAbsolutePath(), ear.exists()); long lastModified = ear.lastModified(); waitLongEnough(); From 6dfa079cf5d3334cda42739df2b5623021ebcd19 Mon Sep 17 00:00:00 2001 From: Cheryl King Date: Wed, 10 Jan 2024 17:27:28 -0600 Subject: [PATCH 3/4] Fix test case --- .../dev/it/MultiModuleRunInstallEarTest.java | 69 +++++++++---------- .../tools/maven/applications/DeployMojo.java | 1 + 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java b/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java index 1efc9919c..3ab9b641f 100644 --- a/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java +++ b/liberty-maven-plugin/src/it/dev-it/src/test/java/net/wasdev/wlp/test/dev/it/MultiModuleRunInstallEarTest.java @@ -51,42 +51,39 @@ public static void setUpBeforeClass() throws Exception { */ @Test public void notOverwriteExistingM2Test() throws Exception { - // Check that the file was already created (from the run() during setup) - File m2Repo = new File(System.getProperty("user.home"), ".m2/repository"); - assertTrue("The local .m2 repo does not exist at: "+m2Repo.getAbsolutePath(), m2Repo.exists()); - File earModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-ear"); - if (!earModule.exists()) { - // try sleeping a bit in case it is not built yet? - Thread.sleep(30000); // 30 secs - // look for jar/war modules? - File jarModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-jar"); - assertTrue("The jar module does not exist in the local .m2 repo at: "+jarModule.getAbsolutePath(), jarModule.exists()); - File warModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-war"); - assertTrue("The war module does not exist in the local .m2 repo at: "+warModule.getAbsolutePath(), warModule.exists()); - } - assertTrue("The ear module does not exist in the local .m2 repo at: "+earModule.getAbsolutePath(), earModule.exists()); - File ear = new File(earModule, "1.0-SNAPSHOT/guide-maven-multimodules-ear-1.0-SNAPSHOT.ear"); - assertTrue("The .ear file does not exist at: "+ear.getAbsolutePath(), ear.exists()); - long lastModified = ear.lastModified(); - waitLongEnough(); - - // Install the real EAR file through Maven command - runMvnInstallEar(); - - // Check file is updated - long newModified = ear.lastModified(); - assertNotEquals(lastModified, newModified); - waitLongEnough(); - - // Cleanup (stop Liberty) - cleanUpAfterClass(false); - - // Setup and run Liberty again - setUpBeforeClass(); - - // Check file is not overwritten by liberty:run - long newModified2 = ear.lastModified(); - assertEquals(newModified2, newModified); + // Check that the file was already created (from the run() during setup) + // Note: The 'run' command does not actually install the app to .m2 since it is using loose app. Sometimes the ear file is already there from + // another dev test though that did a 'mvn install'. + long newModified = 0; + File ear = new File(System.getProperty("user.home"), ".m2/repository/io/openliberty/guides/guide-maven-multimodules-ear/1.0-SNAPSHOT/guide-maven-multimodules-ear-1.0-SNAPSHOT.ear"); + if (ear.exists()) { + long lastModified = ear.lastModified(); + waitLongEnough(); + + // Install the real EAR file through Maven command + runMvnInstallEar(); + + // Check file is updated + newModified = ear.lastModified(); + assertNotEquals(lastModified, newModified); + + } else { + // Install the real EAR file through Maven command + runMvnInstallEar(); + newModified = ear.lastModified(); + } + + waitLongEnough(); + + // Cleanup (stop Liberty) + cleanUpAfterClass(false); + + // Setup and run Liberty again + setUpBeforeClass(); + + // Check file is not overwritten by liberty:run + long newModified2 = ear.lastModified(); + assertEquals(newModified2, newModified); } private static void runMvnInstallEar() throws Exception { diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java index 01ed846e6..b8425cbdb 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java @@ -172,6 +172,7 @@ protected void installDependencies() throws MojoExecutionException, IOException for (Artifact artifact : artifacts) { // skip if not an application type supported by Liberty if (!isSupportedType(artifact.getType())) { + getLog().debug("Skipping install of dependency "+artifact.getArtifactId()+" with unsupported type: "+artifact.getType()); continue; } // skip assemblyArtifact if specified as a dependency From 31081aa5f6961393b294dc2aff41f192cf153655 Mon Sep 17 00:00:00 2001 From: Cheryl King Date: Wed, 10 Jan 2024 17:57:57 -0600 Subject: [PATCH 4/4] Remove yaml changes, bump to 23.0.0.12 --- .github/workflows/maven.yml | 119 +++++++++++++++++++----------------- 1 file changed, 62 insertions(+), 57 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ccbef5bee..5c5bb1be0 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,9 +21,14 @@ jobs: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: - RUNTIME: [ol] + RUNTIME: [ol, wlp] RUNTIME_VERSION: [23.0.0.12] - java: [21] + java: [21, 17, 11, 8] + exclude: + - java: 8 + RUNTIME: wlp + - java: 11 + RUNTIME: ol name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux steps: # Checkout repos @@ -62,60 +67,60 @@ jobs: # Run tests that require a minimum of Java 17 or later - name: Run tests that require a minimum of Java 17 or later if: ${{ matrix.java == '17' || matrix.java == '21'}} - run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*dev-i*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" - # # Run tests - # - name: Run tests - # run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + # Run tests + - name: Run tests + run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" # WINDOWS BUILD - # build-windows: - # runs-on: windows-latest - # strategy: - # fail-fast: false - # matrix: - # # test against latest update of each major Java version, as well as specific updates of LTS versions: - # RUNTIME: [ol, wlp] - # RUNTIME_VERSION: [23.0.0.10] - # java: [21, 17, 11, 8] - # exclude: - # - java: 8 - # RUNTIME: ol - # - java: 11 - # RUNTIME: wlp - # name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows - # steps: - # # Checkout repos - # - name: Checkout ci.maven - # uses: actions/checkout@v3 - # - name: Setup Java ${{ matrix.java }} - # uses: actions/setup-java@v3 - # with: - # distribution: 'temurin' - # java-version: ${{ matrix.java }} - # cache: 'maven' - # # Move and cloning to C: drive for Windows for more disk space - # - name: Clone ci.ant, ci.common, ci.maven repos to C drive - # run: | - # cp -r D:/a/ci.maven/ci.maven C:/ci.maven - # git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common - # git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant - # - name: Set up Maven - # uses: stCarolas/setup-maven@v4.5 - # with: - # maven-version: 3.9.2 - # # Install ci.ant - # - name: Install ci.ant - # working-directory: C:/ci.ant - # run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests - # # Install ci.common - # - name: Install ci.common - # working-directory: C:/ci.common - # run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests - # # Run tests that require a minimum of Java 17 or later - # - name: Run tests that require a minimum of Java 17 or later - # if: ${{ matrix.java == '17' || matrix.java == '21'}} - # run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" - # # Run tests - # - name: Run tests - # working-directory: C:/ci.maven - # run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + build-windows: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + # test against latest update of each major Java version, as well as specific updates of LTS versions: + RUNTIME: [ol, wlp] + RUNTIME_VERSION: [23.0.0.12] + java: [21, 17, 11, 8] + exclude: + - java: 8 + RUNTIME: ol + - java: 11 + RUNTIME: wlp + name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows + steps: + # Checkout repos + - name: Checkout ci.maven + uses: actions/checkout@v3 + - name: Setup Java ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + cache: 'maven' + # Move and cloning to C: drive for Windows for more disk space + - name: Clone ci.ant, ci.common, ci.maven repos to C drive + run: | + cp -r D:/a/ci.maven/ci.maven C:/ci.maven + git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common + git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.9.2 + # Install ci.ant + - name: Install ci.ant + working-directory: C:/ci.ant + run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests + # Install ci.common + - name: Install ci.common + working-directory: C:/ci.common + run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests + # Run tests that require a minimum of Java 17 or later + - name: Run tests that require a minimum of Java 17 or later + if: ${{ matrix.java == '17' || matrix.java == '21'}} + run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + # Run tests + - name: Run tests + working-directory: C:/ci.maven + run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"