diff --git a/stdlib/auth/build.gradle b/stdlib/auth/build.gradle index 845f2da9696d..881f3a8e43e9 100644 --- a/stdlib/auth/build.gradle +++ b/stdlib/auth/build.gradle @@ -17,14 +17,6 @@ apply from: "$rootDir/gradle/balNativeLibProject.gradle" -description = 'Ballerina - Auth' - -configurations.testCompileClasspath { - resolutionStrategy { - preferProjectModules() - } -} - dependencies { baloImplementation project(path: ":ballerina-internal", configuration: 'baloImplementation') baloImplementation project(path: ":ballerina-builtin", configuration: 'baloImplementation') @@ -82,16 +74,24 @@ dependencies { testCompile project(':ballerina-crypto') } -createBalo { - jvmTarget = 'true' -} - configurations.all { resolutionStrategy.preferProjectModules() } +configurations.testCompileClasspath { + resolutionStrategy { + preferProjectModules() + } +} + configurations { testCompile.exclude group: 'org.slf4j', module: 'slf4j-log4j12' testCompile.exclude group: 'org.slf4j', module: 'slf4j-simple' testCompile.exclude group: 'org.ops4j.pax.logging', module: 'pax-logging-api' } + +createBalo { + jvmTarget = 'true' +} + +description = 'Ballerina - Auth' diff --git a/stdlib/auth/src/test/java/org/ballerinalang/stdlib/auth/util/JBallerinaTestInitializer.java b/stdlib/auth/src/test/java/org/ballerinalang/stdlib/auth/util/JBallerinaTestInitializer.java deleted file mode 100644 index e315e6ee204b..000000000000 --- a/stdlib/auth/src/test/java/org/ballerinalang/stdlib/auth/util/JBallerinaTestInitializer.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you 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 org.ballerinalang.stdlib.auth.util; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.ITestContext; -import org.testng.ITestListener; -import org.testng.ITestResult; - -/** - * A test suit listener for jballerina test cases initialization. - * - * @since 0.995.0 - */ -public class JBallerinaTestInitializer implements ITestListener { - - private static Logger log = LoggerFactory.getLogger(JBallerinaTestInitializer.class); - private static final String ENABLE_JBALLERINA_TESTS = "enableJBallerinaTests"; - - @Override - public void onStart(ITestContext context) { - String property = context.getCurrentXmlTest().getParameter(ENABLE_JBALLERINA_TESTS); - if (property != null && Boolean.valueOf(property)) { - log.info("JBallerina tests initialized..."); - System.setProperty(ENABLE_JBALLERINA_TESTS, "true"); - } - } - - @Override - public void onFinish(ITestContext context) { - String property = context.getCurrentXmlTest().getParameter(ENABLE_JBALLERINA_TESTS); - if (property != null && Boolean.valueOf(property)) { - log.info("JBallerina tests disabled..."); - System.clearProperty(ENABLE_JBALLERINA_TESTS); - } - } - - @Override - public void onTestStart(ITestResult result) { - //ignore - } - - @Override - public void onTestSuccess(ITestResult result) { - //ignore - } - - @Override - public void onTestFailure(ITestResult result) { - //ignore - } - - @Override - public void onTestSkipped(ITestResult result) { - //ignore - } - - @Override - public void onTestFailedButWithinSuccessPercentage(ITestResult result) { - //ignore - } -} diff --git a/stdlib/auth/src/test/resources/testng.xml b/stdlib/auth/src/test/resources/testng.xml index 259108308411..b2e671b14f17 100644 --- a/stdlib/auth/src/test/resources/testng.xml +++ b/stdlib/auth/src/test/resources/testng.xml @@ -20,12 +20,16 @@ under the License. - - - + + + + + + + diff --git a/stdlib/crypto/build.gradle b/stdlib/crypto/build.gradle index 0141dede47b1..a38e902a4fe8 100644 --- a/stdlib/crypto/build.gradle +++ b/stdlib/crypto/build.gradle @@ -17,10 +17,6 @@ apply from: "$rootDir/gradle/balNativeLibProject.gradle" -configurations { - localDependency -} - dependencies { baloImplementation project(path: ':ballerina-time', configuration: 'baloImplementation') baloImplementation project(path: ':ballerina-builtin', configuration: 'baloImplementation') @@ -40,6 +36,22 @@ dependencies { testCompile project(':ballerina-jvm') } +configurations.all { + resolutionStrategy.preferProjectModules() +} + +configurations.testCompileClasspath { + resolutionStrategy { + preferProjectModules() + } +} + +configurations { + testCompile.exclude group: 'org.slf4j', module: 'slf4j-log4j12' + testCompile.exclude group: 'org.slf4j', module: 'slf4j-simple' + testCompile.exclude group: 'org.ops4j.pax.logging', module: 'pax-logging-api' +} + createBalo { jvmTarget = 'true' } diff --git a/stdlib/crypto/src/test/java/org/ballerinalang/stdlib/crypto/util/JBallerinaTestInitializer.java b/stdlib/crypto/src/test/java/org/ballerinalang/stdlib/crypto/util/JBallerinaTestInitializer.java deleted file mode 100644 index ca993fe094fc..000000000000 --- a/stdlib/crypto/src/test/java/org/ballerinalang/stdlib/crypto/util/JBallerinaTestInitializer.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you 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 org.ballerinalang.stdlib.crypto.util; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.ITestContext; -import org.testng.ITestListener; -import org.testng.ITestResult; - -/** - * A test suit listener for jballerina test cases initialization. - * - * @since 0.995.0 - */ -public class JBallerinaTestInitializer implements ITestListener { - - private static Logger log = LoggerFactory.getLogger(JBallerinaTestInitializer.class); - private static final String ENABLE_JBALLERINA_TESTS = "enableJBallerinaTests"; - - @Override - public void onStart(ITestContext context) { - String property = context.getCurrentXmlTest().getParameter(ENABLE_JBALLERINA_TESTS); - if (property != null && Boolean.valueOf(property)) { - log.info("JBallerina tests initialized..."); - System.setProperty(ENABLE_JBALLERINA_TESTS, "true"); - } - } - - @Override - public void onFinish(ITestContext context) { - String property = context.getCurrentXmlTest().getParameter(ENABLE_JBALLERINA_TESTS); - if (property != null && Boolean.valueOf(property)) { - log.info("JBallerina tests disabled..."); - System.clearProperty(ENABLE_JBALLERINA_TESTS); - } - } - - @Override - public void onTestStart(ITestResult result) { - //ignore - } - - @Override - public void onTestSuccess(ITestResult result) { - //ignore - } - - @Override - public void onTestFailure(ITestResult result) { - //ignore - } - - @Override - public void onTestSkipped(ITestResult result) { - //ignore - } - - @Override - public void onTestFailedButWithinSuccessPercentage(ITestResult result) { - //ignore - } -} diff --git a/stdlib/crypto/src/test/resources/testng.xml b/stdlib/crypto/src/test/resources/testng.xml index c37b7996a070..aaeeee3f4873 100644 --- a/stdlib/crypto/src/test/resources/testng.xml +++ b/stdlib/crypto/src/test/resources/testng.xml @@ -20,11 +20,16 @@ under the License. - - - + + + + + + + + diff --git a/stdlib/ldap/build.gradle b/stdlib/ldap/build.gradle index c00ac040244e..b529cfe2e819 100644 --- a/stdlib/ldap/build.gradle +++ b/stdlib/ldap/build.gradle @@ -18,10 +18,6 @@ apply from: "$rootDir/gradle/balNativeLibProject.gradle" -configurations.all { - resolutionStrategy.preferProjectModules() -} - dependencies { baloCreat project(':lib-creator') implementation project(':ballerina-core') @@ -49,4 +45,24 @@ dependencies { baloImplementation project(path: ':ballerina-system', configuration: 'baloImplementation') } +configurations.all { + resolutionStrategy.preferProjectModules() +} + +configurations.testCompileClasspath { + resolutionStrategy { + preferProjectModules() + } +} + +configurations { + testCompile.exclude group: 'org.slf4j', module: 'slf4j-log4j12' + testCompile.exclude group: 'org.slf4j', module: 'slf4j-simple' + testCompile.exclude group: 'org.ops4j.pax.logging', module: 'pax-logging-api' +} + +createBalo { + jvmTarget = 'true' +} + description = 'Ballerina - LDAP' diff --git a/stdlib/oauth2/build.gradle b/stdlib/oauth2/build.gradle index 457f663cf413..b5c67caa237f 100644 --- a/stdlib/oauth2/build.gradle +++ b/stdlib/oauth2/build.gradle @@ -18,16 +18,6 @@ apply from: "$rootDir/gradle/balNativeLibProject.gradle" -configurations.all { - resolutionStrategy.preferProjectModules() -} - -configurations.testCompileClasspath { - resolutionStrategy { - preferProjectModules() - } -} - dependencies { baloCreat project(':lib-creator') @@ -65,8 +55,24 @@ dependencies { baloImplementation project(path: ':ballerina-config-api', configuration: 'baloImplementation') } -description = 'Ballerina - OAuth2' +configurations.all { + resolutionStrategy.preferProjectModules() +} + +configurations.testCompileClasspath { + resolutionStrategy { + preferProjectModules() + } +} + +configurations { + testCompile.exclude group: 'org.slf4j', module: 'slf4j-log4j12' + testCompile.exclude group: 'org.slf4j', module: 'slf4j-simple' + testCompile.exclude group: 'org.ops4j.pax.logging', module: 'pax-logging-api' +} createBalo { jvmTarget = 'true' } + +description = 'Ballerina - OAuth2'