diff --git a/modules/distribution/src/analytics/samples/connected-cup/pom.xml b/modules/distribution/src/analytics/samples/connected-cup/pom.xml new file mode 100644 index 00000000..4e6e89ef --- /dev/null +++ b/modules/distribution/src/analytics/samples/connected-cup/pom.xml @@ -0,0 +1,165 @@ + + + + + org.wso2 + wso2 + 1 + + + 4.0.0 + org.wso2.iot.devicemgt-plugins + iot-devicetype-analytics-samples + 1.0.0 + pom + Installing Connected Cup Device Types - Analytics + http://wso2.org + + + + + org.wso2.maven + carbon-p2-plugin + 1.5.4 + + + 2-p2-repo-generation + package + + p2-repo-gen + + + file:\${project.basedir}/target/p2-repo + file:\${project.basedir}/target/p2-repo + true + true + + + org.coffeeking:org.coffeeking.connectedcup.analytics.feature:\${org.coffeeking.version} + + + + + + default-feature-install + package + + p2-profile-gen + + + analytics-default + file:\${project.basedir}/target/p2-repo + file:\${project.basedir}/target/p2-repo + \${project.basedir}/../../../components + false + + + + org.coffeeking.connectedcup.analytics.feature.group + \${org.coffeeking.version} + + + + + + + + + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + Apache Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + + + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + WSO2 Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + + @carbon-device-mgt-plugin-version@ + 1.0.0 + + \ No newline at end of file diff --git a/modules/distribution/src/analytics/samples/pom.xml b/modules/distribution/src/analytics/samples/device-plugins/pom.xml similarity index 99% rename from modules/distribution/src/analytics/samples/pom.xml rename to modules/distribution/src/analytics/samples/device-plugins/pom.xml index 509f552e..6ae63c0e 100644 --- a/modules/distribution/src/analytics/samples/pom.xml +++ b/modules/distribution/src/analytics/samples/device-plugins/pom.xml @@ -79,7 +79,7 @@ analytics-default file:\${project.basedir}/target/p2-repo file:\${project.basedir}/target/p2-repo - \${project.basedir}/../../components + \${project.basedir}/../../../components false diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/activity_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/activity_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/activity_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/activity_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/activity_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/activity_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/activity_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/activity_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/audio_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/audio_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/audio_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/audio_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/audio_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/audio_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/audio_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/audio_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/battery_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/battery_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/battery_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/battery_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/battery_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/battery_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/battery_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/battery_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/call_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/call_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/call_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/call_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/call_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/call_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/call_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/call_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/location_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/location_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/location_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/location_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/location_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/location_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/location_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/location_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/network_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/network_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/network_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/network_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/network_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/network_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/network_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/network_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/screen_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/screen_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/screen_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/screen_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/screen_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/screen_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/screen_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/screen_data_streamConfiguration.xml diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/sms_data.csv b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/sms_data.csv similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/sms_data.csv rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/sms_data.csv diff --git a/modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/sms_data_streamConfiguration.xml b/modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/sms_data_streamConfiguration.xml similarity index 100% rename from modules/distribution/src/analytics/samples/resources/eventsimulatorfiles/sms_data_streamConfiguration.xml rename to modules/distribution/src/analytics/samples/device-plugins/resources/eventsimulatorfiles/sms_data_streamConfiguration.xml diff --git a/modules/distribution/src/core/samples/connectedcup-samples-deployer.xml b/modules/distribution/src/core/samples/connectedcup-samples-deployer.xml index 83b3dce8..b17b154f 100644 --- a/modules/distribution/src/core/samples/connectedcup-samples-deployer.xml +++ b/modules/distribution/src/core/samples/connectedcup-samples-deployer.xml @@ -26,6 +26,7 @@ connectedcup + ../wso2/analytics/samples/connected-cup 4.0.0 @@ -33,7 +34,7 @@ iot-devicetype-samples 1.0.0 pom - Creating custom distribution + Installing Connected Cup Device Types - IoT Core http://wso2.org @@ -50,13 +51,16 @@ p2-repo-gen - file:\${basedir}/p2-repo - file:\${basedir}/p2-repo + file:\${basedir}/target/p2-repo + file:\${basedir}/target/p2-repo true true - org.coffeeking:org.coffeeking.connectedcup.feature:\${org.coffeeking.version} + org.coffeeking:org.coffeeking.connectedcup.backend.feature:\${org.coffeeking.version} + + + org.coffeeking:org.coffeeking.connectedcup.ui.feature:\${org.coffeeking.version} @@ -69,44 +73,64 @@ default - file:\${basedir}/p2-repo - file:\${basedir}/p2-repo + file:\${basedir}/target/p2-repo + file:\${basedir}/target/p2-repo \${basedir}/../wso2/components false + + + org.coffeeking.connectedcup.ui.feature.group + \${org.coffeeking.version} + - org.coffeeking.connectedcup.feature.group + org.coffeeking.connectedcup.backend.feature.group \${org.coffeeking.version} - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - default-feature-install + manager-feature-install package + + p2-profile-gen + - - - - - - - - - - + device-manager + file:\${basedir}/target/p2-repo + file:\${basedir}/target/p2-repo + \${basedir}/../wso2/components + false + + + + org.coffeeking.connectedcup.ui.feature.group + \${org.coffeeking.version} + + + + + backend-feature-install + package - run + p2-profile-gen + + device-backend + file:\${basedir}/target/p2-repo + file:\${basedir}/target/p2-repo + \${basedir}/../wso2/components + false + + + + org.coffeeking.connectedcup.backend.feature.group + \${org.coffeeking.version} + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/pom.xml b/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/pom.xml new file mode 100644 index 00000000..8f440816 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/pom.xml @@ -0,0 +1,123 @@ + + + + + + + + org.coffeeking + connected-cup-feature-parent + 1.0.0 + ../pom.xml + + + 4.0.0 + org.coffeeking.connectedcup.analytics.feature + pom + 1.0.0 + WSO2 IoTS(Device Types) - Connected Cup Analytics Feature + WSO2 IoTS(Device Types) - Connected Cup Feature + http://wso2.org + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + ../analytics-feature/src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.coffeeking + org.coffeeking.connectedcup.analytics + + ${org.coffeeking.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + + + + org.wso2.maven + carbon-p2-plugin + + + p2-feature-generation + package + + p2-feature-gen + + + org.coffeeking.connectedcup.analytics + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + + + + + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/build.properties b/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/src/main/resources/build.properties similarity index 100% rename from modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/build.properties rename to modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/src/main/resources/build.properties diff --git a/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/src/main/resources/p2.inf b/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/src/main/resources/p2.inf new file mode 100644 index 00000000..647a15da --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/analytics-feature/src/main/resources/p2.inf @@ -0,0 +1,7 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/coffee_level.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/connected_cup.car);\ \ No newline at end of file diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/pom.xml b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/pom.xml similarity index 74% rename from modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/pom.xml rename to modules/distribution/src/core/samples/connectedcup/feature/backend-feature/pom.xml index 9829ece0..8c901ad4 100644 --- a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/pom.xml +++ b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/pom.xml @@ -30,11 +30,11 @@ 4.0.0 - org.coffeeking.connectedcup.feature + org.coffeeking.connectedcup.backend.feature pom 1.0.0 WSO2 IoTS(Device Types) - Connected Cup Feature - WSO2 IoTS(Device Types) - Connected Cup Feature + WSO2 IoTS(Device Types) - Connected Cup Backend Feature http://wso2.org @@ -74,7 +74,7 @@ copy-resources - src/main/resources + ../backend-feature/src/main/resources resources @@ -93,41 +93,6 @@ org.apache.maven.plugins maven-dependency-plugin - - unpack - package - - unpack - - - - - org.coffeeking - org.coffeeking.connectedcup.analytics - - ${org.coffeeking.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - org.coffeeking - org.coffeeking.connectedcup.ui - - ${org.coffeeking.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt - - **/* - - - - copy-jaxrs-war package @@ -209,7 +174,7 @@ p2-feature-gen - org.coffeeking.connectedcup + org.coffeeking.connectedcup.backend ../../../features/etc/feature.properties diff --git a/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/build.properties b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/build.properties new file mode 100644 index 00000000..9c86577d --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/configs/connectedcup.xml b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/configs/connectedcup.xml similarity index 100% rename from modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/configs/connectedcup.xml rename to modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/configs/connectedcup.xml diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/datasources/connectedcup-datasources.xml b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/datasources/connectedcup-datasources.xml similarity index 100% rename from modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/datasources/connectedcup-datasources.xml rename to modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/datasources/connectedcup-datasources.xml diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/dbscripts/h2.sql b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/dbscripts/h2.sql similarity index 100% rename from modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/dbscripts/h2.sql rename to modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/dbscripts/h2.sql diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/dbscripts/mysql.sql b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/dbscripts/mysql.sql similarity index 100% rename from modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/dbscripts/mysql.sql rename to modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/dbscripts/mysql.sql diff --git a/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/p2.inf b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/p2.inf new file mode 100644 index 00000000..d23ed547 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/backend-feature/src/main/resources/p2.inf @@ -0,0 +1,19 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../conf/device-types/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.backend_${feature.version}/configs/,target:${installFolder}/../../../conf/device-types/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/connectedcup,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.backend_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.backend_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/device-types/connectedcup.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/connectedcup.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/connected-cup-agent.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/connectedcup);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/connected-cup-agent);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/connectedcup);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/connectedcup-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/ConnectedCupDM_DB.h2.db);\ \ No newline at end of file diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/deviceConfig.properties b/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/deviceConfig.properties deleted file mode 100644 index a189416d..00000000 --- a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/deviceConfig.properties +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -# -# 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. -# -# - -#[Device-Configurations] -owner=${DEVICE_OWNER} -deviceId=${DEVICE_ID} -device-name=${DEVICE_NAME} -controller-context=/digital_display/controller -mqtt-ep=${MQTT_EP} -auth-method=token -auth-token=${DEVICE_TOKEN} -refresh-token=${DEVICE_REFRESH_TOKEN} -push-interval=15 - - diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/sketch.properties b/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/sketch.properties deleted file mode 100644 index e794c194..00000000 --- a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/sketch.properties +++ /dev/null @@ -1,2 +0,0 @@ -templates=deviceConfig.properties -zipfilename=DigitalDisplayAgent.zip diff --git a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/start-device.sh b/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/start-device.sh deleted file mode 100755 index e9dd87c4..00000000 --- a/modules/distribution/src/core/samples/connectedcup/feature/connectedcup-feature/src/main/resources/agent/start-device.sh +++ /dev/null @@ -1,190 +0,0 @@ -#!/bin/bash - -echo "----------------------------------------------------------------" -echo "| WSO2 IOT Sample " -echo "| Virtual RaspiAlarm " -echo "| ---------------- " -echo "| ....initializing startup-script " -echo "----------------------------------------------------------------" - -#while true; do -# read -p "What is the network-interface of your device that the Agent should use (find from ifconfig. ex: wlan0,en0,eth0..) > " interface -# -# echo "Setting the network-interface to " $interface -# sed s/^network-interface=.*/network-interface=$interface/ deviceConfig.properties > myTmp -# mv -f myTmp deviceConfig.properties -# break; -#done -# -#while true; do -# read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-IoT-Server (ex: '60' indicates 1 minute) > " interval -# -# if [ $interval -eq $interval 2>/dev/null ] -# then -# echo "Setting data-push interval to " $interval " seconds." -# sed s/^push-interval=.*/push-interval=$interval/ deviceConfig.properties > myTmp -# mv -f myTmp deviceConfig.properties -# break; -# else -# echo "Input needs to be an integer indicating the number seconds between successive data-pushes." -# fi -#done - - -#java -jar wso2-firealarm-virtual-agent-advanced.jar - -#while true; do -# read -p "Do you wish to run 'apt-get update' and continue? [Yes/No] " yn -# case $yn in -# [Yy]* ) sudo apt-get update; -# break;; -# [Nn]* ) echo "Continuing without apt-get update..."; -# break;; -# * ) echo "Please answer yes or no."; -# esac -#done -# -#if [ $? -ne 0 ]; then -# echo "apt-get update failed.... Some dependencies may not get installed" -# echo "If an already installed version of the package exists, try running:" -# echo "----------------------------------------------------------------" -# echo "sudo -i" -# echo "cd /var/lib/dpkg/info" -# echo "rm -rf wso2-raspi-alarm*" -# echo "dpkg --remove --force-remove-reinstreq wso2-raspi-alarm" -# echo "exit" -# echo "----------------------------------------------------------------" -# echo "Retry Installation...." -# break; -#fi -# -#echo "Installing 'gdebi' package..." -#sudo apt-get install gdebi # installation of gdebi -# -# -#if [ $? -ne 0 ]; then -# echo "gdebi installation failed.... dependencies will not be installed without gdebi" -# read -p "Do you wish to continue without gdebi? [Yes/No] " yn -# case $yn in -# [Yy]* ) echo "Continueing without gdebi.....";; -# [Nn]* ) echo "Try to resolve errors and re-run the script."; -# exit;; -# * ) exit;; -# esac -#fi -# -# -#for f in ./wso2-raspi-alarm_1.0_armhf.deb; do -# ## Check if the glob gets expanded to existing files. -# ## If not, f here will be exactly the pattern above -# ## and the exists test will evaluate to false. -# # [ -e "$f" ] && echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing" || echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path"; exit; -# if [ -e "$f" ]; then -# echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing now...." -# else -# echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path. \nExiting installation..."; -# exit; -# fi -# ## This is all we needed to know, so we can break after the first iteration -# break -#done -# -#echo "Installing the 'wso2-raspi-alarm deb package'" -#sudo gdebi wso2-raspi-alarm_1.0_armhf.deb -# -#if [ $? -ne 0 ]; then -# echo "Installation Failed...." -# exit; -#fi - -#sudo killall -9 python -# -#for f in ./RaspberryAgent.zip; do -# ## Check if the glob gets expanded to existing files. -# ## If not, f here will be exactly the pattern above -# ## and the exists test will evaluate to false. -# # [ -e "$f" ] && echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing" || echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path"; exit; -# if [ -e "$f" ]; then -# echo "Agent files found......" -# sudo rm -rf /usr/local/src/RaspberryAgent -# sudo unzip RaspberryAgent.zip -d /usr/local/src/ -# else -# echo "'RaspberryAgent.zip' file does not exist in current path. \nInstalling without upgrading agent..."; -# fi -# ## This is all we needed to know, so we can break after the first iteration -# break -#done -# -#for f in /usr/local/src/RaspberryAgent/rc.local; do -# ## Check if the glob gets expanded to existing files. -# ## If not, f here will be exactly the pattern above -# ## and the exists test will evaluate to false. -# if [ -e "$f" ]; then -# echo "Copying boot script" -# sudo mv /usr/local/src/RaspberryAgent/rc.local /etc/rc.local -# sudo chmod +x /etc/rc.local -# else -# echo "Unable to set agent statup on boot"; -# fi -# ## This is all we needed to know, so we can break after the first iteration -# break -#done -# -#for f in ./deviceConfigs.cfg; do -# ## Check if the glob gets expanded to existing files. -# ## If not, f here will be exactly the pattern above -# ## and the exists test will evaluate to false. -# if [ -e "$f" ]; then -# echo "Configuration file found......" -# else -# echo "'deviceConfigs.cfg' file does not exist in current path. \nExiting installation..."; -# exit; -# fi -# ## This is all we needed to know, so we can break after the first iteration -# break -#done -# -#echo "Altering Configuration file" -#sed -i 's|[/,]||g' deviceConfigs.cfg -# -#echo "Copying configurations file to /usr/local/src/RaspberryAgent" -#sudo cp ./deviceConfigs.cfg /usr/local/src/RaspberryAgent/ -# -#if [ $? -ne 0 ]; then -# echo "Copying configuration file failed...." -# exit; -#fi -# -#while true; do -# read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-DC (ex: '60' indicates 1 minute) > " input -# -# if [ $input -eq $input 2>/dev/null ] -# then -# echo "Setting data-push interval to $input seconds." -# echo $input > /usr/local/src/RaspberryAgent/time-interval -# break; -# else -# echo "Input needs to be an integer indicating the number seconds between successive data-pushes." -# fi -#done -# -#cd /usr/local/src/RaspberryAgent/ -#sudo chmod +x RaspberryStats.py -#sudo nohup ./RaspberryStats.py -i $input http://wso2.org - connectedcup-feature + backend-feature + ui-feature + analytics-feature diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/pom.xml b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/pom.xml new file mode 100644 index 00000000..f2dc1e12 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/pom.xml @@ -0,0 +1,171 @@ + + + + + + + + org.coffeeking + connected-cup-feature-parent + 1.0.0 + ../pom.xml + + + 4.0.0 + org.coffeeking.connectedcup.ui.feature + pom + 1.0.0 + WSO2 IoTS(Device Types) - Connected Cup UI Feature + WSO2 IoTS(Device Types) - Connected Cup UI Feature + http://wso2.org + + + + com.h2database.wso2 + h2-database-engine + 1.2.140.wso2v3 + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + ../ui-feature/src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.coffeeking + org.coffeeking.connectedcup.ui + + ${org.coffeeking.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt + + **/* + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + create-connected-cup-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + + + p2-feature-generation + package + + p2-feature-gen + + + org.coffeeking.connectedcup.ui + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + + + + + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/build.properties b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/build.properties new file mode 100644 index 00000000..9c86577d --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/configs/connectedcup.xml b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/configs/connectedcup.xml new file mode 100644 index 00000000..8d70e4d0 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/configs/connectedcup.xml @@ -0,0 +1,25 @@ + + + + + + jdbc/ConnectedCupDM_DB + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/datasources/connectedcup-datasources.xml b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/datasources/connectedcup-datasources.xml new file mode 100644 index 00000000..893a91c0 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/datasources/connectedcup-datasources.xml @@ -0,0 +1,46 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + ConnectedCupDM_DB + The datasource used for the Connected Cup database + + jdbc/ConnectedCupDM_DB + + + + jdbc:h2:repository/database/ConnectedCupDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/dbscripts/h2.sql b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 00000000..afa2ad8a --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,11 @@ + +-- ----------------------------------------------------- +-- Table `CONNECTED_CUP_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `CONNECTED_CUP_DEVICE` ( + `CONNECTED_CUP_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`CONNECTED_CUP_DEVICE_ID`) ); + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/dbscripts/mysql.sql b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 00000000..64560fc3 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,12 @@ +-- ----------------------------------------------------- +-- Table `CONNECTED_CUP_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `CONNECTED_CUP_DEVICE` ( + `CONNECTED_CUP_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`CONNECTED_CUP_DEVICE_ID`) ) +ENGINE = InnoDB; + + + + diff --git a/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/p2.inf b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/p2.inf new file mode 100644 index 00000000..27366c97 --- /dev/null +++ b/modules/distribution/src/core/samples/connectedcup/feature/ui-feature/src/main/resources/p2.inf @@ -0,0 +1,20 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../conf/device-types/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.ui_${feature.version}/configs/,target:${installFolder}/../../../conf/device-types/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/connectedcup,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.ui_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.coffeeking.connectedcup.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ + + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/device-types/connectedcup.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/connectedcup);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/connectedcup-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/ConnectedCupDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view);\ \ No newline at end of file diff --git a/modules/distribution/src/core/samples/device-plugins-deployer.xml b/modules/distribution/src/core/samples/device-plugins-deployer.xml index 23b5509a..7aa00660 100644 --- a/modules/distribution/src/core/samples/device-plugins-deployer.xml +++ b/modules/distribution/src/core/samples/device-plugins-deployer.xml @@ -33,7 +33,7 @@ http://wso2.org - ../wso2/analytics/samples + ../wso2/analytics/samples/device-plugins