From 39ad1b0ffdceea34be6ccbfedbbe0ddbd756c6ee Mon Sep 17 00:00:00 2001 From: Arun Venmany Date: Wed, 11 Sep 2024 15:59:29 +0530 Subject: [PATCH 1/3] removing deprecated usage of project.builddir in all test projects Signed-off-by: Arun Venmany --- docs/configureArquillian.md | 4 +-- docs/installLiberty.md | 2 +- docs/libertyExtensions.md | 2 +- docs/libertyPackage.md | 2 +- pluginRepo/build.gradle | 2 +- .../resources/arquillian-tests/build.gradle | 32 +++++++++---------- .../skipWithXmlManaged/build.gradle | 2 +- .../skipWithXmlRemote/build.gradle | 2 +- .../skipWithoutXmlManaged/build.gradle | 2 +- .../skipWithoutXmlRemote/build.gradle | 2 +- .../verifyMainAppManaged/build.gradle | 2 +- .../dev-skip-feature-install/build.gradle | 2 +- .../liberty-package-archiveJarDirExist.gradle | 2 +- .../liberty-package-looseApplication.gradle | 12 +++---- .../loose-ear-test/ejb-ear/build.gradle | 2 +- .../ejb-ear/build.gradle | 2 +- .../getAppNamesFromConfigTest.gradle | 12 +++---- .../testAppListsWithObjects.gradle | 12 +++---- ...stWarTasksWithDifferentDependencies.gradle | 12 +++---- ...verifyTimeoutSuccessListsOfAppsTest.gradle | 12 +++---- .../sample.servlet/TestStripVersion.gradle | 10 +++--- .../sample.servlet/testAppConfig.gradle | 12 +++---- .../sample.servlet/testAppConfigFail.gradle | 12 +++---- ...tAppendServerEnvWithConfigServerEnv.gradle | 12 +++---- .../testAppendServerEnvWithEnvProps.gradle | 12 +++---- .../testAppendServerEnvWithNoEnvProps.gradle | 12 +++---- ...testAppendServerEnvWithOnlyEnvProps.gradle | 12 +++---- .../testConfigDropinsApp.gradle | 12 +++---- .../sample.servlet/testEtcOutputDir.gradle | 16 +++++----- .../testLooseApplication.gradle | 12 +++---- .../testLooseApplicationWithWarTask.gradle | 12 +++---- .../sample.servlet/testOutputDirs.gradle | 14 ++++---- .../testPluginConfigFile.gradle | 10 +++--- .../verifyLooseAppTestTimeoutSuccess.gradle | 12 +++---- .../verifyTimeoutSuccessAppsTest.gradle | 12 +++---- .../verifyTimeoutSuccessDropinsTest.gradle | 12 +++---- .../sampleJSP.servlet/testCompileJSP.gradle | 10 +++--- .../sampleJSP.servlet/testCompileJSP17.gradle | 10 +++--- .../testCreateLibertyFiles.gradle | 4 +-- .../testCreateLibertyInlineProperties.gradle | 4 +-- .../testCreateLibertyConfigDir.gradle.kts | 6 ++-- .../testCreateLibertyDefaultConfigDir.gradle | 4 +-- 42 files changed, 177 insertions(+), 177 deletions(-) diff --git a/docs/configureArquillian.md b/docs/configureArquillian.md index e6896610a..abb73a85b 100644 --- a/docs/configureArquillian.md +++ b/docs/configureArquillian.md @@ -46,8 +46,8 @@ arquillianConfiguration { } test { - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/*IT*' exclude '**/unit/**' testLogging.showStandardStreams = true diff --git a/docs/installLiberty.md b/docs/installLiberty.md index 16f0b1e13..916691619 100644 --- a/docs/installLiberty.md +++ b/docs/installLiberty.md @@ -20,7 +20,7 @@ You need to include `group`, `name`, and `version` values that describe the arti ### Properties -Use the [general runtime properies](libertyExtensions.md#general-runtime-properties) for properties to configure the runtime installation location if you want to override the defaults. By default, the runtime is installed in the `${project.buildDir}/wlp` folder. +Use the [general runtime properies](libertyExtensions.md#general-runtime-properties) for properties to configure the runtime installation location if you want to override the defaults. By default, the runtime is installed in the `${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp` folder. You can also use the `runtime` properties object in the [general runtime properies](libertyExtensions.md#general-runtime-properties) to configure the `group`, `name`, or `version` values of the artifact to use. These will override any `libertyRuntime` dependency configuration and can also be specified in a gradle.properties file or from the command line as project properties. diff --git a/docs/libertyExtensions.md b/docs/libertyExtensions.md index 8ac900a00..08336c16c 100644 --- a/docs/libertyExtensions.md +++ b/docs/libertyExtensions.md @@ -12,7 +12,7 @@ The [deploy](deploy.md), [undeploy](undeploy.md), [libertyPackage](libertyPackag | Attribute | Type | Since | Description | Required | | --------- | ---- | ----- | ----------- | ---------| -| baseDir | String | 3.0 | The base installation directory. The actual installation directory of WebSphere Liberty server will be `${baseDir}/wlp`. The default value is `${project.buildDir}`. This was moved from the properties in the `install` block in version 3.0.| No | +| baseDir | String | 3.0 | The base installation directory. The actual installation directory of WebSphere Liberty server will be `${baseDir}/wlp`. The default value is `${project.getLayout().getBuildDirectory().getAsFile().get()}`. This was moved from the properties in the `install` block in version 3.0.| No | | cacheDir | String | 3.0 | The directory used for caching downloaded files such as the license or `.jar` files. The default value is `${java.io.tmpdir}/wlp-cache`. This was moved from the properties in the `install` block in version 3.0.| No | | installDir | String | 1.0 | Path to the WebSphere Liberty server installation `wlp` directory. To use a pre-installed version of Liberty, set this property to the path of the Liberty `wlp` directory, including `wlp` in the path. Additionally, `installDir` can be specified in the `gradle.properties` file or from the [command line](installLiberty.md#override-installDir). | No | | outputDir | String | 1.0 | Deprecated. Value of the `${wlp_output_dir}` variable. The default value is `${installDir}/usr/servers/${serverName}`. This parameter has moved to the `server` block. | No | diff --git a/docs/libertyPackage.md b/docs/libertyPackage.md index a72343bbf..bded3a371 100644 --- a/docs/libertyPackage.md +++ b/docs/libertyPackage.md @@ -19,7 +19,7 @@ The `libertyPackage` task uses a `packageLiberty` block to define task specific | --------- | ----- | ----- | ----------- | -------- | | include | String | 1.0 | Controls the package contents. Can be used with values `all`, `usr`, `minify`, `wlp`, `runnable`, `all,runnable` and `minify,runnable`. The default value is `all`. The `runnable`, `all,runnable` and `minify,runnable` values are supported beginning with 8.5.5.9 and works with `jar` type packages only. | Yes, only when the `os` option is set. | | os| String | 1.0 | A comma-delimited list of operating systems that you want the packaged server to support. To specify that an operating system is not to be supported, prefix it with a minus sign ("-"). The 'include' attribute __must__ be set to `minify`. | No | -| packageDirectory | String | 3.0 | Directory of the packaged file. The default value is `${project.buildDir}/libs`. If the directory is not absolute, it is created in `${project.buildDir}/libs`.| No | +| packageDirectory | String | 3.0 | Directory of the packaged file. The default value is `${project.getLayout().getBuildDirectory().getAsFile().get()}/libs`. If the directory is not absolute, it is created in `${project.getLayout().getBuildDirectory().getAsFile().get()}/libs`.| No | | packageName | String | 3.0 | Name of the packaged file. The default value is `${project.name}`. | No | | packageType | String | 3.0 | Type of package. Can be used with values `zip`, `jar`, `tar`, or `tar.gz`. Defaults to `jar` if `runnable` is specified for the `include` property. Otherwise the default value is `zip`. | No | | serverRoot | String | 3.0 | Specifies the root server folder name in the packaged file. | No | diff --git a/pluginRepo/build.gradle b/pluginRepo/build.gradle index 1ad2e02a3..a127270a4 100644 --- a/pluginRepo/build.gradle +++ b/pluginRepo/build.gradle @@ -13,7 +13,7 @@ publishing { repositories { maven { name = "test" - url = uri("${rootProject.buildDir}/plugin-test-repository") + url = uri("${rootProject.getLayout().getBuildDirectory().getAsFile().get()}/plugin-test-repository") } } } diff --git a/src/test/resources/arquillian-tests/build.gradle b/src/test/resources/arquillian-tests/build.gradle index 623fe686f..0fb1d2163 100644 --- a/src/test/resources/arquillian-tests/build.gradle +++ b/src/test/resources/arquillian-tests/build.gradle @@ -98,8 +98,8 @@ tasks.withType(Test) { task verifyMainAppManaged (type:Test) { description 'Tests that the main app is ready before the test app when verifyApps is set properly' - reports.html.outputLocation = file("$buildDir/reports/verify-main-app-managed") - reports.junitXml.outputLocation = file("$buildDir/test-results/verify-main-app-managed") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/verify-main-app-managed") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/verify-main-app-managed") include '**/GreeterIT*' classpath += configurations.arqManaged dependsOn ':verifyMainAppManaged:configArq' @@ -107,8 +107,8 @@ task verifyMainAppManaged (type:Test) { } task verifyMainAppManagedValidation (type:Test) { - reports.html.outputLocation = file("$buildDir/reports/verify-main-app-managed-rest-endpoint-it") - reports.junitXml.outputLocation = file("$buildDir/test-results/verify-main-app-managed-rest-endpoint-it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/verify-main-app-managed-rest-endpoint-it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/verify-main-app-managed-rest-endpoint-it") include '**/VerifyMainAppIT.java' classpath += configurations.arqManaged dependsOn ':verifyMainAppManaged:configArq' @@ -117,8 +117,8 @@ task verifyMainAppManagedValidation (type:Test) { task skipWithXmlManaged (type:Test) { description 'For the managed container, tests the task is skipped when the skipIfArquillianXmlExists flag is set to true and arquillian.xml exists in src/test/resources.' - reports.html.outputLocation = file("$buildDir/reports/skip-with-xml-managed") - reports.junitXml.outputLocation = file("$buildDir/test-results/skip-with-xml-managed") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/skip-with-xml-managed") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/skip-with-xml-managed") include '**/SkipWithXmlIT*' classpath += configurations.arqManaged dependsOn ':skipWithXmlManaged:configArq' @@ -126,8 +126,8 @@ task skipWithXmlManaged (type:Test) { } task skipWithXmlManagedRestEndpointIT (type:Test) { - reports.html.outputLocation = file("$buildDir/reports/skip-with-xml-managed-rest-endpoint-it") - reports.junitXml.outputLocation = file("$buildDir/test-results/skip-with-xml-managed-rest-endpoint-it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/skip-with-xml-managed-rest-endpoint-it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/skip-with-xml-managed-rest-endpoint-it") include '**/GreeterIT*' classpath += configurations.arqManaged dependsOn ':skipWithXmlManaged:configArq' @@ -136,8 +136,8 @@ task skipWithXmlManagedRestEndpointIT (type:Test) { task skipWithoutXmlManaged (type:Test) { description 'For the managed container, tests the task is run when the skipIfArquillianXmlExists flag is set to true and arquillian.xml does not exist in src/test/resources' - reports.html.outputLocation = file("$buildDir/reports/skip-without-xml-managed") - reports.junitXml.outputLocation = file("$buildDir/test-results/skip-without-xml-managed") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/skip-without-xml-managed") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/skip-without-xml-managed") include '**/SkipWithoutXmlIT*' classpath += configurations.arqManaged dependsOn 'compileJava' @@ -146,8 +146,8 @@ task skipWithoutXmlManaged (type:Test) { } task skipWithoutXmlManagedRestEndpointIT (type:Test) { - reports.html.outputLocation = file("$buildDir/reports/skip-without-xml-managed-rest-endpoint-it") - reports.junitXml.outputLocation = file("$buildDir/test-results/skip-without-xml-managed-rest-endpoint-it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/skip-without-xml-managed-rest-endpoint-it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/skip-without-xml-managed-rest-endpoint-it") include '**/GreeterIT*' classpath += configurations.arqManaged dependsOn ':skipWithoutXmlManaged:configArq' @@ -156,8 +156,8 @@ task skipWithoutXmlManagedRestEndpointIT (type:Test) { task skipWithXmlRemote (type:Test) { description 'For the remote container, tests the task is run when the skipIfArquillianXmlExists flag is set to true and arquillian.xml does not exist in src/test/resources' - reports.html.outputLocation = file("$buildDir/reports/skip-with-xml-remote") - reports.junitXml.outputLocation = file("$buildDir/test-results/skip-with-xml-remote") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/skip-with-xml-remote") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/skip-with-xml-remote") include '**/SkipWithXmlIT*' classpath += configurations.arqRemote dependsOn ':skipWithXmlRemote:configArq' @@ -166,8 +166,8 @@ task skipWithXmlRemote (type:Test) { task skipWithoutXmlRemote (type:Test) { description 'For the remote container, tests the task is run when the skipIfArquillianXmlExists flag is set to true and arquillian.xml does not exist in src/test/resources' - reports.html.outputLocation = file("$buildDir/reports/skip-without-xml-remote") - reports.junitXml.outputLocation = file("$buildDir/test-results/skip-without-xml-remote") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/skip-without-xml-remote") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/skip-without-xml-remote") include '**/SkipWithoutXmlIT*' classpath += configurations.arqRemote dependsOn ':skipWithoutXmlRemote:configArq' diff --git a/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle b/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle index 2984c102b..3d3f0fead 100644 --- a/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.buildDir = '../build' +project.getLayout().setBuildDirectory('../build'); dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-managed:1.0.8' diff --git a/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle b/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle index c2c8f0055..7d8d9954f 100644 --- a/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.buildDir = '../build' +project.getLayout().setBuildDirectory('../build'); dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-remote:1.0.8' diff --git a/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle b/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle index 179cc9111..148fdc6a8 100644 --- a/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.buildDir = '../build' +project.getLayout().setBuildDirectory('../build'); dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-managed:1.0.8' diff --git a/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle b/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle index 82ad9ffa2..effc1fe7c 100644 --- a/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.buildDir = '../build' +project.getLayout().setBuildDirectory('../build'); dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-remote:1.0.8' diff --git a/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle b/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle index 4e77c8b3d..bae9b1252 100644 --- a/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle +++ b/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.buildDir = '../build' +project.getLayout().setBuildDirectory('../build'); dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-managed:1.0.7' diff --git a/src/test/resources/dev-test/dev-skip-feature-install/build.gradle b/src/test/resources/dev-test/dev-skip-feature-install/build.gradle index d27e1a022..be05830fa 100644 --- a/src/test/resources/dev-test/dev-skip-feature-install/build.gradle +++ b/src/test/resources/dev-test/dev-skip-feature-install/build.gradle @@ -40,7 +40,7 @@ dependencies { } liberty { - installDir = file("${project.buildDir}/wlp") + installDir = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp") } clean.dependsOn "libertyStop" \ No newline at end of file diff --git a/src/test/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle b/src/test/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle index 5043e3d68..026222b6b 100644 --- a/src/test/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle +++ b/src/test/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle @@ -28,7 +28,7 @@ liberty { server{ name = 'LibertyProjectServer' packageLiberty { - packageDirectory = "${project.buildDir}" + packageDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packageType = 'jar' } } diff --git a/src/test/resources/liberty-package-test/liberty-package-looseApplication.gradle b/src/test/resources/liberty-package-test/liberty-package-looseApplication.gradle index c08efef9f..d6eb2d67f 100644 --- a/src/test/resources/liberty-package-test/liberty-package-looseApplication.gradle +++ b/src/test/resources/liberty-package-test/liberty-package-looseApplication.gradle @@ -29,7 +29,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -83,7 +83,7 @@ task copyDerby { doLast { copy { from configurations.derby - into "$buildDir/wlp/usr/shared/resources" + into "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/shared/resources" include '*.jar' } } @@ -91,8 +91,8 @@ task copyDerby { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -100,8 +100,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/loose-ear-test/ejb-ear/build.gradle b/src/test/resources/loose-ear-test/ejb-ear/build.gradle index 923e0c80d..486568cc6 100644 --- a/src/test/resources/loose-ear-test/ejb-ear/build.gradle +++ b/src/test/resources/loose-ear-test/ejb-ear/build.gradle @@ -44,7 +44,7 @@ liberty { name = "ejbServer" deploy { apps = [ear] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } verifyAppStartTimeout = 30 looseApplication = true diff --git a/src/test/resources/multi-module-loose-ear-test/ejb-ear/build.gradle b/src/test/resources/multi-module-loose-ear-test/ejb-ear/build.gradle index 9864d3e60..7b0c4facb 100644 --- a/src/test/resources/multi-module-loose-ear-test/ejb-ear/build.gradle +++ b/src/test/resources/multi-module-loose-ear-test/ejb-ear/build.gradle @@ -43,7 +43,7 @@ liberty { name = "ejbServer" deploy { apps = [ear] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } verifyAppStartTimeout = 30 looseApplication = true diff --git a/src/test/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle b/src/test/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle index 03f094e93..01d2f87b2 100644 --- a/src/test/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle +++ b/src/test/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle @@ -26,13 +26,13 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' @@ -87,8 +87,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -96,8 +96,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle b/src/test/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle index f1d8fb3b3..3433f6a7b 100644 --- a/src/test/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle +++ b/src/test/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle @@ -26,13 +26,13 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' @@ -87,8 +87,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -96,8 +96,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle b/src/test/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle index b91d75dd9..ca9576247 100644 --- a/src/test/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle +++ b/src/test/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -93,8 +93,8 @@ liberty { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -102,8 +102,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle b/src/test/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle index 4c1b49595..71369049f 100644 --- a/src/test/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle +++ b/src/test/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -85,8 +85,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -94,8 +94,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/TestStripVersion.gradle b/src/test/resources/sample.servlet/TestStripVersion.gradle index c2e5e0852..279751ba2 100644 --- a/src/test/resources/sample.servlet/TestStripVersion.gradle +++ b/src/test/resources/sample.servlet/TestStripVersion.gradle @@ -30,7 +30,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -62,8 +62,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -71,8 +71,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testAppConfig.gradle b/src/test/resources/sample.servlet/testAppConfig.gradle index 7e551fcf2..cd40cf7bb 100644 --- a/src/test/resources/sample.servlet/testAppConfig.gradle +++ b/src/test/resources/sample.servlet/testAppConfig.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'myLibertyApp' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -66,8 +66,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -75,8 +75,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testAppConfigFail.gradle b/src/test/resources/sample.servlet/testAppConfigFail.gradle index f8f40b2d7..eb2fac158 100644 --- a/src/test/resources/sample.servlet/testAppConfigFail.gradle +++ b/src/test/resources/sample.servlet/testAppConfigFail.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'myLibertyApp' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -67,8 +67,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -76,8 +76,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testAppendServerEnvWithConfigServerEnv.gradle b/src/test/resources/sample.servlet/testAppendServerEnvWithConfigServerEnv.gradle index 32ddbd553..0e5b96809 100644 --- a/src/test/resources/sample.servlet/testAppendServerEnvWithConfigServerEnv.gradle +++ b/src/test/resources/sample.servlet/testAppendServerEnvWithConfigServerEnv.gradle @@ -30,7 +30,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -45,7 +45,7 @@ liberty { name = wlpServerName deploy { apps = [war] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } mergeServerEnv = true serverEnvFile = file("src/resources/server.env") @@ -65,16 +65,16 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testAppendServerEnvWithEnvProps.gradle b/src/test/resources/sample.servlet/testAppendServerEnvWithEnvProps.gradle index d5635c143..04110f8db 100644 --- a/src/test/resources/sample.servlet/testAppendServerEnvWithEnvProps.gradle +++ b/src/test/resources/sample.servlet/testAppendServerEnvWithEnvProps.gradle @@ -30,7 +30,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -45,7 +45,7 @@ liberty { name = wlpServerName deploy { apps = [war] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } mergeServerEnv = true serverEnvFile = file("src/resources/server.env") @@ -67,16 +67,16 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testAppendServerEnvWithNoEnvProps.gradle b/src/test/resources/sample.servlet/testAppendServerEnvWithNoEnvProps.gradle index e7d014514..01bf6875e 100644 --- a/src/test/resources/sample.servlet/testAppendServerEnvWithNoEnvProps.gradle +++ b/src/test/resources/sample.servlet/testAppendServerEnvWithNoEnvProps.gradle @@ -30,7 +30,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -45,7 +45,7 @@ liberty { name = wlpServerName deploy { apps = [war] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } mergeServerEnv = true } @@ -64,16 +64,16 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testAppendServerEnvWithOnlyEnvProps.gradle b/src/test/resources/sample.servlet/testAppendServerEnvWithOnlyEnvProps.gradle index 8302475e9..237fdd911 100644 --- a/src/test/resources/sample.servlet/testAppendServerEnvWithOnlyEnvProps.gradle +++ b/src/test/resources/sample.servlet/testAppendServerEnvWithOnlyEnvProps.gradle @@ -30,7 +30,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -45,7 +45,7 @@ liberty { name = wlpServerName deploy { apps = [war] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } mergeServerEnv = true env = ['TEST_PROP_2':'white', 'CONFIG_SERVER_ENV_PROPS':'TEST'] @@ -65,16 +65,16 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testConfigDropinsApp.gradle b/src/test/resources/sample.servlet/testConfigDropinsApp.gradle index 2923349fe..0a032dd7c 100644 --- a/src/test/resources/sample.servlet/testConfigDropinsApp.gradle +++ b/src/test/resources/sample.servlet/testConfigDropinsApp.gradle @@ -26,13 +26,13 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' @@ -75,8 +75,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -84,8 +84,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testEtcOutputDir.gradle b/src/test/resources/sample.servlet/testEtcOutputDir.gradle index 1a739e806..b549148c6 100644 --- a/src/test/resources/sample.servlet/testEtcOutputDir.gradle +++ b/src/test/resources/sample.servlet/testEtcOutputDir.gradle @@ -26,13 +26,13 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -42,13 +42,13 @@ task testWar(type:War){ task createEtcServerEnv{ doLast { - def etcDir = file("${project.buildDir}/wlp/etc/") + def etcDir = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/etc/") if (!etcDir.exists()) { etcDir.mkdirs() } def serverEnvFile = file("${etcDir}/server.env") if (!serverEnvFile.exists()) { - serverEnvFile.write("WLP_OUTPUT_DIR=${project.buildDir}/testEtcOutputDir") + serverEnvFile.write("WLP_OUTPUT_DIR=${project.getLayout().getBuildDirectory().getAsFile().get()}/testEtcOutputDir") } } } @@ -88,8 +88,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -97,8 +97,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testLooseApplication.gradle b/src/test/resources/sample.servlet/testLooseApplication.gradle index 730e87874..543ce1e9c 100644 --- a/src/test/resources/sample.servlet/testLooseApplication.gradle +++ b/src/test/resources/sample.servlet/testLooseApplication.gradle @@ -30,7 +30,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -45,7 +45,7 @@ liberty { name = wlpServerName deploy { apps = [war] - copyLibsDirectory = file("${project.buildDir}/libs") + copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/libs") } stripVersion = true @@ -66,16 +66,16 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testLooseApplicationWithWarTask.gradle b/src/test/resources/sample.servlet/testLooseApplicationWithWarTask.gradle index c064ffdc2..3efc853ce 100644 --- a/src/test/resources/sample.servlet/testLooseApplicationWithWarTask.gradle +++ b/src/test/resources/sample.servlet/testLooseApplicationWithWarTask.gradle @@ -31,14 +31,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -78,8 +78,8 @@ liberty { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -87,8 +87,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testOutputDirs.gradle b/src/test/resources/sample.servlet/testOutputDirs.gradle index 1adc20cfb..243dce830 100644 --- a/src/test/resources/sample.servlet/testOutputDirs.gradle +++ b/src/test/resources/sample.servlet/testOutputDirs.gradle @@ -26,13 +26,13 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -43,7 +43,7 @@ task testWar(type:War){ task createServerEnv{ def serverEnvFile = file("src/main/liberty/config/testOutputDir-server.env") if (!serverEnvFile.exists()) { - serverEnvFile.write("WLP_OUTPUT_DIR=${project.buildDir}/testOutputDir") + serverEnvFile.write("WLP_OUTPUT_DIR=${project.getLayout().getBuildDirectory().getAsFile().get()}/testOutputDir") } } @@ -83,8 +83,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -92,8 +92,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/testPluginConfigFile.gradle b/src/test/resources/sample.servlet/testPluginConfigFile.gradle index f2d4195d2..5e790ebda 100644 --- a/src/test/resources/sample.servlet/testPluginConfigFile.gradle +++ b/src/test/resources/sample.servlet/testPluginConfigFile.gradle @@ -29,7 +29,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -64,16 +64,16 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle b/src/test/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle index d041aaccc..cb1a4a80d 100644 --- a/src/test/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle +++ b/src/test/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'sample.servlet' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -70,8 +70,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -79,8 +79,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle b/src/test/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle index 68df5281d..79ca5d2a1 100644 --- a/src/test/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle +++ b/src/test/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'sample.servlet-1' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -69,8 +69,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -78,8 +78,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle b/src/test/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle index e11b56a73..3621d604e 100644 --- a/src/test/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle +++ b/src/test/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle @@ -26,14 +26,14 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 // This is set in the ibm-web-ext.xml file warContext = 'myLibertyApp' appName = 'LibertyProject' - packageDir = "${project.buildDir}" + packageDir = "${project.getLayout().getBuildDirectory().getAsFile().get()}" packagingType = 'usr' } @@ -73,8 +73,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -82,8 +82,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sampleJSP.servlet/testCompileJSP.gradle b/src/test/resources/sampleJSP.servlet/testCompileJSP.gradle index 5ea1ce95d..1109c75f4 100644 --- a/src/test/resources/sampleJSP.servlet/testCompileJSP.gradle +++ b/src/test/resources/sampleJSP.servlet/testCompileJSP.gradle @@ -29,7 +29,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -68,8 +68,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -77,8 +77,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/sampleJSP.servlet/testCompileJSP17.gradle b/src/test/resources/sampleJSP.servlet/testCompileJSP17.gradle index 3e3275efe..453038677 100644 --- a/src/test/resources/sampleJSP.servlet/testCompileJSP17.gradle +++ b/src/test/resources/sampleJSP.servlet/testCompileJSP17.gradle @@ -28,7 +28,7 @@ compileJava.options.encoding = 'UTF-8' ext { // Liberty server properties wlpServerName = 'LibertyProjectServer' - serverDirectory = "${project.buildDir}/wlp/usr/servers/${wlpServerName}" + serverDirectory = "${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/servers/${wlpServerName}" testServerHttpPort = 9080 testServerHttpsPort = 9443 @@ -67,8 +67,8 @@ dependencies { test { println 'inside the test block' - reports.html.outputLocation = file("$buildDir/reports/unit") - reports.junitXml.outputLocation = file("$buildDir/test-results/unit") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/unit") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/unit") exclude '**/it/**' } @@ -76,8 +76,8 @@ test { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' diff --git a/src/test/resources/server-config-files/testCreateLibertyFiles.gradle b/src/test/resources/server-config-files/testCreateLibertyFiles.gradle index c00bf6c72..d3867d5bb 100644 --- a/src/test/resources/server-config-files/testCreateLibertyFiles.gradle +++ b/src/test/resources/server-config-files/testCreateLibertyFiles.gradle @@ -55,8 +55,8 @@ dependencies { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' } diff --git a/src/test/resources/server-config-files/testCreateLibertyInlineProperties.gradle b/src/test/resources/server-config-files/testCreateLibertyInlineProperties.gradle index 42eb3f30a..abfbfd9c6 100644 --- a/src/test/resources/server-config-files/testCreateLibertyInlineProperties.gradle +++ b/src/test/resources/server-config-files/testCreateLibertyInlineProperties.gradle @@ -61,8 +61,8 @@ dependencies { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' } diff --git a/src/test/resources/server-config/testCreateLibertyConfigDir.gradle.kts b/src/test/resources/server-config/testCreateLibertyConfigDir.gradle.kts index 5a4c5ad26..7007c1ef6 100644 --- a/src/test/resources/server-config/testCreateLibertyConfigDir.gradle.kts +++ b/src/test/resources/server-config/testCreateLibertyConfigDir.gradle.kts @@ -41,15 +41,15 @@ tasks { val integrationTest by registering(Test::class) { group = "Verification" description = "Runs the integration tests." - reports.html.outputLocation.set(file("$buildDir/reports/it")) - reports.junitXml.outputLocation.set(file("$buildDir/test-results/it")) + reports.html.outputLocation.set(file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it")) + reports.junitXml.outputLocation.set(file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it")) include("**/it/**") exclude("**/unit/**") } val copyJdbcLib by registering(Copy::class) { from(jdbcLib) - into("$buildDir/wlp/usr/shared/resources") + into("${project.getLayout().getBuildDirectory().getAsFile().get()}/wlp/usr/shared/resources") include("*.jar") } diff --git a/src/test/resources/server-config/testCreateLibertyDefaultConfigDir.gradle b/src/test/resources/server-config/testCreateLibertyDefaultConfigDir.gradle index 5a29e7398..d65ecf3d9 100644 --- a/src/test/resources/server-config/testCreateLibertyDefaultConfigDir.gradle +++ b/src/test/resources/server-config/testCreateLibertyDefaultConfigDir.gradle @@ -39,8 +39,8 @@ dependencies { task integrationTest(type: Test) { group 'Verification' description 'Runs the integration tests.' - reports.html.outputLocation = file("$buildDir/reports/it") - reports.junitXml.outputLocation = file("$buildDir/test-results/it") + reports.html.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/reports/it") + reports.junitXml.outputLocation = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/test-results/it") include '**/it/**' exclude '**/unit/**' } From 1ce91921a70a2a69b18ed63e4183e0d2b2d53c8b Mon Sep 17 00:00:00 2001 From: Arun Venmany Date: Wed, 11 Sep 2024 17:56:47 +0530 Subject: [PATCH 2/3] adding deprecation warning mode command in gradle.yml Signed-off-by: Arun Venmany --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6bef8a394..18fa9aa09 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -71,11 +71,11 @@ jobs: - name: Run tests that require a minimum of Java 17 or later if: ${{ matrix.java == '17' || matrix.java == '21' }} run: - ./gradlew clean install check -P"test.include"="**/TestSpringBootApplication30*,**/TestCompileJSPSource17*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" --stacktrace --info + ./gradlew clean install check -P"test.include"="**/TestSpringBootApplication30*,**/TestCompileJSPSource17*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" --stacktrace --info --warning-mode=all # Run tests - name: Run tests with Gradle on Ubuntu run: - ./gradlew clean install check -P"test.exclude"="**/TestSpringBootApplication30*,**/TestCompileJSPSource17*,**/DevContainerTest*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" --stacktrace --info + ./gradlew clean install check -P"test.exclude"="**/TestSpringBootApplication30*,**/TestCompileJSPSource17*,**/DevContainerTest*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" --stacktrace --info --warning-mode=all # Copy build reports and upload artifact if build failed - name: Copy build/report/tests/test for upload if: ${{ failure() }} From 01f57bf433767059b983c34066c43dfcecdf0e11 Mon Sep 17 00:00:00 2001 From: Arun Venmany Date: Thu, 12 Sep 2024 12:00:38 +0530 Subject: [PATCH 3/3] removing semicolon Signed-off-by: Arun Venmany --- build.gradle | 2 +- .../resources/arquillian-tests/skipWithXmlManaged/build.gradle | 2 +- .../resources/arquillian-tests/skipWithXmlRemote/build.gradle | 2 +- .../arquillian-tests/skipWithoutXmlManaged/build.gradle | 2 +- .../arquillian-tests/skipWithoutXmlRemote/build.gradle | 2 +- .../arquillian-tests/verifyMainAppManaged/build.gradle | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index b5ea7e087..1fe233e55 100644 --- a/build.gradle +++ b/build.gradle @@ -113,7 +113,7 @@ test { try { - output = new FileOutputStream("${project.getLayout().getBuildDirectory().getAsFile().get()}/gradle.properties"); + output = new FileOutputStream("${project.getLayout().getBuildDirectory().getAsFile().get()}/gradle.properties") if (libertyRuntime == "ol") { runtimeGroup = "io.openliberty" diff --git a/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle b/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle index 3d3f0fead..427e67005 100644 --- a/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithXmlManaged/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.getLayout().setBuildDirectory('../build'); +project.getLayout().setBuildDirectory('../build') dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-managed:1.0.8' diff --git a/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle b/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle index 7d8d9954f..d819e4646 100644 --- a/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithXmlRemote/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.getLayout().setBuildDirectory('../build'); +project.getLayout().setBuildDirectory('../build') dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-remote:1.0.8' diff --git a/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle b/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle index 148fdc6a8..2674ac9e6 100644 --- a/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithoutXmlManaged/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.getLayout().setBuildDirectory('../build'); +project.getLayout().setBuildDirectory('../build') dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-managed:1.0.8' diff --git a/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle b/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle index effc1fe7c..8616a4147 100644 --- a/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle +++ b/src/test/resources/arquillian-tests/skipWithoutXmlRemote/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.getLayout().setBuildDirectory('../build'); +project.getLayout().setBuildDirectory('../build') dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-remote:1.0.8' diff --git a/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle b/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle index bae9b1252..76507fb75 100644 --- a/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle +++ b/src/test/resources/arquillian-tests/verifyMainAppManaged/build.gradle @@ -13,7 +13,7 @@ buildscript { } } -project.getLayout().setBuildDirectory('../build'); +project.getLayout().setBuildDirectory('../build') dependencies { implementation 'io.openliberty.arquillian:arquillian-liberty-managed:1.0.7'