From d5c85980e1555b3360636502899a4b3c9c661a60 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 17 May 2021 12:25:32 +0530 Subject: [PATCH] move appmgt db creation, application-extension synapse apis, cdm datasource config --- .../src/main/resources/p2.inf | 4 +- .../api/_API_Application_Registration_.xml | 63 ++++++++++++++++++ .../sequences/_api_registration_fault_.xml | 22 +++++++ .../pom.xml | 37 +++++++++++ .../src/main/resources/p2.inf | 1 + .../conf/datasources/cdm-datasources.xml | 65 +++++++++++++++++++ .../src/main/resources/p2.inf | 1 + 7 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml create mode 100644 features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml create mode 100755 features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf index 1d8124571f9..61654c2892b 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf @@ -1,3 +1,5 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ \ No newline at end of file +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/synapse-configs/default/api/_API_Application_Registration_.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/_API_Application_Registration_.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/synapse-configs/default/sequences/_api_registration_fault_.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/sequences/_api_registration_fault_.xml,overwrite:true);\ diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml new file mode 100644 index 00000000000..7e25c013420 --- /dev/null +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml @@ -0,0 +1,63 @@ + + + + + + + + + + 60000 + fault + + + + + + + + + + + + + + + + + + 60000 + fault + + + + + + + + + + + + + + + + + + 60000 + fault + + + + + + + + + + + + + + \ No newline at end of file diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml new file mode 100644 index 00000000000..335a9abaf39 --- /dev/null +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml index d8a8448faca..dc53590a671 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml @@ -60,6 +60,10 @@ cxf-rt-frontend-jaxrs ${cxf.version} + + com.h2database.wso2 + h2-database-engine + @@ -108,6 +112,39 @@ + + org.apache.maven.plugins + maven-antrun-plugin + + + create-app-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven carbon-p2-plugin diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf index a12c244131a..1a8247162f8 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf @@ -1,4 +1,5 @@ instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf/application-mgt.xml,target:${installFolder}/../../conf/application-mgt.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf/datasources/application-mgt-datasources.xml,target:${installFolder}/../../conf/datasources/application-mgt-datasources.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/dbscripts/cdm/application-mgt,target:${installFolder}/../../../dbscripts/cdm/application-mgt,overwrite:true);\ diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml new file mode 100755 index 00000000000..78db49688e9 --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml @@ -0,0 +1,65 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + DM_DS + The datasource used for CDM + + jdbc/DM_DS + + + + jdbc:h2:./repository/database/WSO2DM_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + DM_ARCHIVAL_DS + The archival datasource used for CDM + + jdbc/DM_ARCHIVAL_DS + + + + jdbc:h2:./repository/database/WSO2DM_ARCHIVAL_DS;DB_CLOSE_ON_EXIT=FALSE + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf index 09ec420214c..d373520aa0a 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf @@ -1,4 +1,5 @@ instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/datasources/cdm-datasources.xml,target:${installFolder}/../../conf/datasources/cdm-datasources.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/cdm-config.xml,target:${installFolder}/../../conf/cdm-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/mdm-ui-config.xml,target:${installFolder}/../../conf/mdm-ui-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/license-config.xml,target:${installFolder}/../../conf/etc/license-config.xml,overwrite:true);\