From ff9cbfc814e8f90fd3ef9652c0816edc0e48a210 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Thu, 16 Mar 2023 12:51:24 +0530 Subject: [PATCH] fixed build failure of siddi extensions --- .../org.wso2.extension.siddhi.device/pom.xml | 6 +- .../device/BaseDeviceManagementTest.java | 5 +- .../carbon-home/repository/conf/carbon.xml | 124 +++--- .../carbon-home/repository/conf/registry.xml | 58 +-- .../src/test/resources/sql/h2.sql | 364 +++++++++++++++--- .../user-test/user-mgt-registry-test.xml | 101 ++--- .../pom.xml | 2 +- .../extensions/siddhi-extensions/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 3 +- pom.xml | 3 - 11 files changed, 420 insertions(+), 250 deletions(-) diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml index b628ac59d..cabeab7ae 100644 --- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml +++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins siddhi-extensions - 6.0.11-SNAPSHOT + 6.0.12-SNAPSHOT ../pom.xml @@ -30,6 +30,10 @@ WSO2 Siddhi Execution Extension - Device management Core functionality as Siddhi extension http://wso2.org + + true + + org.wso2.carbon.devicemgt diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/BaseDeviceManagementTest.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/BaseDeviceManagementTest.java index 76b80c7ac..8adabf3fb 100644 --- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/BaseDeviceManagementTest.java +++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/BaseDeviceManagementTest.java @@ -18,8 +18,6 @@ */ package org.wso2.extension.siddhi.device; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.tomcat.jdbc.pool.PoolProperties; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeSuite; @@ -29,6 +27,7 @@ import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOFactory; +import org.wso2.carbon.device.mgt.core.metadata.mgt.dao.MetadataManagementDAOFactory; import org.wso2.carbon.device.mgt.core.notification.mgt.dao.NotificationManagementDAOFactory; import org.wso2.carbon.device.mgt.core.operation.mgt.dao.OperationManagementDAOFactory; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; @@ -46,7 +45,6 @@ import java.sql.Statement; public abstract class BaseDeviceManagementTest { private DataSource dataSource; - private static final Log log = LogFactory.getLog(BaseDeviceManagementTest.class); @BeforeSuite public void setupDataSource() throws Exception { @@ -61,6 +59,7 @@ public abstract class BaseDeviceManagementTest { GroupManagementDAOFactory.init(dataSource); OperationManagementDAOFactory.init(dataSource); NotificationManagementDAOFactory.init(dataSource); + MetadataManagementDAOFactory.init(dataSource); } @BeforeClass diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/carbon.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/carbon.xml index f24ee57be..b52017981 100644 --- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/carbon.xml +++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/carbon.xml @@ -61,10 +61,10 @@ - + 8000 - - - - - 10500 + + + + + 10500 @@ -316,10 +316,10 @@ ${carbon.home}/repository/conf/axis2/axis2_client.xml true - - + + @@ -338,11 +338,11 @@ Default User Role - + - + --> + - - - - - - - - + + + + + + + + @@ -419,14 +419,14 @@ --> UserManager - - false + + false - - + + - + - default repository - ${p2.repo.url} + default repository + ${p2.repo.url} - - - - - true - - - - - - true - + + + + + true + + + + + + true + diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/registry.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/registry.xml index c16502090..a226ae80a 100644 --- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/registry.xml +++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/carbon-home/repository/conf/registry.xml @@ -1,7 +1,7 @@ - - - - - - - - false - - + + true - admin - - admin - admin - - everyone + admin + + admin + admin + + everyone false 500 - jdbc:h2:target/databasetest/CARBON_TEST - org.h2.Driver - 50 - 60000 - 5 + jdbc:h2:./target/databasetest/CARBON_TEST + org.h2.Driver + 50 + 60000 + 5 - - [\S]{5,30}$ - [\\S]{5,30} - SELECT * FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=? - - - - - - - - - - - - - - - + + org.wso2.carbon.user.core.tenant.JDBCTenantManager + false + 100 + false + default SHA-256 true + true + true false - false - wso2.com - true + ^[\S]{5,30}$ + Password length should be between 5 to 30 characters + + ^[\S]{5,30}$ + [a-zA-Z0-9._-|//]{3,30}$ + ^[\S]{3,30}$ + ^[^~!#$;%^*+={}\\|\\\\<>,\'\"]{3,30}$ + ^[\S]{3,30}$ + true + 100 100 - - - INSERT INTO UM_ROLE (UM_ROLE_NAME, UM_TENANT_ID) VALUES (?, ?) - - - - - - - - - - - - - - - - - org.wso2.carbon.user.core.tenant.JDBCTenantManager - + false + false + true + , + true + + class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager"> true - + login @@ -98,4 +78,3 @@ delegate-identity - diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml index f93434567..fbd5972e4 100644 --- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml +++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins siddhi-extensions - 6.0.11-SNAPSHOT + 6.0.12-SNAPSHOT ../pom.xml diff --git a/components/extensions/siddhi-extensions/pom.xml b/components/extensions/siddhi-extensions/pom.xml index 72bd0f3c1..de53d1aa8 100644 --- a/components/extensions/siddhi-extensions/pom.xml +++ b/components/extensions/siddhi-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 6.0.11-SNAPSHOT + 6.0.12-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.extension.siddhi.device.feature/pom.xml b/features/extensions-feature/org.wso2.extension.siddhi.device.feature/pom.xml index fef2732ab..851f05f36 100644 --- a/features/extensions-feature/org.wso2.extension.siddhi.device.feature/pom.xml +++ b/features/extensions-feature/org.wso2.extension.siddhi.device.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 6.0.11-SNAPSHOT + 6.0.12-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml b/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml index df4df6582..2066a5e0b 100644 --- a/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml +++ b/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml @@ -20,13 +20,12 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 6.0.11-SNAPSHOT + 6.0.12-SNAPSHOT ../pom.xml org.wso2.extension.siddhi.execution.json.feature pom - 4.1.21-SNAPSHOT WSO2 Siddhi Execution Extension - Json Feature http://wso2.org This feature contains Siddhi extension feature for changing a json string to individual properties. diff --git a/pom.xml b/pom.xml index 7dca82458..42a805d48 100644 --- a/pom.xml +++ b/pom.xml @@ -37,12 +37,9 @@ components/extensions components/mobile-plugins - - features/mobile-plugins-feature - features/extensions-feature