From 2e10d2ba2b7ac6d4bcee3aac37223b3e8afe1bee Mon Sep 17 00:00:00 2001 From: GPrathap Date: Wed, 25 May 2016 14:42:54 +0530 Subject: [PATCH 1/5] added some bundles which required for this feature --- .../pom.xml | 1 - .../pom.xml | 12 ++++++++++++ .../org.wso2.carbon.device.mgt.iot.feature/pom.xml | 9 --------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/pom.xml b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/pom.xml index 170176ad7..9d5353c6c 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/pom.xml +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/pom.xml @@ -53,5 +53,4 @@ - \ No newline at end of file diff --git a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml index 79a61d850..e794f2677 100644 --- a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml +++ b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml @@ -160,6 +160,18 @@ org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.ui:${carbon.devicemgt.plugins.version} + + org.eclipse.paho:org.eclipse.paho.client.mqttv3:${eclipse.paho.version} + + + org.igniterealtime.smack.wso2:smack:${smack.wso2.version} + + + org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} + + + org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} + diff --git a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.feature/pom.xml b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.feature/pom.xml index d29cfb369..950d6d84d 100644 --- a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.feature/pom.xml +++ b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.feature/pom.xml @@ -137,15 +137,6 @@ org.json.wso2:json:${commons-json.version} - - org.eclipse.paho:org.eclipse.paho.client.mqttv3:${eclipse.paho.version} - - - org.igniterealtime.smack.wso2:smack:${smack.wso2.version} - - - org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} - org.wso2.carbon.core.server:${carbon.kernel.version} From 7c494d7bc07e5751f346fc61a21048aaeccb0504 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Wed, 25 May 2016 14:57:38 +0530 Subject: [PATCH 2/5] added some bundles which required for this feature --- .../pom.xml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml index e794f2677..941eead4f 100644 --- a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml +++ b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml @@ -160,18 +160,18 @@ org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.ui:${carbon.devicemgt.plugins.version} - - org.eclipse.paho:org.eclipse.paho.client.mqttv3:${eclipse.paho.version} - - - org.igniterealtime.smack.wso2:smack:${smack.wso2.version} - - - org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} - - - org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} - + + org.eclipse.paho:org.eclipse.paho.client.mqttv3:${eclipse.paho.version} + + + org.igniterealtime.smack.wso2:smack:${smack.wso2.version} + + + org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} + + + org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} + From ef801d6d08216b88bdb7e50f55b6ac1c60a71fd3 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Wed, 25 May 2016 15:07:26 +0530 Subject: [PATCH 3/5] fixed the formatting issue --- .../pom.xml | 339 +++++++++--------- 1 file changed, 171 insertions(+), 168 deletions(-) diff --git a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml index 941eead4f..61b6faacc 100644 --- a/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml +++ b/features/iot-plugins-feature/iot-base-plugin-feature/org.wso2.carbon.device.mgt.iot.adapter.feature/pom.xml @@ -18,176 +18,179 @@ ~ under the License. --> - + - - org.wso2.carbon.devicemgt-plugins - iot-base-plugin-feature - 2.1.1-SNAPSHOT - ../pom.xml - + + org.wso2.carbon.devicemgt-plugins + iot-base-plugin-feature + 2.1.1-SNAPSHOT + ../pom.xml + - 4.0.0 - org.wso2.carbon.device.mgt.iot.adapter.feature - pom - 2.1.1-SNAPSHOT - WSO2 Carbon - IoT Device Management Feature - http://wso2.org - This feature contains the adapter bundles required for IoT Server + 4.0.0 + org.wso2.carbon.device.mgt.iot.adapter.feature + pom + 2.1.1-SNAPSHOT + WSO2 Carbon - IoT Device Management Feature + http://wso2.org + This feature contains the adapter bundles required for IoT Server - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.output.adapter.mqtt - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.output.adapter.xmpp - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.output.adapter.ui - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.input.adapter.extension - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.input.adapter.http - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.input.adapter.mqtt - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.input.adapter.xmpp - - + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.output.adapter.mqtt + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.output.adapter.xmpp + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.output.adapter.ui + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.input.adapter.extension + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.input.adapter.http + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.input.adapter.mqtt + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.input.adapter.xmpp + + - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.output.adapter.ui.endpoint - ${carbon.devicemgt.plugins.version} - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - secured-outputui.war - - - - - - - - maven-resources-plugin - - - copy-resources - generate-resources - - copy-resources - - - src/main/resources - - - resources - - build.properties - p2.inf - - - - - - - - - org.wso2.maven - carbon-p2-plugin - ${carbon.p2.plugin.version} - - - p2-feature-generation - package - - p2-feature-gen - - - org.wso2.carbon.device.mgt.iot.adapter - ../../../features/etc/feature.properties - - - org.wso2.carbon.p2.category.type:server - org.eclipse.equinox.p2.type.group:false - - - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.mqtt:${carbon.devicemgt.plugins.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.xmpp:${carbon.devicemgt.plugins.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.extension:${carbon.devicemgt.plugins.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.http:${carbon.devicemgt.plugins.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.mqtt:${carbon.devicemgt.plugins.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.xmpp:${carbon.devicemgt.plugins.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.ui:${carbon.devicemgt.plugins.version} - - - org.eclipse.paho:org.eclipse.paho.client.mqttv3:${eclipse.paho.version} - - - org.igniterealtime.smack.wso2:smack:${smack.wso2.version} - - - org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} - - - org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} - - - - - org.wso2.carbon.event.output.adapter.server:${carbon.analytics.common.version} - - - org.wso2.carbon.event.input.adapter.server:${carbon.analytics.common.version} - - - org.wso2.carbon.identity.jwt.client.extension:${carbon.devicemgt.version} - - - - - - - - + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.output.adapter.ui.endpoint + ${carbon.devicemgt.plugins.version} + war + true + + ${project.build.directory}/maven-shared-archive-resources/webapps/ + + secured-outputui.war + + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.adapter + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:false + + + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.mqtt:${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.xmpp:${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.extension:${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.http:${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.mqtt:${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.input.adapter.xmpp:${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.output.adapter.ui:${carbon.devicemgt.plugins.version} + + + org.eclipse.paho:org.eclipse.paho.client.mqttv3:${eclipse.paho.version} + + + org.igniterealtime.smack.wso2:smack:${smack.wso2.version} + + + org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} + + + org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} + + + + + org.wso2.carbon.event.output.adapter.server:${carbon.analytics.common.version} + + + org.wso2.carbon.event.input.adapter.server:${carbon.analytics.common.version} + + + org.wso2.carbon.identity.jwt.client.extension:${carbon.devicemgt.version} + + + + + + + + From 03a21752e237e98b36365480e9ff1e17e66bcfb3 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Thu, 26 May 2016 11:14:31 +0530 Subject: [PATCH 4/5] Adding maven-compiler-plugin to the build profile --- .../org.wso2.carbon.device.mgt.mobile.android/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml index 9841815ed..acae2dc47 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml @@ -35,6 +35,10 @@ + + org.apache.maven.plugins + maven-compiler-plugin + org.apache.felix maven-scr-plugin From 86327ab87059599508cc7290e41659367d09575a Mon Sep 17 00:00:00 2001 From: Kasun Delgolla Date: Thu, 26 May 2016 15:35:26 +0530 Subject: [PATCH 5/5] Committing android service improvements + integration --- .../carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java | 5 +++-- .../src/main/resources/p2.inf | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java index 19f594bc8..d051b1646 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java @@ -27,6 +27,7 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; +import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManagementService; import org.wso2.carbon.device.mgt.mobile.impl.android.util.AndroidPluginConstants; import org.wso2.carbon.device.mgt.mobile.internal.MobileDeviceManagementDataHolder; @@ -153,12 +154,12 @@ public class GCMUtil { } public static String getConfigurationProperty(String property) { - DeviceManagementService androidDMService = MobileDeviceManagementDataHolder.getInstance(). - getAndroidDeviceManagementService(); + DeviceManagementService androidDMService = new AndroidDeviceManagementService(); try { //Get the TenantConfiguration from cache if not we'll get it from DM service TenantConfiguration tenantConfiguration = getTenantConfigurationFromCache(); if (tenantConfiguration == null) { + androidDMService.init(); tenantConfiguration = androidDMService.getDeviceManager().getConfiguration(); if (tenantConfiguration != null) { addTenantConfigurationToCache(tenantConfiguration); diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf index 9c79e2fbd..349c09785 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf @@ -1,6 +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.device.mgt.mobile.android_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/webapps/mdm-android-agent.war,target:${installFolder}/../../deployment/server/webapps/mdm-android-agent.war,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/conf/mobile-config.xml,target:${installFolder}/../../conf/mobile-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/dbscripts/plugins/,target:${installFolder}/../../../dbscripts/cdm/plugins/android,overwrite:true);\