From 570dc7b4756e308d2350d6db362246d5f888ec13 Mon Sep 17 00:00:00 2001 From: Matt Bowersox Date: Mon, 23 Apr 2018 13:52:26 -0500 Subject: [PATCH] Open liberty tests (#249) * adding open liberty testing * updating test * checking for property * updating tests, ymls, and docs * changing property file names * fixing test file * removed online/offlne logic and added review changes * removing java7 from the travis tests --- .travis.yml | 15 +++--- README.md | 14 ++---- appveyor.yml | 11 ++++- build.gradle | 12 +++-- gradle.properties | 3 -- .../plugins/AbstractIntegrationTest.groovy | 47 +++++++++++++++---- .../plugins/ConfigureArquillianTest.groovy | 18 ++++++- .../InstallFeature_acceptLicense.groovy | 13 ++--- .../plugins/InstallFeature_multiple.groovy | 19 +++----- .../plugins/InstallFeature_single.groovy | 13 ++--- .../plugins/InstallLiberty_javaee7.groovy | 27 ++++------- .../plugins/InstallLiberty_webProfile7.groovy | 28 ++++------- .../plugins/LibertyMultiServerTest.groovy | 15 ++---- ...ertyPackage_archiveJarDirExist_Test.groovy | 20 +++----- .../LibertyPackage_archiveJar_Test.groovy | 19 +++----- .../LibertyPackage_archiveZipPath_Test.groovy | 21 ++++----- .../LibertyPackage_archiveZip_Test.groovy | 21 ++++----- ...ibertyPackage_looseApplication_Test.groovy | 19 +++----- .../LibertyPackage_noArchive_Test.groovy | 21 ++++----- .../LibertyPackage_noAttrib_Test.groovy | 24 ++++------ .../wlp/gradle/plugins/LibertyTest.groovy | 17 +++---- .../gradle/plugins/NoAppsTemplateTest.groovy | 3 -- .../gradle/plugins/NoServerNameTest.groovy | 3 -- .../wlp/gradle/plugins/OldLibertyTest.groovy | 17 +++---- .../wlp/gradle/plugins/TestAppConfig.groovy | 5 +- .../gradle/plugins/TestAppConfigFail.groovy | 5 +- .../plugins/TestAppListsWithObjects.groovy | 3 -- .../wlp/gradle/plugins/TestCompileJSP.groovy | 3 -- .../plugins/TestConfigDropinsApp.groovy | 5 +- .../plugins/TestCreateWithConfigDir.groovy | 7 +-- .../gradle/plugins/TestCreateWithFiles.groovy | 3 -- .../TestCreateWithInlineProperties.groovy | 7 +-- .../plugins/TestEclipseFacetsEar.groovy | 5 +- .../plugins/TestEclipseFacetsWar.groovy | 5 +- .../gradle/plugins/TestEtcOutputDir.groovy | 5 +- .../wlp/gradle/plugins/TestGetAppNames.groovy | 3 -- .../plugins/TestLooseApplication.groovy | 3 -- .../TestLooseApplicationWithWarTask.groovy | 3 -- .../plugins/TestLooseEarApplication.groovy | 12 ++--- .../wlp/gradle/plugins/TestOutputDirs.groovy | 3 -- .../plugins/TestPluginConfigFile.groovy | 3 -- .../gradle/plugins/TestStripVersion.groovy | 3 -- ...stWarTasksWithDifferentDependencies.groovy | 3 -- .../VerifyLooseAppTestTimeoutSuccess.groovy | 3 -- .../VerifyTimeoutSuccessAppsTest.groovy | 3 -- .../VerifyTimeoutSuccessDropinsTest.groovy | 3 -- ...VerifyTimeoutSuccessListsOfAppsTest.groovy | 3 -- ...VerifyTimeoutSuccessMultiServerTest.groovy | 3 -- src/integTest/properties/ol1.properties | 4 ++ src/integTest/properties/ol2.properties | 4 ++ src/integTest/properties/wlp1.properties | 4 ++ src/integTest/properties/wlp2.properties | 4 ++ .../resources/arquillian-tests/build.gradle | 2 +- .../liberty-multi-test/multiServerTest.gradle | 17 +++---- .../liberty-package-archiveJar.gradle | 25 ++++------ .../liberty-package-archiveJarDirExist.gradle | 25 ++++------ .../liberty-package-archiveZip.gradle | 22 ++++----- .../liberty-package-archiveZipPath.gradle | 25 ++++------ .../liberty-package-looseApplication.gradle | 2 +- .../liberty-package-noArchive.gradle | 26 ++++------ .../liberty-package-noAttrib.gradle | 28 +++++------ .../resources/liberty-test/build.gradle | 25 ++++------ .../install_feature_multiple.gradle | 14 +----- .../install_feature_single.gradle | 14 +----- .../install_liberty_javaee7.gradle | 17 ++----- .../install_liberty_webProfile7.gradle | 17 ++----- .../liberty-test/oldStyleTest.gradle | 24 ++++------ .../liberty-test/testNoServerName.gradle | 2 +- .../loose-ear-test/ejb-ear/build.gradle | 6 ++- .../getAppNamesFromConfigTest.gradle | 4 +- .../testAppListsWithObjects.gradle | 4 +- ...stWarTasksWithDifferentDependencies.gradle | 4 +- ...verifyTimeoutSuccessListsOfAppsTest.gradle | 4 +- .../sample.servlet/TestStripVersion.gradle | 4 +- .../installFeatureServerXmlTest.gradle | 2 +- .../sample.servlet/noAppsTemplateTest.gradle | 2 +- .../sample.servlet/testAppConfig.gradle | 4 +- .../sample.servlet/testAppConfigFail.gradle | 4 +- .../testConfigDropinsApp.gradle | 4 +- .../sample.servlet/testEtcOutputDir.gradle | 6 +-- .../testLooseApplication.gradle | 4 +- .../testLooseApplicationWithWarTask.gradle | 4 +- .../sample.servlet/testOutputDirs.gradle | 6 +-- .../testPluginConfigFile.gradle | 4 +- .../verifyLooseAppTestTimeoutSuccess.gradle | 4 +- .../verifyTimeoutSuccessAppsTest.gradle | 4 +- .../verifyTimeoutSuccessDropinsTest.gradle | 4 +- ...verifyTimeoutSuccessMultiServerTest.gradle | 4 +- .../sampleJSP.servlet/testCompileJSP.gradle | 12 ++--- .../testCreateLibertyConfigDir.gradle | 4 +- .../testCreateLibertyFiles.gradle | 4 +- .../testCreateLibertyInlineProperties.gradle | 4 +- 92 files changed, 349 insertions(+), 579 deletions(-) delete mode 100644 gradle.properties create mode 100644 src/integTest/properties/ol1.properties create mode 100644 src/integTest/properties/ol2.properties create mode 100644 src/integTest/properties/wlp1.properties create mode 100644 src/integTest/properties/wlp2.properties diff --git a/.travis.yml b/.travis.yml index 52c3f70d9..68cf81250 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,13 @@ sudo: required language: java -matrix: - include: - - jdk: openjdk8 - env: WLP_VERSION=17.0.0.3 - - jdk: openjdk8 - env: WLP_VERSION=17.0.0.4 +jdk: + - openjdk8 +env: + - propertiesFile=wlp1.properties + - propertiesFile=wlp2.properties + - propertiesFile=ol1.properties + - propertiesFile=ol2.properties script: - export GRADLE_OPTS="-Dorg.gradle.daemon=true -Dorg.gradle.jvmargs='-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m'" - - travis_wait ./gradlew install check -Prunit=online -DwlpVersion=$WLP_VERSION --stacktrace --info --no-daemon + - travis_wait ./gradlew install integrationTest -DpropertiesFile=${propertiesFile} --stacktrace --info --no-daemon dist: trusty diff --git a/README.md b/README.md index 2341208b3..bf5d921ae 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,12 @@ Clone this repository and then, with a JRE on the path, execute the following co $ ./gradlew build ``` -This will download Gradle and then build the plugin `liberty-gradle-plugin-2.0.jar` in to the `build\libs` directory. It is also possible to install the plugin in to your local Maven repository using `gradlew install`. +This will download Gradle and then build the plugin `liberty-gradle-plugin-2.3-SNAPSHOT.jar` in to the `build\libs` directory. It is also possible to install the plugin in to your local Maven repository using `./gradlew install`. -To build the plugin and run the integration tests execute the following commands in the root directory. +To build the plugin and run the integration tests execute the following commands in the root directory. The `propertiesFile` parameter is used to select the Liberty runtime that will be used to run the tests. The `wlpLicense` parameter is only needed for Liberty packaged as a JAR file. -1. To run the integration tests using an existing Liberty server installation. ```bash - $ ./gradlew build -Prunit=offline -DwlpInstallDir= - ``` - -2. To run the integration tests against an automatically downloaded and installed Liberty server. The `wlpLicense` parameter is only needed for Liberty packaged as a JAR file. - ```bash - $ ./gradlew build -Prunit=online -DwlpLicense= -DwlpVersion= + $ ./gradlew install integrationTest -DpropertiesFile= -DwlpLicense= ``` ## Usage @@ -104,4 +98,4 @@ Extensions are tasks that improve the compatibility or user experience of third | Extension | Description | | --------- | ------------ | -| [configureArquillian](docs/configureArquillian.md) | Integrates `arquillian.xml` configuration for the Liberty Managed and Remote Arquillian containers in the `liberty-gradle-plugin`. Automatically configures required `arquillian.xml` parameters for the Liberty Managed container. | \ No newline at end of file +| [configureArquillian](docs/configureArquillian.md) | Integrates `arquillian.xml` configuration for the Liberty Managed and Remote Arquillian containers in the `liberty-gradle-plugin`. Automatically configures required `arquillian.xml` parameters for the Liberty Managed container. | diff --git a/appveyor.yml b/appveyor.yml index e666ade93..0704ff611 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,16 @@ environment: - matrix: + matrix: - jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:" + PROPERTIES_FILE: wlp1.properties + - jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:" + PROPERTIES_FILE: wlp2.properties + - jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:" + PROPERTIES_FILE: ol1.properties + - jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:" + PROPERTIES_FILE: ol2.properties build_script: # Build the compiled extension - - "gradlew.bat install check -Prunit=online -DwlpVersion=17.0.0.3 --stacktrace --info --no-daemon" + - "gradlew.bat install integrationTest -DpropertiesFile=%PROPERTIES_FILE% --stacktrace --info --no-daemon" test: off diff --git a/build.gradle b/build.gradle index 1e953affe..bb196e507 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ compileTestGroovy { dependencies { compile gradleApi() compile localGroovy() - compile ('net.wasdev.wlp.ant:wlp-anttasks:1.3') + compile ('net.wasdev.wlp.ant:wlp-anttasks:1.4.1') compile ('net.wasdev.wlp.common:ci.common:1.0') compile group: 'commons-io', name: 'commons-io', version: '2.5' provided group: 'com.ibm.websphere.appserver.api', name: 'com.ibm.websphere.appserver.spi.kernel.embeddable', version: '1.0.0' @@ -79,12 +79,16 @@ task integrationTest(type: Test) { classpath = sourceSets.integrationTest.runtimeClasspath systemProperties System.getProperties() - systemProperty 'runit', project.getProperty('runit') + systemProperty 'runit', 'online' - mustRunAfter test + String libertyPropertiesFile = System.getProperty('propertiesFile') + doFirst { + if (libertyPropertiesFile == null || libertyPropertiesFile.isEmpty()) { + throw new GradleException('Tests could not be run. Please specify a properties file.') + } + } } -check.dependsOn integrationTest sourceSets.main.compileClasspath += configurations.provided task wrapper(type: Wrapper) { diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index ac1692d2f..000000000 --- a/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -lgpVersion=2.3-SNAPSHOT -runit=online -wlpVersion=17.0.0.4 diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/AbstractIntegrationTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/AbstractIntegrationTest.groovy index d4aceae6a..278150d39 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/AbstractIntegrationTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/AbstractIntegrationTest.groovy @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corporation 2015, 2017. + * (C) Copyright IBM Corporation 2015, 2018. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,21 +13,30 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package net.wasdev.wlp.gradle.plugins +import java.io.File + import static org.junit.Assert.* import org.apache.commons.io.FileUtils import org.gradle.tooling.BuildLauncher import org.gradle.tooling.GradleConnector import org.gradle.tooling.ProjectConnection -import java.io.File - +import org.gradle.api.GradleException abstract class AbstractIntegrationTest { + + public static final String LIBERTY_PROPERTIES_FILENAME_1 = 'wlp1.properties' + public static final String LIBERTY_PROPERTIES_FILENAME_2 = 'wlp2.properties' + public static final String OPEN_LIBERTY_PROPERTIES_FILENAME_1 = 'ol1.properties' + public static final String OPEN_LIBERTY_PROPERTIES_FILENAME_2 = 'ol2.properties' + + public static final String PROPERTY_FILE_DIRECTORY = "src/integTest/properties" + static File integTestDir = new File('build/testBuilds') - static final String test_mode = System.getProperty("runit") - static String WLP_DIR = System.getProperty("wlpInstallDir") + static String libertyProperties = System.getProperty("propertiesFile") protected static void deleteDir(File dir) { if (dir.exists()) { @@ -46,8 +55,31 @@ abstract class AbstractIntegrationTest { } protected static File copyBuildFiles(File buildFilename, File buildDir) { - copyFile(buildFilename, new File(buildDir, 'build.gradle')) - copyFile(new File("gradle.properties"), new File(buildDir, 'gradle.properties')) + copyFile(buildFilename, new File(buildDir, 'build.gradle')) + copyPropertyFile(buildDir) + } + + protected static void copyPropertyFile(File buildDir) { + File propertyFile + if (libertyProperties != null) { + switch (libertyProperties) { + case LIBERTY_PROPERTIES_FILENAME_2: + propertyFile = new File(PROPERTY_FILE_DIRECTORY, LIBERTY_PROPERTIES_FILENAME_2) + break; + case OPEN_LIBERTY_PROPERTIES_FILENAME_1: + propertyFile = new File(PROPERTY_FILE_DIRECTORY, OPEN_LIBERTY_PROPERTIES_FILENAME_1) + break; + case OPEN_LIBERTY_PROPERTIES_FILENAME_2: + propertyFile = new File(PROPERTY_FILE_DIRECTORY, OPEN_LIBERTY_PROPERTIES_FILENAME_2) + break; + default: + propertyFile = new File(PROPERTY_FILE_DIRECTORY, LIBERTY_PROPERTIES_FILENAME_1) + break; + } + } else { + throw new GradleException('Tests could not be run. Please specify a properties file.') + } + copyFile(propertyFile, new File(buildDir, 'gradle.properties')) } protected static File createTestProject(File parent, File sourceDir, String buildFilename) { @@ -81,7 +113,6 @@ abstract class AbstractIntegrationTest { try { BuildLauncher build = connection.newBuild() - build.setJvmArguments("-DWLP_DIR=$WLP_DIR") build.withArguments("-i"); build.forTasks(tasks) build.run() diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/ConfigureArquillianTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/ConfigureArquillianTest.groovy index c79053b90..1193d2a2e 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/ConfigureArquillianTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/ConfigureArquillianTest.groovy @@ -1,3 +1,19 @@ +/* + * (C) Copyright IBM Corporation 2017, 2018. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package net.wasdev.wlp.gradle.plugins; import java.io.File @@ -24,7 +40,7 @@ class ConfigureArquillianTest extends AbstractIntegrationTest { public static void setup() { createDir(buildDir) FileUtils.copyDirectory(resourceDir, buildDir); - copyFile(new File("gradle.properties"), new File(buildDir, 'gradle.properties')) + copyPropertyFile(buildDir) } @Test diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_acceptLicense.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_acceptLicense.groovy index 7f9a16ea1..ee7690f12 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_acceptLicense.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_acceptLicense.groovy @@ -31,9 +31,6 @@ class InstallFeature_acceptLicense extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) try { runTasks(buildDir, 'libertyCreate') @@ -49,12 +46,10 @@ class InstallFeature_acceptLicense extends AbstractIntegrationTest{ def file_2 = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.adminCenter-1.0.mf") runTasks(buildDir, 'installFeature') - if (test_mode == "online") { - assert file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not installed" - assert file.canRead() : "com.ibm.websphere.appserver.mongodb-2.0.mf cannot be read" - assert file_2.exists() : "com.ibm.websphere.appserver.adminCenter-1.0.mf is not installed" - assert file_2.canRead() : "com.ibm.websphere.appserver.adminCenter-1.0.mf cannot be read" - } + assert file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not installed" + assert file.canRead() : "com.ibm.websphere.appserver.mongodb-2.0.mf cannot be read" + assert file_2.exists() : "com.ibm.websphere.appserver.adminCenter-1.0.mf is not installed" + assert file_2.canRead() : "com.ibm.websphere.appserver.adminCenter-1.0.mf cannot be read" } catch (Exception e) { throw new AssertionError ("Fail on task installFeature. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_multiple.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_multiple.groovy index 33b7b4d80..9e5544a58 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_multiple.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_multiple.groovy @@ -31,9 +31,6 @@ class InstallFeature_multiple extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } copyBuildFiles(buildFilename, buildDir) } @@ -44,12 +41,10 @@ class InstallFeature_multiple extends AbstractIntegrationTest{ def file_2 = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.adminCenter-1.0.mf") runTasks(buildDir, 'installFeature') - if (test_mode == "online") { - assert file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not installed" - assert file.canRead() : "com.ibm.websphere.appserver.mongodb-2.0.mf cannot be read" - assert file_2.exists() : "com.ibm.websphere.appserver.adminCenter-1.0.mf is not installed" - assert file_2.canRead() : "com.ibm.websphere.appserver.adminCenter-1.0.mf cannot be read" - } + assert file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not installed" + assert file.canRead() : "com.ibm.websphere.appserver.mongodb-2.0.mf cannot be read" + assert file_2.exists() : "com.ibm.websphere.appserver.adminCenter-1.0.mf is not installed" + assert file_2.canRead() : "com.ibm.websphere.appserver.adminCenter-1.0.mf cannot be read" } catch (Exception e) { throw new AssertionError ("Fail on task installFeature. "+e) } @@ -62,10 +57,8 @@ class InstallFeature_multiple extends AbstractIntegrationTest{ def file2 = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.adminCenter-1.0.mf") runTasks(buildDir, 'uninstallFeature') - if (test_mode == "online") { - assert !file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not uninstalled" - assert !file2.exists() : "com.ibm.websphere.appserver.adminCenter-1.0.mf is not installed" - } + assert !file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not uninstalled" + assert !file2.exists() : "com.ibm.websphere.appserver.adminCenter-1.0.mf is not installed" } catch (Exception e) { throw new AssertionError ("Fail on task uninstallFeature. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_single.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_single.groovy index d3470613d..8b5d14c55 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_single.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallFeature_single.groovy @@ -31,9 +31,6 @@ class InstallFeature_single extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } copyBuildFiles(buildFilename, buildDir) } @@ -43,10 +40,8 @@ class InstallFeature_single extends AbstractIntegrationTest{ def file = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.mongodb-2.0.mf") runTasks(buildDir, 'installFeature') - if (test_mode == "online") { - assert file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not installed" - assert file.canRead() : "com.ibm.websphere.appserver.mongodb-2.0.mf cannot be read" - } + assert file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not installed" + assert file.canRead() : "com.ibm.websphere.appserver.mongodb-2.0.mf cannot be read" } catch (Exception e) { throw new AssertionError ("Fail on task installFeature. "+e) } @@ -58,9 +53,7 @@ class InstallFeature_single extends AbstractIntegrationTest{ def file = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.mongodb-2.0.mf") runTasks(buildDir, 'uninstallFeature') - if (test_mode == "online") { - assert !file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not uninstalled" - } + assert !file.exists() : "com.ibm.websphere.appserver.mongodb-2.0.mf is not uninstalled" } catch (Exception e) { throw new AssertionError ("Fail on task uninstallFeature. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_javaee7.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_javaee7.groovy index 94473d94b..bfd5a9c8f 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_javaee7.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_javaee7.groovy @@ -31,33 +31,22 @@ class InstallLiberty_javaee7 extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - createTestProject(buildDir, resourceDir, buildFilename) - }else if(test_mode == "online"){ - createTestProject(buildDir, resourceDir, buildFilename) - try { - runTasks(buildDir, 'installLiberty') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + createTestProject(buildDir, resourceDir, buildFilename) + try { + runTasks(buildDir, 'installLiberty') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } - + @Test public void test_installLiberty_javaee7() { try { def file = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.javaee-7.0.mf") - - if (test_mode == "online") { - assert file.exists() : "file not found" - assert file.canRead() : "file cannot be read" - } else { - logger.debug "Skipping test_installLiberty_javaee7 in offline test mode" - } + assert file.exists() : "file not found" + assert file.canRead() : "file cannot be read" } catch (Exception e) { throw new AssertionError ("Fail on task installLiberty. "+e) } } } - diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_webProfile7.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_webProfile7.groovy index 83331a67a..96a64d326 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_webProfile7.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/InstallLiberty_webProfile7.groovy @@ -31,34 +31,22 @@ class InstallLiberty_webProfile7 extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - createTestProject(buildDir, resourceDir, buildFilename) - }else if(test_mode == "online"){ - createTestProject(buildDir, resourceDir, buildFilename) - try { - runTasks(buildDir, 'installLiberty') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + createTestProject(buildDir, resourceDir, buildFilename) + try { + runTasks(buildDir, 'installLiberty') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } - + @Test public void test_installLiberty_webProfile7() { try { def file = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.webProfile-7.0.mf") - - if (test_mode == "online") { - assert file.exists() : "file not found" - assert file.canRead() : "file cannot be read" - } else { - logger.debug "Skipping test_installLiberty_webProfile7 in offline test mode" - } - + assert file.exists() : "file not found" + assert file.canRead() : "file cannot be read" } catch (Exception e) { throw new AssertionError ("Fail on task installLiberty. "+e) } } } - diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyMultiServerTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyMultiServerTest.groovy index b6ac21777..8f13fb055 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyMultiServerTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyMultiServerTest.groovy @@ -32,16 +32,11 @@ class LibertyMultiServerTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - createTestProject(buildDir, resourceDir, buildFilename) - }else if(test_mode == "online"){ - createTestProject(buildDir, resourceDir, buildFilename) - try { - runTasks(buildDir, 'installLiberty') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + createTestProject(buildDir, resourceDir, buildFilename) + try { + runTasks(buildDir, 'installLiberty') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJarDirExist_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJarDirExist_Test.groovy index df985959a..7758c28d8 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJarDirExist_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJarDirExist_Test.groovy @@ -30,19 +30,13 @@ class LibertyPackage_archiveJarDirExist_Test extends AbstractIntegrationTest{ @BeforeClass public static void setup() { - - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJar_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJar_Test.groovy index 94a9a1b71..8602fed7c 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJar_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveJar_Test.groovy @@ -34,18 +34,13 @@ class LibertyPackage_archiveJar_Test extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZipPath_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZipPath_Test.groovy index e487c5f8f..adc8e99b2 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZipPath_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZipPath_Test.groovy @@ -31,18 +31,13 @@ class LibertyPackage_archiveZipPath_Test extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } @@ -55,7 +50,7 @@ class LibertyPackage_archiveZipPath_Test extends AbstractIntegrationTest{ assert file.exists() : "file not found" assert file.canRead() : "file cannot be read" - + } catch (Exception e) { throw new AssertionError ("Fail on task libertyPackage. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZip_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZip_Test.groovy index 054622326..8dd12b6be 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZip_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_archiveZip_Test.groovy @@ -31,18 +31,13 @@ class LibertyPackage_archiveZip_Test extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } @@ -55,7 +50,7 @@ class LibertyPackage_archiveZip_Test extends AbstractIntegrationTest{ assert file.exists() : "file not found" assert file.canRead() : "file cannot be read" - + } catch (Exception e) { throw new AssertionError ("Fail on task libertyPackage. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_looseApplication_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_looseApplication_Test.groovy index 17bd09f83..134fbb3a3 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_looseApplication_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_looseApplication_Test.groovy @@ -31,18 +31,13 @@ class LibertyPackage_looseApplication_Test extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noArchive_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noArchive_Test.groovy index 3c41467e8..cc8615088 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noArchive_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noArchive_Test.groovy @@ -31,18 +31,13 @@ class LibertyPackage_noArchive_Test extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } @@ -55,7 +50,7 @@ class LibertyPackage_noArchive_Test extends AbstractIntegrationTest{ assert file.exists() : "file not found" assert file.canRead() : "file cannot be read" - + } catch (Exception e) { throw new AssertionError ("Fail on task libertyPackage. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noAttrib_Test.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noAttrib_Test.groovy index 4c160d31a..55aa686fd 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noAttrib_Test.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyPackage_noAttrib_Test.groovy @@ -27,24 +27,18 @@ class LibertyPackage_noAttrib_Test extends AbstractIntegrationTest{ static resourceDir = new File("build/resources/integrationTest/liberty-package-test") static File buildDir = new File(integTestDir, "/liberty-package-noAttrib-test") static File buildFilename = new File(resourceDir, "liberty-package-noAttrib.gradle") - + @BeforeClass public static void setup() { createDir(buildDir) - if (test_mode == "offline"){ - WLP_DIR.replace("\\","/") - copyBuildFiles(buildFilename, buildDir) - } else if (test_mode == "online"){ - copyBuildFiles(buildFilename, buildDir) - try { - runTasks(buildDir, 'installLiberty') - runTasks(buildDir, 'libertyStart') - runTasks(buildDir, 'libertyStop') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + copyBuildFiles(buildFilename, buildDir) + try { + runTasks(buildDir, 'installLiberty') + runTasks(buildDir, 'libertyStart') + runTasks(buildDir, 'libertyStop') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } - } @Test @@ -56,7 +50,7 @@ class LibertyPackage_noAttrib_Test extends AbstractIntegrationTest{ assert file.exists() : "file not found" assert file.canRead() : "file cannot be read" - + } catch (Exception e) { throw new AssertionError ("Fail on task libertyPackage. "+e) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyTest.groovy index d5bdd5c23..95107e770 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/LibertyTest.groovy @@ -32,16 +32,11 @@ class LibertyTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - createTestProject(buildDir, resourceDir, buildFilename) - }else if(test_mode == "online"){ - createTestProject(buildDir, resourceDir, buildFilename) - try { - runTasks(buildDir, 'installLiberty') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + createTestProject(buildDir, resourceDir, buildFilename) + try { + runTasks(buildDir, 'installLiberty') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } @@ -134,7 +129,7 @@ class LibertyTest extends AbstractIntegrationTest{ ServerTask st = new ServerTask() def installDir = new File(buildDir.getAbsolutePath() + "/build/wlp") st.setInstallDir(installDir) - st.setServerName((test_mode == "offline") ? "libertyOffline" : "libertyOnline") + st.setServerName('LibertyProjectServer') st.initTask() try{ diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoAppsTemplateTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoAppsTemplateTest.groovy index dbcd9da21..81a4b6a5f 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoAppsTemplateTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoAppsTemplateTest.groovy @@ -12,9 +12,6 @@ public class NoAppsTemplateTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoServerNameTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoServerNameTest.groovy index d5ec17c1a..c27f51c95 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoServerNameTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/NoServerNameTest.groovy @@ -12,9 +12,6 @@ public class NoServerNameTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/OldLibertyTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/OldLibertyTest.groovy index e736a9bf3..95b5604ab 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/OldLibertyTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/OldLibertyTest.groovy @@ -32,16 +32,11 @@ class OldLibertyTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - createTestProject(buildDir, resourceDir, buildFilename) - }else if(test_mode == "online"){ - createTestProject(buildDir, resourceDir, buildFilename) - try { - runTasks(buildDir, 'installLiberty') - } catch (Exception e) { - throw new AssertionError ("Fail on task installLiberty. "+ e) - } + createTestProject(buildDir, resourceDir, buildFilename) + try { + runTasks(buildDir, 'installLiberty') + } catch (Exception e) { + throw new AssertionError ("Fail on task installLiberty. "+ e) } } @@ -134,7 +129,7 @@ class OldLibertyTest extends AbstractIntegrationTest{ ServerTask st = new ServerTask() def installDir = new File(buildDir.getAbsolutePath() + "/build/wlp") st.setInstallDir(installDir) - st.setServerName((test_mode == "offline") ? "libertyOffline" : "libertyOnline") + st.setServerName('LibertyProjectServer') st.initTask() try{ diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfig.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfig.groovy index 7a88101e7..745c4be0e 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfig.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfig.groovy @@ -12,9 +12,6 @@ public class TestAppConfig extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } @@ -22,7 +19,7 @@ public class TestAppConfig extends AbstractIntegrationTest{ public static void tearDown() throws Exception { runTasks(buildDir, 'libertyStop') } - + @Test public void test_start_with_timeout_success() { try { diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfigFail.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfigFail.groovy index 6d645d5c6..135112b6e 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfigFail.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppConfigFail.groovy @@ -14,9 +14,6 @@ public class TestAppConfigFail extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } @@ -24,7 +21,7 @@ public class TestAppConfigFail extends AbstractIntegrationTest{ public static void tearDown() throws Exception { runTasks(buildDir, 'libertyStop') } - + //Should throw a GradleException when validating the app configuration which resolves as a BuildException. @Test(expected = BuildException.class) public void test_smart_config_fail() { diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppListsWithObjects.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppListsWithObjects.groovy index 18854534f..7438f30d3 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppListsWithObjects.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestAppListsWithObjects.groovy @@ -12,9 +12,6 @@ public class TestAppListsWithObjects extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCompileJSP.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCompileJSP.groovy index 960bee27f..3d12b79a4 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCompileJSP.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCompileJSP.groovy @@ -18,9 +18,6 @@ public class TestCompileJSP extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestConfigDropinsApp.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestConfigDropinsApp.groovy index f363d92b2..5f4d2535b 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestConfigDropinsApp.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestConfigDropinsApp.groovy @@ -12,9 +12,6 @@ public class TestConfigDropinsApp extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } @@ -32,4 +29,4 @@ public class TestConfigDropinsApp extends AbstractIntegrationTest{ } assert new File('build/testBuilds/test-config-dropins-app/build/wlp/usr/servers/LibertyProjectServer/apps/testWar-1.war').exists() : 'application not installed on server' } -} \ No newline at end of file +} diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithConfigDir.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithConfigDir.groovy index 718d6f616..85a0816b0 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithConfigDir.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithConfigDir.groovy @@ -13,12 +13,9 @@ public class TestCreateWithConfigDir extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(testBuildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(testBuildDir, sourceDir, buildFilename) } - + @Test public void test_create_with_configDir() { @@ -34,4 +31,4 @@ public class TestCreateWithConfigDir extends AbstractIntegrationTest{ assert bootstrapFile.exists() : "file not found" assert jvmOptionsFile.exists() : "file not found" } -} \ No newline at end of file +} diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithFiles.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithFiles.groovy index 8803d004e..09a55d4d5 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithFiles.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithFiles.groovy @@ -13,9 +13,6 @@ public class TestCreateWithFiles extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(testBuildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(testBuildDir, sourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithInlineProperties.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithInlineProperties.groovy index faedfaf9c..63e27e1fa 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithInlineProperties.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestCreateWithInlineProperties.groovy @@ -13,12 +13,9 @@ public class TestCreateWithInlineProperties extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(testBuildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(testBuildDir, sourceDir, buildFilename) } - + @Test public void test_create_with_inline_properties() { @@ -30,4 +27,4 @@ public class TestCreateWithInlineProperties extends AbstractIntegrationTest{ assert bootstrapFile.exists() : "file not found" assert jvmOptionsFile.exists() : "file not found" } -} \ No newline at end of file +} diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsEar.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsEar.groovy index d0bf0999b..ee37ba5df 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsEar.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsEar.groovy @@ -29,9 +29,6 @@ public class TestEclipseFacetsEar extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) try { @@ -54,7 +51,7 @@ public class TestEclipseFacetsEar extends AbstractIntegrationTest{ NodeList facets = eclipseFacets.getAt('installed') boolean hasJstEarFacet = false - facets.each { facet -> + facets.each { facet -> HashMap attributes = facet.attributes() if (attributes.getAt('facet').equals('jst.ear') && attributes.getAt('version').equals('6.0')) { hasJstEarFacet = true diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsWar.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsWar.groovy index f011ffc5a..b030418a2 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsWar.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEclipseFacetsWar.groovy @@ -29,9 +29,6 @@ public class TestEclipseFacetsWar extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) try { @@ -55,7 +52,7 @@ public class TestEclipseFacetsWar extends AbstractIntegrationTest{ boolean hasJstWebFacet = false boolean hasJavaFacet = false - facets.each { facet -> + facets.each { facet -> HashMap attributes = facet.attributes() if (attributes.getAt('facet').equals('jst.web') && attributes.getAt('version').equals('3.0')) { hasJstWebFacet = true diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEtcOutputDir.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEtcOutputDir.groovy index 7cc5cd405..21f2b3621 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEtcOutputDir.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestEtcOutputDir.groovy @@ -12,9 +12,6 @@ public class TestEtcOutputDir extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } @@ -30,7 +27,7 @@ public class TestEtcOutputDir extends AbstractIntegrationTest{ } catch (Exception e) { throw new AssertionError ("Fail on task libertyStart. "+ e) } - + assert new File('build/testBuilds/test-etc-output-dir/build/testEtcOutputDir').exists() : 'Could not find the outputDir specified in the build file.' assert new File('build/testBuilds/test-etc-output-dir/build/testEtcOutputDir/LibertyProjectServer').exists() : 'Could not find the outputDir specified in the build file.' } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestGetAppNames.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestGetAppNames.groovy index ce9ba4f2c..9f0481207 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestGetAppNames.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestGetAppNames.groovy @@ -12,9 +12,6 @@ public class TestGetAppNames extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplication.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplication.groovy index 88e2aa866..952b7870a 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplication.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplication.groovy @@ -26,9 +26,6 @@ public class TestLooseApplication extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplicationWithWarTask.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplicationWithWarTask.groovy index 1f3bf2b8e..7f1a21fec 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplicationWithWarTask.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseApplicationWithWarTask.groovy @@ -26,9 +26,6 @@ public class TestLooseApplicationWithWarTask extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseEarApplication.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseEarApplication.groovy index be261c5b8..da5e73df8 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseEarApplication.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestLooseEarApplication.groovy @@ -29,9 +29,6 @@ public class TestLooseEarApplication extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } @@ -89,27 +86,24 @@ public class TestLooseEarApplication extends AbstractIntegrationTest{ expression = "/archive/archive"; nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); Assert.assertEquals("Number of element ==>", 2, nodes.getLength()); - + String ejbJar = "/ejb-ejb.jar" String ejbWar = "/ejb-war.war" - + Assert.assertTrue( ejbWar.equals(nodes.item(0).getAttributes().getNamedItem("targetInArchive").getNodeValue()) || ejbJar.equals(nodes.item(0).getAttributes().getNamedItem("targetInArchive").getNodeValue())) - Assert.assertTrue( ejbWar.equals(nodes.item(1).getAttributes().getNamedItem("targetInArchive").getNodeValue()) || ejbJar.equals(nodes.item(1).getAttributes().getNamedItem("targetInArchive").getNodeValue())) - - expression = "/archive/file"; nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); Assert.assertEquals("Number of element ==>", 2, nodes.getLength()); } - + @Test public void test_start_with_timeout_success() { try { diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestOutputDirs.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestOutputDirs.groovy index 741aee6c3..bc00d1044 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestOutputDirs.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestOutputDirs.groovy @@ -12,9 +12,6 @@ public class TestOutputDirs extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestPluginConfigFile.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestPluginConfigFile.groovy index ac194974a..193134e55 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestPluginConfigFile.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestPluginConfigFile.groovy @@ -26,9 +26,6 @@ public class TestPluginConfigFile extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestStripVersion.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestStripVersion.groovy index 6cbe716e2..804e8b200 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestStripVersion.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestStripVersion.groovy @@ -12,9 +12,6 @@ public class TestStripVersion extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestWarTasksWithDifferentDependencies.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestWarTasksWithDifferentDependencies.groovy index 9f0d14b7a..c9a1248e8 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestWarTasksWithDifferentDependencies.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/TestWarTasksWithDifferentDependencies.groovy @@ -12,9 +12,6 @@ public class TestWarTasksWithDifferentDependencies extends AbstractIntegrationTe @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyLooseAppTestTimeoutSuccess.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyLooseAppTestTimeoutSuccess.groovy index 1fac57579..82339b91d 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyLooseAppTestTimeoutSuccess.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyLooseAppTestTimeoutSuccess.groovy @@ -28,9 +28,6 @@ public class VerifyLooseAppTestTimeoutSuccess extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessAppsTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessAppsTest.groovy index b1efc2a19..370c506bc 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessAppsTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessAppsTest.groovy @@ -12,9 +12,6 @@ public class VerifyTimeoutSuccessAppsTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessDropinsTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessDropinsTest.groovy index 154f6f401..21a09e602 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessDropinsTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessDropinsTest.groovy @@ -12,9 +12,6 @@ public class VerifyTimeoutSuccessDropinsTest extends AbstractIntegrationTest{ @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessListsOfAppsTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessListsOfAppsTest.groovy index 449e549a1..b0faad5d8 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessListsOfAppsTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessListsOfAppsTest.groovy @@ -12,9 +12,6 @@ public class VerifyTimeoutSuccessListsOfAppsTest extends AbstractIntegrationTest @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessMultiServerTest.groovy b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessMultiServerTest.groovy index e1d8537b1..b0d2eff65 100644 --- a/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessMultiServerTest.groovy +++ b/src/integTest/groovy/net/wasdev/wlp/gradle/plugins/VerifyTimeoutSuccessMultiServerTest.groovy @@ -27,9 +27,6 @@ public class VerifyTimeoutSuccessMultiServerTest extends AbstractIntegrationTest @BeforeClass public static void setup() { createDir(buildDir) - if(test_mode == "offline"){ - WLP_DIR.replace("\\","/") - } createTestProject(buildDir, resourceDir, buildFilename) } diff --git a/src/integTest/properties/ol1.properties b/src/integTest/properties/ol1.properties new file mode 100644 index 000000000..32688c5b8 --- /dev/null +++ b/src/integTest/properties/ol1.properties @@ -0,0 +1,4 @@ +lgpVersion=2.3-SNAPSHOT +runtimeVersion=17.0.0.4 +runtimeArtifactId=openliberty-runtime +runtimeGroup=io.openliberty diff --git a/src/integTest/properties/ol2.properties b/src/integTest/properties/ol2.properties new file mode 100644 index 000000000..c9cc5f827 --- /dev/null +++ b/src/integTest/properties/ol2.properties @@ -0,0 +1,4 @@ +lgpVersion=2.3-SNAPSHOT +runtimeVersion=18.0.0.1 +runtimeArtifactId=openliberty-runtime +runtimeGroup=io.openliberty diff --git a/src/integTest/properties/wlp1.properties b/src/integTest/properties/wlp1.properties new file mode 100644 index 000000000..d923f7252 --- /dev/null +++ b/src/integTest/properties/wlp1.properties @@ -0,0 +1,4 @@ +lgpVersion=2.3-SNAPSHOT +runtimeVersion=17.0.0.4 +runtimeArtifactId=wlp-javaee7 +runtimeGroup=com.ibm.websphere.appserver.runtime diff --git a/src/integTest/properties/wlp2.properties b/src/integTest/properties/wlp2.properties new file mode 100644 index 000000000..bdc82f3d6 --- /dev/null +++ b/src/integTest/properties/wlp2.properties @@ -0,0 +1,4 @@ +lgpVersion=2.3-SNAPSHOT +runtimeVersion=18.0.0.1 +runtimeArtifactId=wlp-javaee7 +runtimeGroup=com.ibm.websphere.appserver.runtime diff --git a/src/integTest/resources/arquillian-tests/build.gradle b/src/integTest/resources/arquillian-tests/build.gradle index 804cbd31c..72a39c6ea 100644 --- a/src/integTest/resources/arquillian-tests/build.gradle +++ b/src/integTest/resources/arquillian-tests/build.gradle @@ -98,7 +98,7 @@ dependencies { testCompile "org.jboss.shrinkwrap:shrinkwrap-api:1.2.6" testCompile files("${System.properties['java.home']}/../lib/tools.jar") - libertyRuntime "com.ibm.websphere.appserver.runtime:wlp-webProfile7:17.0.0.4" + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } task copyH2 { diff --git a/src/integTest/resources/liberty-multi-test/multiServerTest.gradle b/src/integTest/resources/liberty-multi-test/multiServerTest.gradle index c31da780f..bb7c9f31c 100644 --- a/src/integTest/resources/liberty-multi-test/multiServerTest.gradle +++ b/src/integTest/resources/liberty-multi-test/multiServerTest.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,17 +15,16 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - install { - runtimeUrl = wlpUrl - } servers { libertyServer1 { diff --git a/src/integTest/resources/liberty-package-test/liberty-package-archiveJar.gradle b/src/integTest/resources/liberty-package-test/liberty-package-archiveJar.gradle index 4cc416c15..f85d820e1 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-archiveJar.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-archiveJar.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,25 +15,18 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' packageLiberty { archive = 'testPackage.jar' include = 'runnable,minify' diff --git a/src/integTest/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle b/src/integTest/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle index 86ea6069b..3c5f6bb2f 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-archiveJarDirExist.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,25 +15,18 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' packageLiberty { archive = 'build' include = 'runnable' diff --git a/src/integTest/resources/liberty-package-test/liberty-package-archiveZip.gradle b/src/integTest/resources/liberty-package-test/liberty-package-archiveZip.gradle index 1cb87d34b..5744e0c17 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-archiveZip.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-archiveZip.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,22 +15,18 @@ buildscript { } } -def test_mode = runit -def WLP_DIR = System.getProperty('wlpInstallDir') +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = 'https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/2017-09-16_2214/openliberty-17.0.0.3-RC.zip' - } - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ + name = 'LibertyProjectServer' name = serverName packageLiberty { archive = 'testPackage.zip' diff --git a/src/integTest/resources/liberty-package-test/liberty-package-archiveZipPath.gradle b/src/integTest/resources/liberty-package-test/liberty-package-archiveZipPath.gradle index b90460901..f4b0386c3 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-archiveZipPath.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-archiveZipPath.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,25 +15,18 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' packageLiberty { archive = 'build/testPackage' } diff --git a/src/integTest/resources/liberty-package-test/liberty-package-looseApplication.gradle b/src/integTest/resources/liberty-package-test/liberty-package-looseApplication.gradle index df2a2144a..73fe02594 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-looseApplication.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-looseApplication.gradle @@ -74,7 +74,7 @@ dependencies { testCompile group: 'org.glassfish', name: 'javax.json', version:'1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' derby group: 'org.apache.derby', name: 'derby', version: '10.13.1.1' - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-kernel', version: '17.0.0.2' + libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-kernel', version: runtimeVersion } diff --git a/src/integTest/resources/liberty-package-test/liberty-package-noArchive.gradle b/src/integTest/resources/liberty-package-test/liberty-package-noArchive.gradle index 62e00a85b..91e8c2169 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-noArchive.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-noArchive.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,26 +15,18 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' packageLiberty { // archive is not set include = 'minify' diff --git a/src/integTest/resources/liberty-package-test/liberty-package-noAttrib.gradle b/src/integTest/resources/liberty-package-test/liberty-package-noAttrib.gradle index 75d8fc14d..13dcb2577 100644 --- a/src/integTest/resources/liberty-package-test/liberty-package-noAttrib.gradle +++ b/src/integTest/resources/liberty-package-test/liberty-package-noAttrib.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,26 +15,18 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - server{ - name ='libertyOnline' - } - } else { - installDir = WLP_DIR - server{ - name = 'libertyOffline' - } + server{ + name = 'LibertyProjectServer' } // TEST: packageLiberty attributes are not set on purpose diff --git a/src/integTest/resources/liberty-test/build.gradle b/src/integTest/resources/liberty-test/build.gradle index 3214bcb88..db6aae051 100644 --- a/src/integTest/resources/liberty-test/build.gradle +++ b/src/integTest/resources/liberty-test/build.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,25 +15,18 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - serverName ='libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' deploy { file = '../../resources/integrationTest/test-war.war' } diff --git a/src/integTest/resources/liberty-test/install_feature_multiple.gradle b/src/integTest/resources/liberty-test/install_feature_multiple.gradle index fbe9f88d8..3ea1ca674 100644 --- a/src/integTest/resources/liberty-test/install_feature_multiple.gradle +++ b/src/integTest/resources/liberty-test/install_feature_multiple.gradle @@ -12,10 +12,6 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') - apply plugin: 'liberty' repositories { @@ -23,18 +19,12 @@ repositories { } dependencies { - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-webProfile7', version: wlpVersion + libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-webProfile7', version: runtimeVersion } liberty { - if (test_mode == 'online') { - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' features { name = ["mongodb-2.0, adminCenter-1.0"] acceptLicense = true diff --git a/src/integTest/resources/liberty-test/install_feature_single.gradle b/src/integTest/resources/liberty-test/install_feature_single.gradle index 91eddc8a3..cfffef07a 100644 --- a/src/integTest/resources/liberty-test/install_feature_single.gradle +++ b/src/integTest/resources/liberty-test/install_feature_single.gradle @@ -12,10 +12,6 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') - apply plugin: 'liberty' repositories { @@ -23,18 +19,12 @@ repositories { } dependencies { - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: wlpVersion + libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: runtimeVersion } liberty { - if (test_mode == 'online') { - serverName = 'libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } server{ - name = serverName + name = 'LibertyProjectServer' features { name = ["mongodb-2.0"] acceptLicense = true diff --git a/src/integTest/resources/liberty-test/install_liberty_javaee7.gradle b/src/integTest/resources/liberty-test/install_liberty_javaee7.gradle index 75fe461b4..e02447cca 100644 --- a/src/integTest/resources/liberty-test/install_liberty_javaee7.gradle +++ b/src/integTest/resources/liberty-test/install_liberty_javaee7.gradle @@ -12,10 +12,6 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') - apply plugin: 'liberty' repositories { @@ -23,18 +19,11 @@ repositories { } dependencies { - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: wlpVersion + libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: runtimeVersion } liberty { - if (test_mode == 'online') { - server{ - name ='libertyOnline' - } - } else { - installDir = WLP_DIR - server{ - name = 'libertyOffline' - } + server{ + name ='LibertyProjectServer' } } diff --git a/src/integTest/resources/liberty-test/install_liberty_webProfile7.gradle b/src/integTest/resources/liberty-test/install_liberty_webProfile7.gradle index 835c1a5a7..199eef1c6 100644 --- a/src/integTest/resources/liberty-test/install_liberty_webProfile7.gradle +++ b/src/integTest/resources/liberty-test/install_liberty_webProfile7.gradle @@ -12,10 +12,6 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') - apply plugin: 'liberty' repositories { @@ -23,18 +19,11 @@ repositories { } dependencies { - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-webProfile7', version: wlpVersion + libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-webProfile7', version: runtimeVersion } liberty { - if (test_mode == 'online') { - server{ - name ='libertyOnline' - } - } else { - installDir = WLP_DIR - server{ - name = 'libertyOffline' - } + server{ + name ='LibertyProjectServer' } } diff --git a/src/integTest/resources/liberty-test/oldStyleTest.gradle b/src/integTest/resources/liberty-test/oldStyleTest.gradle index eff605829..7893a8fe9 100644 --- a/src/integTest/resources/liberty-test/oldStyleTest.gradle +++ b/src/integTest/resources/liberty-test/oldStyleTest.gradle @@ -1,3 +1,5 @@ +apply plugin: 'liberty' + buildscript { repositories { mavenLocal() @@ -13,23 +15,17 @@ buildscript { } } -def test_mode = runit -def wlpLicense = System.getProperty('wlpLicense') -def WLP_DIR = System.getProperty('wlpInstallDir') -def wlpUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/" + wlpVersion + "/wlp-webProfile7-" + wlpVersion + ".zip" +repositories { + mavenLocal() + mavenCentral() +} -apply plugin: 'liberty' +dependencies { + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion +} liberty { - if (test_mode == 'online') { - install { - runtimeUrl = wlpUrl - } - serverName ='libertyOnline' - } else { - installDir = WLP_DIR - serverName = 'libertyOffline' - } + serverName ='LibertyProjectServer' deploy { file = '../../resources/integrationTest/test-war.war' diff --git a/src/integTest/resources/liberty-test/testNoServerName.gradle b/src/integTest/resources/liberty-test/testNoServerName.gradle index 47ef8065e..fad6a0c40 100644 --- a/src/integTest/resources/liberty-test/testNoServerName.gradle +++ b/src/integTest/resources/liberty-test/testNoServerName.gradle @@ -23,5 +23,5 @@ repositories { } dependencies { - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-webProfile7', version: wlpVersion + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } diff --git a/src/integTest/resources/loose-ear-test/ejb-ear/build.gradle b/src/integTest/resources/loose-ear-test/ejb-ear/build.gradle index 8f9ee5fa7..7ca2e0e3b 100644 --- a/src/integTest/resources/loose-ear-test/ejb-ear/build.gradle +++ b/src/integTest/resources/loose-ear-test/ejb-ear/build.gradle @@ -17,13 +17,17 @@ buildscript { } } +repositories { + mavenLocal() + mavenCentral() +} dependencies { deploy project(':ejb-ejb') deploy project(path:':ejb-war', configuration:'archives') testCompile group: 'commons-httpclient', name: 'commons-httpclient', version:'3.1' testCompile group: 'junit', name: 'junit', version:'4.12' - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: '17.0.0.2' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } ear { diff --git a/src/integTest/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle b/src/integTest/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle index f6161a4a0..e602815a4 100644 --- a/src/integTest/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle +++ b/src/integTest/resources/sample.servlet-noWebAppConfig/getAppNamesFromConfigTest.gradle @@ -55,9 +55,6 @@ task war4(type:War){ } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName configFile = file("src/main/liberty/config/app-names-test.xml") @@ -83,6 +80,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle b/src/integTest/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle index f788ad17d..0282513f1 100644 --- a/src/integTest/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle +++ b/src/integTest/resources/sample.servlet-noWebAppConfig/testAppListsWithObjects.gradle @@ -55,9 +55,6 @@ task war4(type:War){ } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName configFile = file("src/main/liberty/config/app-names-test.xml") @@ -83,6 +80,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle b/src/integTest/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle index 90a654454..67df0fe04 100644 --- a/src/integTest/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle +++ b/src/integTest/resources/sample.servlet-noWebAppConfig/testWarTasksWithDifferentDependencies.gradle @@ -54,6 +54,7 @@ dependencies { providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' war2 'org.apache.commons:commons-proxy:1.0' war4 'org.apache.commons:commons-text:1.1' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } task war2(type:War){ @@ -74,9 +75,6 @@ task war4(type:War){ } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName configFile = file("src/main/liberty/config/server-list-test.xml") diff --git a/src/integTest/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle b/src/integTest/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle index b500c685a..145a32b50 100644 --- a/src/integTest/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle +++ b/src/integTest/resources/sample.servlet-noWebAppConfig/verifyTimeoutSuccessListsOfAppsTest.gradle @@ -54,9 +54,6 @@ task war4(type:War){ } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName configFile = file("src/main/liberty/config/server-list-test.xml") @@ -80,6 +77,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/TestStripVersion.gradle b/src/integTest/resources/sample.servlet/TestStripVersion.gradle index 0b2dc7637..fe874eaf3 100644 --- a/src/integTest/resources/sample.servlet/TestStripVersion.gradle +++ b/src/integTest/resources/sample.servlet/TestStripVersion.gradle @@ -41,9 +41,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ configFile = file("src/main/liberty/config/server-apps-test.xml") @@ -61,6 +58,7 @@ repositories { dependencies { testCompile 'junit:junit:4.12' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/installFeatureServerXmlTest.gradle b/src/integTest/resources/sample.servlet/installFeatureServerXmlTest.gradle index 6232ebc01..434b072a6 100644 --- a/src/integTest/resources/sample.servlet/installFeatureServerXmlTest.gradle +++ b/src/integTest/resources/sample.servlet/installFeatureServerXmlTest.gradle @@ -23,7 +23,7 @@ repositories { } dependencies { - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: wlpVersion + libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: runtimeVersion } liberty { diff --git a/src/integTest/resources/sample.servlet/noAppsTemplateTest.gradle b/src/integTest/resources/sample.servlet/noAppsTemplateTest.gradle index 03a3058eb..74beb939e 100644 --- a/src/integTest/resources/sample.servlet/noAppsTemplateTest.gradle +++ b/src/integTest/resources/sample.servlet/noAppsTemplateTest.gradle @@ -32,7 +32,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' - libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-webProfile7', version: wlpVersion + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } liberty { diff --git a/src/integTest/resources/sample.servlet/testAppConfig.gradle b/src/integTest/resources/sample.servlet/testAppConfig.gradle index 0209b0d70..6ab19e2b4 100644 --- a/src/integTest/resources/sample.servlet/testAppConfig.gradle +++ b/src/integTest/resources/sample.servlet/testAppConfig.gradle @@ -40,9 +40,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName looseApplication = false @@ -63,6 +60,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/testAppConfigFail.gradle b/src/integTest/resources/sample.servlet/testAppConfigFail.gradle index 3d412ab4f..b40894de0 100644 --- a/src/integTest/resources/sample.servlet/testAppConfigFail.gradle +++ b/src/integTest/resources/sample.servlet/testAppConfigFail.gradle @@ -40,9 +40,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName looseApplication = false @@ -63,6 +60,7 @@ repositories { dependencies { testCompile 'junit:junit:4.12' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/testConfigDropinsApp.gradle b/src/integTest/resources/sample.servlet/testConfigDropinsApp.gradle index 7ae5cd0a6..961cc50a8 100644 --- a/src/integTest/resources/sample.servlet/testConfigDropinsApp.gradle +++ b/src/integTest/resources/sample.servlet/testConfigDropinsApp.gradle @@ -45,9 +45,6 @@ task testWar(type:War){ } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName @@ -71,6 +68,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/testEtcOutputDir.gradle b/src/integTest/resources/sample.servlet/testEtcOutputDir.gradle index 42eb13b17..d8ce2c77a 100644 --- a/src/integTest/resources/sample.servlet/testEtcOutputDir.gradle +++ b/src/integTest/resources/sample.servlet/testEtcOutputDir.gradle @@ -55,11 +55,6 @@ task createEtcServerEnv{ } liberty { - - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } - server{ name = wlpServerName @@ -84,6 +79,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/testLooseApplication.gradle b/src/integTest/resources/sample.servlet/testLooseApplication.gradle index 880bf65d2..4caade840 100644 --- a/src/integTest/resources/sample.servlet/testLooseApplication.gradle +++ b/src/integTest/resources/sample.servlet/testLooseApplication.gradle @@ -41,9 +41,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ configFile = file("src/main/liberty/config/server-apps-test.xml") name = wlpServerName @@ -61,6 +58,7 @@ dependencies { testCompile 'junit:junit:4.12' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' compile 'org.apache.commons:commons-text:1.1' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/testLooseApplicationWithWarTask.gradle b/src/integTest/resources/sample.servlet/testLooseApplicationWithWarTask.gradle index 07dbcb87d..0c11b1852 100644 --- a/src/integTest/resources/sample.servlet/testLooseApplicationWithWarTask.gradle +++ b/src/integTest/resources/sample.servlet/testLooseApplicationWithWarTask.gradle @@ -57,6 +57,7 @@ dependencies { providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' compile 'org.apache.commons:commons-text:1.1' war2 'org.apache.commons:commons-proxy:1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } task war1(type:War){ @@ -69,9 +70,6 @@ task war2(type:War){ } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName looseApplication = true diff --git a/src/integTest/resources/sample.servlet/testOutputDirs.gradle b/src/integTest/resources/sample.servlet/testOutputDirs.gradle index 55cbdf1f5..64055fbf6 100644 --- a/src/integTest/resources/sample.servlet/testOutputDirs.gradle +++ b/src/integTest/resources/sample.servlet/testOutputDirs.gradle @@ -49,11 +49,6 @@ task createServerEnv{ } liberty { - - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } - server{ name = wlpServerName @@ -79,6 +74,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/testPluginConfigFile.gradle b/src/integTest/resources/sample.servlet/testPluginConfigFile.gradle index 87f32fc4a..4321b5ce8 100644 --- a/src/integTest/resources/sample.servlet/testPluginConfigFile.gradle +++ b/src/integTest/resources/sample.servlet/testPluginConfigFile.gradle @@ -40,9 +40,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ configFile = file("src/main/liberty/config/server-apps-test.xml") name = wlpServerName @@ -60,6 +57,7 @@ dependencies { testCompile 'junit:junit:4.12' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' compile 'org.apache.commons:commons-text:1.1' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle b/src/integTest/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle index d3440635b..df25e7094 100644 --- a/src/integTest/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle +++ b/src/integTest/resources/sample.servlet/verifyLooseAppTestTimeoutSuccess.gradle @@ -40,9 +40,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ configFile = file("src/main/liberty/config/server-loose-config-test.xml") @@ -68,6 +65,7 @@ dependencies { testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' compile 'org.apache.commons:commons-text:1.1' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle b/src/integTest/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle index 7e9ea4a84..6da7d2ea6 100644 --- a/src/integTest/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle +++ b/src/integTest/resources/sample.servlet/verifyTimeoutSuccessAppsTest.gradle @@ -40,9 +40,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ configFile = file("src/main/liberty/config/server-apps-test.xml") @@ -67,6 +64,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle b/src/integTest/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle index ca1b97d04..3822453e6 100644 --- a/src/integTest/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle +++ b/src/integTest/resources/sample.servlet/verifyTimeoutSuccessDropinsTest.gradle @@ -40,9 +40,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ name = wlpServerName looseApplication = false @@ -66,6 +63,7 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/sample.servlet/verifyTimeoutSuccessMultiServerTest.gradle b/src/integTest/resources/sample.servlet/verifyTimeoutSuccessMultiServerTest.gradle index 145c945fc..47e800108 100644 --- a/src/integTest/resources/sample.servlet/verifyTimeoutSuccessMultiServerTest.gradle +++ b/src/integTest/resources/sample.servlet/verifyTimeoutSuccessMultiServerTest.gradle @@ -33,13 +33,11 @@ dependencies { testCompile 'org.apache.cxf:cxf-rt-rs-client:3.1.1' testCompile 'org.glassfish:javax.json:1.0.4' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.4/wlp-webProfile7-17.0.0.4.zip" - } servers { libertyServer1 { apps = [war] diff --git a/src/integTest/resources/sampleJSP.servlet/testCompileJSP.gradle b/src/integTest/resources/sampleJSP.servlet/testCompileJSP.gradle index 4b99cdc4a..fd0090889 100644 --- a/src/integTest/resources/sampleJSP.servlet/testCompileJSP.gradle +++ b/src/integTest/resources/sampleJSP.servlet/testCompileJSP.gradle @@ -39,9 +39,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.1/wlp-webProfile7-17.0.0.1.zip" - } server{ configFile = file("src/resources/server.xml") name = 'LibertyProjectServer' @@ -53,16 +50,17 @@ liberty { } repositories { - maven { url "http://repo.maven.apache.org/maven2" } + maven { url "http://repo.maven.apache.org/maven2" } mavenCentral() } dependencies { - testCompile group: 'commons-logging', name: 'commons-logging', version:'1.0.4' - testCompile group: 'junit', name: 'junit', version:'4.9' - providedCompile group: 'org.apache.geronimo.specs', name: 'geronimo-servlet_3.0_spec', version:'1.0' + testCompile group: 'commons-logging', name: 'commons-logging', version:'1.0.4' + testCompile group: 'junit', name: 'junit', version:'4.9' + providedCompile group: 'org.apache.geronimo.specs', name: 'geronimo-servlet_3.0_spec', version:'1.0' testCompile 'junit:junit:4.12' providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } test { diff --git a/src/integTest/resources/server-config/testCreateLibertyConfigDir.gradle b/src/integTest/resources/server-config/testCreateLibertyConfigDir.gradle index 7594eeec7..0afd0d580 100644 --- a/src/integTest/resources/server-config/testCreateLibertyConfigDir.gradle +++ b/src/integTest/resources/server-config/testCreateLibertyConfigDir.gradle @@ -30,9 +30,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.2/wlp-webProfile7-17.0.0.2.zip" - } server{ name = wlpServerName @@ -50,6 +47,7 @@ repositories { dependencies { testCompile 'junit:junit:4.12' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } task integrationTest(type: Test) { diff --git a/src/integTest/resources/server-config/testCreateLibertyFiles.gradle b/src/integTest/resources/server-config/testCreateLibertyFiles.gradle index da75c73c4..763050ca2 100644 --- a/src/integTest/resources/server-config/testCreateLibertyFiles.gradle +++ b/src/integTest/resources/server-config/testCreateLibertyFiles.gradle @@ -30,9 +30,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.2/wlp-webProfile7-17.0.0.2.zip" - } server{ name = wlpServerName @@ -52,6 +49,7 @@ repositories { dependencies { testCompile 'junit:junit:4.12' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } task integrationTest(type: Test) { diff --git a/src/integTest/resources/server-config/testCreateLibertyInlineProperties.gradle b/src/integTest/resources/server-config/testCreateLibertyInlineProperties.gradle index 682ba8908..766f576a1 100644 --- a/src/integTest/resources/server-config/testCreateLibertyInlineProperties.gradle +++ b/src/integTest/resources/server-config/testCreateLibertyInlineProperties.gradle @@ -30,9 +30,6 @@ ext { } liberty { - install { - runtimeUrl = "http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-webProfile7/17.0.0.2/wlp-webProfile7-17.0.0.2.zip" - } server{ name = wlpServerName @@ -51,6 +48,7 @@ repositories { dependencies { testCompile 'junit:junit:4.12' + libertyRuntime group: runtimeGroup, name: runtimeArtifactId, version: runtimeVersion } task integrationTest(type: Test) {