From 0539fc4e903fcc06d747eee46399be4e5c9fe9a2 Mon Sep 17 00:00:00 2001 From: Vishanth Date: Wed, 19 Apr 2017 13:05:58 +0530 Subject: [PATCH 01/64] settin equinox p2 type group to true --- .../org.wso2.carbon.device.mgt.adapter.feature/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml index 3cd5a35c29..873d791dc8 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml @@ -155,7 +155,7 @@ org.wso2.carbon.p2.category.type:server - org.eclipse.equinox.p2.type.group:false + org.eclipse.equinox.p2.type.group:true From 8381070bf6bf56d95a7dd2bf2c3f50b4be947b48 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 1 Jun 2017 17:21:23 +0530 Subject: [PATCH 02/64] Implemented Pull Notification Support --- .../mqtt/util/MQTTAdapterListener.java | 8 +- .../DeviceAccessBasedMQTTAuthorizer.java | 9 ++ components/extensions/pom.xml | 1 + .../pom.xml | 110 ++++++++++++++++++ ...eviceTypeOperationAdapterSubscription.java | 65 +++++++++++ .../listener/NotificationMessage.java | 49 ++++++++ ...ullNotificationMqttContentTransformer.java | 65 +++++++++++ .../PullNotificationStartupListener.java | 61 ++++++++++ .../internal/MqttNotificationDataHolder.java | 51 ++++++++ ...lNotificationListenerServiceComponent.java | 89 ++++++++++++++ .../util/MqttNotificationListener.java | 71 +++++++++++ .../pull-notification-listeners/pom.xml | 58 +++++++++ .../impl/EventReceiverServiceImpl.java | 7 +- .../impl/AndroidDeviceManagementService.java | 6 + .../impl/WindowsDeviceManagementService.java | 6 + .../pom.xml | 61 ++++++++++ .../src/main/resources/build.properties | 19 +++ .../src/main/resources/p2.inf | 1 + features/extensions-feature/pom.xml | 3 +- pom.xml | 8 +- 20 files changed, 739 insertions(+), 9 deletions(-) create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java create mode 100644 components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java create mode 100644 components/extensions/pull-notification-listeners/pom.xml create mode 100644 features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml create mode 100644 features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/build.properties create mode 100644 features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/p2.inf diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java index e6e9fe7001..4d83480569 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -91,6 +91,10 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { this.topic = PropertyUtils.replaceTenantDomainProperty(topic); this.eventAdapterListener = inputEventAdapterListener; this.tenantDomain = this.topic.split("/")[0]; + //this is to allow server listener from IoT Core to connect. + if (this.tenantDomain.equals("+")) { + this.tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + } //SORTING messages until the server fetches them String temp_directory = System.getProperty("java.io.tmpdir"); @@ -126,8 +130,8 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { .getContentTransformer(contentTransformerType); } } catch (MqttException e) { - log.error("Exception occurred while subscribing to MQTT broker at " - + mqttBrokerConnectionConfiguration.getBrokerUrl()); + log.error("Exception occurred while creating an mqtt client to " + + mqttBrokerConnectionConfiguration.getBrokerUrl() + " reason code:" + e.getReasonCode()); throw new InputEventAdapterRuntimeException(e); } } diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java index 568c567eca..9d4e609d8d 100644 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java @@ -74,11 +74,13 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer { private static Log log = LogFactory.getLog(DeviceAccessBasedMQTTAuthorizer.class); private AuthorizationConfigurationManager MQTTAuthorizationConfiguration; private static final String CDMF_SERVER_BASE_CONTEXT = "/api/device-mgt/v1.0"; + private static final String DEFAULT_ADMIN_PERMISSION = "permission/admin/device-mgt"; private static final String CACHE_MANAGER_NAME = "mqttAuthorizationCacheManager"; private static final String CACHE_NAME = "mqttAuthorizationCache"; private static DeviceAccessAuthorizationAdminService deviceAccessAuthorizationAdminService; private static OAuthRequestInterceptor oAuthRequestInterceptor; private static final String GATEWAY_ERROR_CODE = "404"; + private static final String ALL_TENANT_DOMAIN = "+"; public DeviceAccessBasedMQTTAuthorizer() { oAuthRequestInterceptor = new OAuthRequestInterceptor(); @@ -102,6 +104,13 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer { try { String topics[] = topic.split("/"); String tenantDomainFromTopic = topics[0]; + if ("+".equals(tenantDomainFromTopic)) { + if (MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(authorizationSubject.getTenantDomain()) + && isUserAuthorized(authorizationSubject, DEFAULT_ADMIN_PERMISSION, UI_EXECUTE)) { + return true; + } + return false; + } if (!tenantDomainFromTopic.equals(authorizationSubject.getTenantDomain())) { return false; } diff --git a/components/extensions/pom.xml b/components/extensions/pom.xml index 639275b5a2..0cef1ecda0 100644 --- a/components/extensions/pom.xml +++ b/components/extensions/pom.xml @@ -37,6 +37,7 @@ cdmf-transport-adapters mb-extensions siddhi-extensions + pull-notification-listeners diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml new file mode 100644 index 0000000000..612800260f --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -0,0 +1,110 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + pull-notification-listeners + 3.0.37-SNAPSHOT + ../pom.xml + + + + 4.0.0 + org.wso2.carbon.device.mgt.mqtt.notification.listener + bundle + WSO2 Carbon - MQTT Pull Notification Listener Implementation + WSO2 Carbon - MQTT Pull Notification Lister Implementation + http://wso2.org + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.core + + + org.wso2.carbon.analytics-common + org.wso2.carbon.event.input.adapter.core + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + org.eclipse.osgi + org.eclipse.osgi.services + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.input.adapter.extension + + + + + + + org.apache.felix + maven-scr-plugin + + + org.apache.felix + maven-bundle-plugin + true + + + ${project.artifactId} + ${project.artifactId} + ${carbon.devicemgt.plugins.version} + MQTT Pull Notification Provider Bundle + + !org.wso2.carbon.device.mgt.mqtt.notification.listener.internal, + org.wso2.carbon.device.mgt.mqtt.notification.listener.* + + + org.osgi.framework, + org.osgi.service.component, + org.apache.commons.logging, + org.wso2.carbon.device.mgt.common.*, + org.wso2.carbon.device.mgt.core.service, + com.google.gson, + org.wso2.carbon.context, + org.wso2.carbon.device.mgt.input.adapter.extension, + org.wso2.carbon.event.input.adapter.core, + org.wso2.carbon.event.input.adapter.core.exception, + org.wso2.carbon.user.api, + org.wso2.carbon.core, + org.wso2.carbon.device.mgt.core.config, + org.wso2.carbon.device.mgt.core.config.pull.notification + + + + + + + + diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java new file mode 100644 index 0000000000..b2896991fc --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.pull.notification.NotificationContext; +import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationExecutionFailedException; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; +import org.wso2.carbon.event.input.adapter.core.InputEventAdapterSubscription; +import org.wso2.carbon.user.api.UserStoreException; + +/** + * Creates a event subscription for the input adapter. + */ +public class DeviceTypeOperationAdapterSubscription implements InputEventAdapterSubscription { + private static final Log log = LogFactory.getLog(DeviceTypeOperationAdapterSubscription.class); + + @Override + public void onEvent(Object o) { + + if (o == null || !(o instanceof NotificationMessage)) { + return; + } + + NotificationMessage notificationMessage = (NotificationMessage) o; + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(notificationMessage.getTenantDomain(), + true); + String deviceType = ""; + try { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(PrivilegedCarbonContext. + getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration().getAdminUserName()); + NotificationContext notificationContext = notificationMessage.getNotificationContext(); + deviceType = notificationContext.getDeviceId().getType(); + MqttNotificationDataHolder.getInstance().getDeviceManagementProviderService() + .executePullNotification(deviceType, notificationContext); + } catch (UserStoreException e) { + log.error("Failed to retrieve tenant username", e); + } catch (PullNotificationExecutionFailedException e) { + log.error("Failed to execute device type pull notification subscriber execution for device type" + deviceType, + e); + } finally { + PrivilegedCarbonContext.endTenantFlow(); + } + + } +} diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java new file mode 100644 index 0000000000..3fdb6e7bc1 --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener; + +import org.wso2.carbon.device.mgt.common.pull.notification.NotificationContext; + +public class NotificationMessage { + + private String tenantDomain; + private NotificationContext notificationContext; + + public NotificationMessage(String tenantDomain, NotificationContext notificationContext) { + this.tenantDomain = tenantDomain; + this.notificationContext = notificationContext; + } + + public String getTenantDomain() { + return tenantDomain; + } + + public void setTenantDomain(String tenantDomain) { + this.tenantDomain = tenantDomain; + } + + public NotificationContext getNotificationContext() { + return notificationContext; + } + + public void setNotificationContext( + NotificationContext notificationContext) { + this.notificationContext = notificationContext; + } +} diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java new file mode 100644 index 0000000000..18b9a331b0 --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener; + +import com.google.gson.Gson; +import com.google.gson.JsonSyntaxException; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.pull.notification.NotificationContext; +import org.wso2.carbon.device.mgt.common.pull.notification.NotificationPayload; +import org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer; + +import java.util.Map; + +/** + * This transforms the incomming message payload to notification message, inorder to pass this + * information before its passed to the input adapter subscriber. + */ +public class PullNotificationMqttContentTransformer implements ContentTransformer { + + public static final String MQTT_NOTIFICATION_MESSAGE_TRANSFORMER = "mqtt-notification-transformer"; + + @Override + public String getType() { + return MQTT_NOTIFICATION_MESSAGE_TRANSFORMER; + } + + @Override + public Object transform(Object message, Map dynamicProperties) { + String topic = (String) dynamicProperties.get("topic"); + String[] topicParams = topic.split("/"); + String tenantDomain = topicParams[0]; + String deviceType = topicParams[1]; + String deviceId = topicParams[2]; + Gson gson = new Gson(); + try { + NotificationPayload notificationPayload = gson.fromJson((String) message, NotificationPayload.class); + NotificationContext notificationContext = new NotificationContext + (new DeviceIdentifier(deviceId, deviceType), notificationPayload); + return new NotificationMessage(tenantDomain, notificationContext); + } catch (Exception e) { + //Avoid notification listener to fail. + return new Object(); + } finally { + PrivilegedCarbonContext.endTenantFlow(); + } + } + +} diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java new file mode 100644 index 0000000000..5db5acadfa --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.core.ServerStartupObserver; +import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.util.MqttNotificationListener; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; + +/** + * Startup listener is been used to make sure the reciever gets activated after the server start up to avoid + * Bundle not loading issues. + */ +public class PullNotificationStartupListener implements ServerStartupObserver { + + private static final Log log = LogFactory.getLog(PullNotificationStartupListener.class); + + @Override + public void completingServerStartup() { + } + + @Override + public void completedServerStartup() { + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, true); + try { + //TODO DeviceConfiguration Either need to be a osgi service or need to add those variable to system variables. + boolean isEnabled = DeviceConfigurationManager.getInstance().getDeviceManagementConfig() + .getPullNotificationConfiguration().isEnabled(); + if (isEnabled) { + MqttNotificationListener.setupMqttInputAdapter(); + MqttNotificationDataHolder.getInstance().getInputEventAdapterService().start(); + log.info("Mqtt operation listener activated"); + } + } finally { + PrivilegedCarbonContext.endTenantFlow(); + } + } + +} diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java new file mode 100644 index 0000000000..4a95c543fe --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener.internal; + +import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; +import org.wso2.carbon.event.input.adapter.core.InputEventAdapterService; + +public class MqttNotificationDataHolder { + + private DeviceManagementProviderService deviceManagementProviderService; + private InputEventAdapterService inputEventAdapterService; + + private static MqttNotificationDataHolder thisInstance = new MqttNotificationDataHolder(); + + public static MqttNotificationDataHolder getInstance() { + return thisInstance; + } + + public DeviceManagementProviderService getDeviceManagementProviderService() { + return deviceManagementProviderService; + } + + public void setDeviceManagementProviderService(DeviceManagementProviderService deviceManagementProviderService) { + this.deviceManagementProviderService = deviceManagementProviderService; + } + + public InputEventAdapterService getInputEventAdapterService() { + return inputEventAdapterService; + } + + public void setInputEventAdapterService( + InputEventAdapterService inputEventAdapterService) { + this.inputEventAdapterService = inputEventAdapterService; + } +} diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java new file mode 100644 index 0000000000..df15fe2cf2 --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener.internal; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.osgi.framework.BundleContext; +import org.osgi.service.component.ComponentContext; +import org.wso2.carbon.core.ServerStartupObserver; +import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; +import org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.PullNotificationMqttContentTransformer; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.PullNotificationStartupListener; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.util.MqttNotificationListener; +import org.wso2.carbon.event.input.adapter.core.InputEventAdapterService; + +/** + * @scr.component name="org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.PullNotificationListenerServiceComponent" immediate="true" + * @scr.reference name="carbon.device.mgt.provider" + * interface="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService" + * cardinality="1..1" + * policy="dynamic" + * bind="setDeviceManagementProviderService" + * unbind="unsetDeviceManagementProviderService" + * @scr.reference name="event.input.adapter.service" + * interface="org.wso2.carbon.event.input.adapter.core.InputEventAdapterService" + * cardinality="1..1" + * policy="dynamic" + * bind="setInputEventAdapterService" + * unbind="unsetInputEventAdapterService" + */ +public class PullNotificationListenerServiceComponent { + + private static final Log log = LogFactory.getLog(PullNotificationListenerServiceComponent.class); + + @SuppressWarnings("unused") + protected void activate(ComponentContext componentContext) { + try { + //Do nothing + if (log.isDebugEnabled()) { + log.debug("pull notification provider implementation bundle has been successfully " + + "initialized"); + } + BundleContext bundleContext = componentContext.getBundleContext(); + bundleContext.registerService(ServerStartupObserver.class.getName(), new PullNotificationStartupListener(), + null); + bundleContext.registerService(ContentTransformer.class.getName(), new PullNotificationMqttContentTransformer(), null); + } catch (Throwable e) { + log.error("Error occurred while initializing pull notification provider implementation bundle", e); + } + } + + protected void deactivate(ComponentContext componentContext) { + //Do nothing + } + + protected void setDeviceManagementProviderService(DeviceManagementProviderService deviceManagementProviderService) { + MqttNotificationDataHolder.getInstance().setDeviceManagementProviderService(deviceManagementProviderService); + } + + protected void unsetDeviceManagementProviderService(DeviceManagementProviderService deviceManagementProviderService) { + MqttNotificationDataHolder.getInstance().setDeviceManagementProviderService(deviceManagementProviderService); + } + + protected void setInputEventAdapterService(InputEventAdapterService inputEventAdapterService) { + MqttNotificationDataHolder.getInstance().setInputEventAdapterService(inputEventAdapterService); + } + + protected void unsetInputEventAdapterService(InputEventAdapterService inputEventAdapterService) { + MqttNotificationDataHolder.getInstance().setInputEventAdapterService(null); + } + +} diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java new file mode 100644 index 0000000000..3f0c4048f5 --- /dev/null +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2017, 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.wso2.carbon.device.mgt.mqtt.notification.listener.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.DeviceTypeOperationAdapterSubscription; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.PullNotificationMqttContentTransformer; +import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; +import org.wso2.carbon.event.input.adapter.core.InputEventAdapterConfiguration; +import org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterException; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; + +import java.util.HashMap; +import java.util.Map; + +/** + * This creates a link between input adapter and the subscription of the input adpater. + */ +public class MqttNotificationListener { + private static final Log log = LogFactory.getLog(MqttNotificationListener.class); + + private static final String TOPIC = "topic"; + private static final String SUBSCRIBED_TOPIC = "+/+/+/update/operation"; + private static final String TYPE = "oauth-mqtt"; + private static final String JSON = "json"; + private static final String NAME = "iot_core_server_adapter"; + private static final String CONTENT_TRANSFORMER_TYPE = "contentTransformer"; + + + public static void setupMqttInputAdapter() { + InputEventAdapterConfiguration inputEventAdapterConfiguration = new InputEventAdapterConfiguration(); + inputEventAdapterConfiguration.setName(NAME); + inputEventAdapterConfiguration.setType(TYPE); + inputEventAdapterConfiguration.setMessageFormat(JSON); + Map mqttAdapterProperties = new HashMap<>(); + mqttAdapterProperties.put(TOPIC, SUBSCRIBED_TOPIC); + mqttAdapterProperties.put(CONTENT_TRANSFORMER_TYPE, + PullNotificationMqttContentTransformer.MQTT_NOTIFICATION_MESSAGE_TRANSFORMER); + inputEventAdapterConfiguration.setProperties(mqttAdapterProperties); + try { + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(MultitenantConstants + .SUPER_TENANT_DOMAIN_NAME, true); + MqttNotificationDataHolder.getInstance().getInputEventAdapterService() + .create(inputEventAdapterConfiguration, new DeviceTypeOperationAdapterSubscription()); + } catch (InputEventAdapterException e) { + log.error("Unable to create Input Event Adapter for pull notification.", e); + } finally { + PrivilegedCarbonContext.endTenantFlow(); + } + } + +} diff --git a/components/extensions/pull-notification-listeners/pom.xml b/components/extensions/pull-notification-listeners/pom.xml new file mode 100644 index 0000000000..54240211b2 --- /dev/null +++ b/components/extensions/pull-notification-listeners/pom.xml @@ -0,0 +1,58 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + extensions + 3.0.37-SNAPSHOT + ../pom.xml + + + 4.0.0 + pull-notification-listeners + pom + WSO2 Carbon - Pull Notification Extension + http://wso2.org + + + org.wso2.carbon.device.mgt.mqtt.notification.listener + + + + + + + org.apache.felix + maven-scr-plugin + 1.7.2 + + + generate-scr-scrdescriptor + + scr + + + + + + + + diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java index 362289b2ca..f56fba52c6 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java @@ -53,12 +53,11 @@ public class EventReceiverServiceImpl implements EventReceiverService { log.debug("Invoking Android device even logging."); } Message message = new Message(); - Object metaData[] = {eventBeanWrapper.getDeviceIdentifier()}; - - Object payload[] = {eventBeanWrapper.getPayload(), eventBeanWrapper.getType()}; + Object payload[] = {eventBeanWrapper.getDeviceIdentifier(), + eventBeanWrapper.getPayload(), eventBeanWrapper.getType()}; try { if (AndroidAPIUtils.getEventPublisherService().publishEvent( - EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload)) { + EVENT_STREAM_DEFINITION, "1.0.0", new Object[0], new Object[0], payload)) { message.setResponseCode("Event is published successfully."); return Response.status(Response.Status.CREATED).entity(message).build(); } else { diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java index fb8ef11775..5dc35ce60f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java @@ -29,6 +29,7 @@ import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager; +import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.mobile.android.impl.util.AndroidPluginConstants; @@ -120,6 +121,11 @@ public class AndroidDeviceManagementService implements DeviceManagementService { return null; } + @Override + public PullNotificationSubscriber getPullNotificationSubscriber() { + return null; + } + private String getConfigProperty(List configs, String propertyName) { for (ConfigurationEntry entry : configs) { if (propertyName.equals(entry.getName())) { diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java index f3cc7b364b..d6b635df39 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java @@ -21,6 +21,7 @@ package org.wso2.carbon.device.mgt.mobile.windows.impl; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager; +import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; @@ -80,4 +81,9 @@ public class WindowsDeviceManagementService implements DeviceManagementService { return null; } + @Override + public PullNotificationSubscriber getPullNotificationSubscriber() { + return null; + } + } diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml new file mode 100644 index 0000000000..52e7817fee --- /dev/null +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -0,0 +1,61 @@ + + + + org.wso2.carbon.devicemgt-plugins + extensions-feature + 3.0.37-SNAPSHOT + ../pom.xml + + 4.0.0 + + org.wso2.carbon.device.mgt.notification.listener.feature + pom + 3.0.37-SNAPSHOT + WSO2 Carbon - Notification Listener + http://wso2.org + This feature contains the core bundles required iot core listeners + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.mqtt.notification.listener + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + 4-p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.notification.listener + ../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.mqtt.notification.listener:${carbon.devicemgt.plugins.version} + + + + + + + + + + \ No newline at end of file diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/build.properties b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/build.properties new file mode 100644 index 0000000000..33bb0980d3 --- /dev/null +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/build.properties @@ -0,0 +1,19 @@ +# +# Copyright (c) 2016, 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. +# + +custom = true diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/p2.inf b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..7ab37b9d7d --- /dev/null +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/src/main/resources/p2.inf @@ -0,0 +1 @@ +instructions.configure = \ \ No newline at end of file diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml index 0f2b2d9964..dd157efd03 100644 --- a/features/extensions-feature/pom.xml +++ b/features/extensions-feature/pom.xml @@ -39,6 +39,7 @@ org.wso2.carbon.device.mgt.adapter.feature org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature org.wso2.extension.siddhi.execution.json.feature - + org.wso2.carbon.device.mgt.notification.listener.feature + diff --git a/pom.xml b/pom.xml index b3d7b36fde..8bd3b46c52 100644 --- a/pom.xml +++ b/pom.xml @@ -453,7 +453,11 @@ org.wso2.carbon.device.mgt.output.adapter.websocket ${carbon.devicemgt.plugins.version} - + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.mqtt.notification.listener + ${carbon.devicemgt.plugins.version} + org.wso2.carbon.devicemgt-plugins @@ -1153,7 +1157,7 @@ 1.1.1 - 2.0.58 + 2.0.69-SNAPSHOT [2.0.0, 3.0.0) From 3a7536f1f654ad09ceb0bf7a926cb3672c9ff580 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 1 Jun 2017 23:26:02 +0530 Subject: [PATCH 03/64] update version --- .../org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml | 2 +- .../pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml index ad9d9789eb..f959963920 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 3.0.37-SNAPSHOT + 3.0.38-SNAPSHOT ../../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index 52e7817fee..ccfcaef415 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -5,7 +5,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 3.0.37-SNAPSHOT + 3.0.38-SNAPSHOT ../pom.xml 4.0.0 From 9dc836928ca94546312e084f93227adb520f8d1f Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 3 Jun 2017 13:27:40 +0530 Subject: [PATCH 04/64] few changes on content transformation logic --- .../transformer/MQTTContentTransformer.java | 89 +++++++++++++++++++ .../validator/MQTTContentValidator.java | 13 ++- ...eviceTypeOperationAdapterSubscription.java | 9 +- .../listener/NotificationMessage.java | 27 ++++-- ...ullNotificationMqttContentTransformer.java | 10 +-- .../pom.xml | 2 +- pom.xml | 2 +- 7 files changed, 123 insertions(+), 29 deletions(-) create mode 100644 components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java new file mode 100644 index 0000000000..e3a89d0180 --- /dev/null +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2016, 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.wso2.carbon.device.mgt.input.adapter.extension.transformer; + +import com.jayway.jsonpath.JsonPath; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; +import org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer; + +import java.util.Map; + +/** + * This holds the default implementation of ContentTransformer + */ +public class MQTTContentTransformer implements ContentTransformer { + private static final String MQTT_CONTENT_TRANSFORMER = "iot-mqtt"; + private static final String TOPIC = "topic"; + private static String JSON_ARRAY_START_CHAR = "["; + + private static final Log log = LogFactory.getLog(MQTTContentTransformer.class); + + @Override + public String getType() { + return MQTT_CONTENT_TRANSFORMER; + } + + @Override + public Object transform(Object messagePayload, Map dynamicProperties) { + String topic = (String) dynamicProperties.get(TOPIC); + String topics[] = topic.split("/"); + String deviceId = topics[2]; + String deviceType = topics[1]; + String message = (String) messagePayload; + try { + if (message.startsWith(JSON_ARRAY_START_CHAR)) { + return processMultipleEvents(message, deviceId, deviceType); + } else { + return processSingleEvent(message, deviceId, deviceType); + } + } catch (ParseException e) { + log.error("Invalid input " + message, e); + return false; + } + } + + private String processSingleEvent(String msg, String deviceIdFromTopic, String deviceIdJsonPath) + throws ParseException { + JSONParser parser = new JSONParser(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("deviceId", deviceIdFromTopic); + JSONObject eventObject = new JSONObject(); + eventObject.put("payloadData", parser.parse(msg)); + eventObject.put("metaData", jsonObject); + JSONObject event = new JSONObject(); + event.put("event", eventObject); + return event.toJSONString(); + } + + private String processMultipleEvents(String msg, String deviceIdFromTopic, String deviceIdJsonPath) + throws ParseException { + JSONParser jsonParser = new JSONParser(); + JSONArray jsonArray = (JSONArray) jsonParser.parse(msg); + JSONArray eventsArray = new JSONArray(); + for (int i = 0; i < jsonArray.size(); i++) { + eventsArray.add(i, processSingleEvent(jsonArray.get(i).toString(), deviceIdFromTopic, deviceIdJsonPath)); + } + return eventsArray.toJSONString(); + } +} diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java index 3322acb9db..f395178b5a 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java @@ -33,10 +33,10 @@ public class MQTTContentValidator implements ContentValidator { private static final String JSON_ARRAY_START_CHAR = "["; private static final Log log = LogFactory.getLog(MQTTContentValidator.class); private static final String CDMF_MQTT_CONTENT_VALIDATOR = "iot-mqtt"; - public static final String DEVICE_ID_JSON_PATH = "event.metaData.deviceId"; - public static final String DEVICE_TYPE_JSON_PATH = "event.metaData.deviceId"; - public static final String TOPIC = "topic"; - public static final int DEVICE_ID_TOPIC_HIERARCHY_INDEX = 2; + private static final String DEVICE_ID_JSON_PATH = "event.metaData.deviceId"; + private static final String DEVICE_TYPE_JSON_PATH = "event.metaData.deviceId"; + private static final String TOPIC = "topic"; + private static final int DEVICE_ID_TOPIC_HIERARCHY_INDEX = 2; @Override public String getType() { @@ -47,15 +47,14 @@ public class MQTTContentValidator implements ContentValidator { public ContentInfo validate(Object msgPayload, Map dynamicParams) { String topic = (String) dynamicParams.get(TOPIC); String topics[] = topic.split("/"); - String deviceIdJsonPath = DEVICE_ID_JSON_PATH; int deviceIdInTopicHierarchyLevelIndex = DEVICE_ID_TOPIC_HIERARCHY_INDEX; String deviceIdFromTopic = topics[deviceIdInTopicHierarchyLevelIndex]; boolean status; String message = (String) msgPayload; if (message.startsWith(JSON_ARRAY_START_CHAR)) { - status = processMultipleEvents(message, deviceIdFromTopic, deviceIdJsonPath); + status = processMultipleEvents(message, deviceIdFromTopic, DEVICE_ID_JSON_PATH); } else { - status = processSingleEvent(message, deviceIdFromTopic, deviceIdJsonPath); + status = processSingleEvent(message, deviceIdFromTopic, DEVICE_ID_JSON_PATH); } return new ContentInfo(status, msgPayload); } diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java index b2896991fc..7dcda874c5 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.mqtt.notification.listener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.common.pull.notification.NotificationContext; import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationExecutionFailedException; import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; import org.wso2.carbon.event.input.adapter.core.InputEventAdapterSubscription; @@ -48,10 +47,10 @@ public class DeviceTypeOperationAdapterSubscription implements InputEventAdapter try { PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(PrivilegedCarbonContext. getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration().getAdminUserName()); - NotificationContext notificationContext = notificationMessage.getNotificationContext(); - deviceType = notificationContext.getDeviceId().getType(); - MqttNotificationDataHolder.getInstance().getDeviceManagementProviderService() - .executePullNotification(deviceType, notificationContext); + deviceType = notificationMessage.getDeviceIdentifier().getType(); + MqttNotificationDataHolder.getInstance().getDeviceManagementProviderService(). + updatePullNotificationOperation(notificationMessage.getDeviceIdentifier(), + notificationMessage.getOperation()); } catch (UserStoreException e) { log.error("Failed to retrieve tenant username", e); } catch (PullNotificationExecutionFailedException e) { diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java index 3fdb6e7bc1..dfd17e29da 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java @@ -18,16 +18,19 @@ */ package org.wso2.carbon.device.mgt.mqtt.notification.listener; -import org.wso2.carbon.device.mgt.common.pull.notification.NotificationContext; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; public class NotificationMessage { private String tenantDomain; - private NotificationContext notificationContext; + private DeviceIdentifier deviceIdentifier; + private Operation operation; - public NotificationMessage(String tenantDomain, NotificationContext notificationContext) { + public NotificationMessage(String tenantDomain, DeviceIdentifier deviceIdentifier,Operation operation) { this.tenantDomain = tenantDomain; - this.notificationContext = notificationContext; + this.operation = operation; + this.deviceIdentifier = deviceIdentifier; } public String getTenantDomain() { @@ -38,12 +41,20 @@ public class NotificationMessage { this.tenantDomain = tenantDomain; } - public NotificationContext getNotificationContext() { - return notificationContext; + public Operation getOperation() { + return operation; } public void setNotificationContext( - NotificationContext notificationContext) { - this.notificationContext = notificationContext; + Operation operation) { + this.operation = operation; + } + + public DeviceIdentifier getDeviceIdentifier() { + return deviceIdentifier; + } + + public void setDeviceIdentifier(DeviceIdentifier deviceIdentifier) { + this.deviceIdentifier = deviceIdentifier; } } diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java index 18b9a331b0..1f5a2417f6 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java @@ -19,11 +19,9 @@ package org.wso2.carbon.device.mgt.mqtt.notification.listener; import com.google.gson.Gson; -import com.google.gson.JsonSyntaxException; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; -import org.wso2.carbon.device.mgt.common.pull.notification.NotificationContext; -import org.wso2.carbon.device.mgt.common.pull.notification.NotificationPayload; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer; import java.util.Map; @@ -50,10 +48,8 @@ public class PullNotificationMqttContentTransformer implements ContentTransforme String deviceId = topicParams[2]; Gson gson = new Gson(); try { - NotificationPayload notificationPayload = gson.fromJson((String) message, NotificationPayload.class); - NotificationContext notificationContext = new NotificationContext - (new DeviceIdentifier(deviceId, deviceType), notificationPayload); - return new NotificationMessage(tenantDomain, notificationContext); + Operation operation = gson.fromJson((String) message, Operation.class); + return new NotificationMessage(tenantDomain, new DeviceIdentifier(deviceId, deviceType),operation); } catch (Exception e) { //Avoid notification listener to fail. return new Object(); diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index ccfcaef415..3e8c65d6b6 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -12,7 +12,7 @@ org.wso2.carbon.device.mgt.notification.listener.feature pom - 3.0.37-SNAPSHOT + 3.0.38-SNAPSHOT WSO2 Carbon - Notification Listener http://wso2.org This feature contains the core bundles required iot core listeners diff --git a/pom.xml b/pom.xml index e0f052795b..ad77c31462 100644 --- a/pom.xml +++ b/pom.xml @@ -1157,7 +1157,7 @@ 1.1.1 - 2.0.69-SNAPSHOT + 2.0.71-SNAPSHOT [2.0.0, 3.0.0) From 796de7456fa8e4d155c2f583c791e6a966130e61 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sun, 4 Jun 2017 06:52:51 +0530 Subject: [PATCH 05/64] Few changes after testing mqtt and http flow --- .../extension/internal/InputAdapterServiceComponent.java | 8 +++++--- .../extension/transformer/MQTTContentTransformer.java | 2 +- .../adapter/extension/validator/MQTTContentValidator.java | 2 +- .../mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java | 2 +- .../mgt/input/adapter/mqtt/util/MQTTAdapterListener.java | 4 ++-- .../mqtt/util/MQTTBrokerConnectionConfiguration.java | 8 ++++++++ .../adapter/mqtt/util/MQTTEventAdapterConstants.java | 1 + .../listener/PullNotificationMqttContentTransformer.java | 4 +--- .../PullNotificationListenerServiceComponent.java | 2 +- .../listener/util/MqttNotificationListener.java | 3 +++ 10 files changed, 24 insertions(+), 12 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/internal/InputAdapterServiceComponent.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/internal/InputAdapterServiceComponent.java index b7370fa3aa..ee41c354dc 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/internal/InputAdapterServiceComponent.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/internal/InputAdapterServiceComponent.java @@ -25,19 +25,20 @@ import org.wso2.carbon.device.mgt.input.adapter.extension.ContentValidator; import org.wso2.carbon.device.mgt.input.adapter.extension.InputAdapterExtensionService; import org.wso2.carbon.device.mgt.input.adapter.extension.InputAdapterExtensionServiceImpl; import org.wso2.carbon.device.mgt.input.adapter.extension.transformer.DefaultContentTransformer; +import org.wso2.carbon.device.mgt.input.adapter.extension.transformer.MQTTContentTransformer; import org.wso2.carbon.device.mgt.input.adapter.extension.validator.DefaultContentValidator; import org.wso2.carbon.device.mgt.input.adapter.extension.validator.HTTPContentValidator; import org.wso2.carbon.device.mgt.input.adapter.extension.validator.MQTTContentValidator; /** * @scr.component name="input.adapter.extension.adapterService.component" immediate="true" - * @scr.reference name="InputAdapterServiceComponent.service" + * @scr.reference name="InputAdapterServiceComponent.content.validator.service" * interface="org.wso2.carbon.device.mgt.input.adapter.extension.ContentValidator" * cardinality="0..n" * policy="dynamic" * bind="setContentValidator" * unbind="unsetContentValidator" - * * @scr.reference name="InputAdapterServiceComponent.service" + * @scr.reference name="InputAdapterServiceComponent.transformer.service" * interface="org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer" * cardinality="0..n" * policy="dynamic" @@ -56,6 +57,7 @@ public class InputAdapterServiceComponent { } InputAdapterServiceDataHolder.getInstance().addContentTransformer(new DefaultContentTransformer()); + InputAdapterServiceDataHolder.getInstance().addContentTransformer(new MQTTContentTransformer()); InputAdapterServiceDataHolder.getInstance().addContentValidator(new DefaultContentValidator()); InputAdapterServiceDataHolder.getInstance().addContentValidator(new HTTPContentValidator()); InputAdapterServiceDataHolder.getInstance().addContentValidator(new MQTTContentValidator()); @@ -87,7 +89,7 @@ public class InputAdapterServiceComponent { InputAdapterServiceDataHolder.getInstance().addContentTransformer(contentTransformer); } - protected void unsetContentValidator(ContentTransformer contentTransformer) { + protected void unsetContentTransformer(ContentTransformer contentTransformer) { if (log.isDebugEnabled()) { log.debug("Un-setting ContentTransformer Service"); } diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java index e3a89d0180..fba9340096 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/transformer/MQTTContentTransformer.java @@ -33,7 +33,7 @@ import java.util.Map; * This holds the default implementation of ContentTransformer */ public class MQTTContentTransformer implements ContentTransformer { - private static final String MQTT_CONTENT_TRANSFORMER = "iot-mqtt"; + private static final String MQTT_CONTENT_TRANSFORMER = "device-meta-transformer"; private static final String TOPIC = "topic"; private static String JSON_ARRAY_START_CHAR = "["; diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java index f395178b5a..20261ab6d9 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/input/adapter/extension/validator/MQTTContentValidator.java @@ -32,7 +32,7 @@ import java.util.Map; public class MQTTContentValidator implements ContentValidator { private static final String JSON_ARRAY_START_CHAR = "["; private static final Log log = LogFactory.getLog(MQTTContentValidator.class); - private static final String CDMF_MQTT_CONTENT_VALIDATOR = "iot-mqtt"; + private static final String CDMF_MQTT_CONTENT_VALIDATOR = "deviceid-topic-content-validator"; private static final String DEVICE_ID_JSON_PATH = "event.metaData.deviceId"; private static final String DEVICE_TYPE_JSON_PATH = "event.metaData.deviceId"; private static final String TOPIC = "topic"; diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java index f5f93b17a7..54f0ec364b 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java @@ -114,7 +114,7 @@ public class MQTTEventAdapterFactory extends InputEventAdapterFactory { contentTransformer.setRequired(false); contentTransformer.setHint( resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_TRANSFORMER_TYPE_HINT)); - contentTransformer.setDefaultValue(MQTTEventAdapterConstants.DEFAULT); + contentTransformer.setDefaultValue(MQTTEventAdapterConstants.EMPTY); propertyList.add(contentTransformer); // set clientId diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java index 4d83480569..968faa4311 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -271,8 +271,8 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { ContentInfo contentInfo; Map dynamicProperties = new HashMap<>(); dynamicProperties.put(MQTTEventAdapterConstants.TOPIC, topic); - msgText = (String) contentTransformer.transform(msgText, dynamicProperties); - contentInfo = contentValidator.validate(msgText, dynamicProperties); + Object transformedMessage = contentTransformer.transform(msgText, dynamicProperties); + contentInfo = contentValidator.validate(transformedMessage, dynamicProperties); if (contentInfo != null && contentInfo.isValidContent()) { inputEventAdapterListener.onEvent(contentInfo.getMessage()); } diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java index 32669bd965..b32e7d6d93 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java @@ -106,9 +106,17 @@ public class MQTTBrokerConnectionConfiguration { this.dcrUrl = PropertyUtils .replaceMqttProperty(globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_DCR_URL)); this.contentValidatorType = globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE); + String contentValidatorTypeLocal = eventAdapterConfiguration.getProperties() + .get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE); if (contentValidatorType == null || contentValidatorType.isEmpty()) { this.contentValidatorType = eventAdapterConfiguration.getProperties() .get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE); + } else if (contentValidatorTypeLocal != null && !contentValidatorTypeLocal.equals(MQTTEventAdapterConstants.EMPTY)) { + this.contentValidatorType = eventAdapterConfiguration.getProperties() + .get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE); + } + if (this.contentValidatorType.equals(MQTTEventAdapterConstants.EMPTY)) { + this.contentValidatorType = MQTTEventAdapterConstants.DEFAULT; } String cleanSession = globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION); if (cleanSession == null || cleanSession.isEmpty()) { diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java index 0a0b09e2a7..7c80d8a1d3 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java @@ -61,6 +61,7 @@ public class MQTTEventAdapterConstants { public static final String CLIENT_SECRET = "clientSecret"; public static final String CLIENT_NAME = "client_name"; public static final String DEFAULT = "default"; + public static final String EMPTY = ""; public static final String MQTT_CONTENT_VALIDATION_DEFAULT_PARAMETERS = ""; public static final String TOPIC = "topic"; public static final String PAYLOAD = "payload"; diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java index 1f5a2417f6..476b4eba0c 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java @@ -32,7 +32,7 @@ import java.util.Map; */ public class PullNotificationMqttContentTransformer implements ContentTransformer { - public static final String MQTT_NOTIFICATION_MESSAGE_TRANSFORMER = "mqtt-notification-transformer"; + public static final String MQTT_NOTIFICATION_MESSAGE_TRANSFORMER = "mqtt-operation-transformer"; @Override public String getType() { @@ -53,8 +53,6 @@ public class PullNotificationMqttContentTransformer implements ContentTransforme } catch (Exception e) { //Avoid notification listener to fail. return new Object(); - } finally { - PrivilegedCarbonContext.endTenantFlow(); } } diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java index df15fe2cf2..7e94759154 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java @@ -60,7 +60,7 @@ public class PullNotificationListenerServiceComponent { BundleContext bundleContext = componentContext.getBundleContext(); bundleContext.registerService(ServerStartupObserver.class.getName(), new PullNotificationStartupListener(), null); - bundleContext.registerService(ContentTransformer.class.getName(), new PullNotificationMqttContentTransformer(), null); + bundleContext.registerService(ContentTransformer.class, new PullNotificationMqttContentTransformer(), null); } catch (Throwable e) { log.error("Error occurred while initializing pull notification provider implementation bundle", e); } diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java index 3f0c4048f5..08800272d6 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java @@ -43,6 +43,8 @@ public class MqttNotificationListener { private static final String JSON = "json"; private static final String NAME = "iot_core_server_adapter"; private static final String CONTENT_TRANSFORMER_TYPE = "contentTransformer"; + private static final String MQTT_CONTENT_VALIDATOR_TYPE = "contentValidator"; + private static final String MQTT_CONTENT_VALIDATOR = "default"; public static void setupMqttInputAdapter() { @@ -54,6 +56,7 @@ public class MqttNotificationListener { mqttAdapterProperties.put(TOPIC, SUBSCRIBED_TOPIC); mqttAdapterProperties.put(CONTENT_TRANSFORMER_TYPE, PullNotificationMqttContentTransformer.MQTT_NOTIFICATION_MESSAGE_TRANSFORMER); + mqttAdapterProperties.put(MQTT_CONTENT_VALIDATOR_TYPE, MQTT_CONTENT_VALIDATOR); inputEventAdapterConfiguration.setProperties(mqttAdapterProperties); try { PrivilegedCarbonContext.startTenantFlow(); From 6b8682f2d889fb4bbfb6a44a73fdf59646f43619 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sun, 4 Jun 2017 18:18:20 +0530 Subject: [PATCH 06/64] few fixes after testing --- .../mgt/input/adapter/mqtt/MQTTEventAdapter.java | 12 ++++++++---- .../pom.xml | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java index 76239163bb..21381e722b 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java @@ -84,8 +84,10 @@ public class MQTTEventAdapter implements InputEventAdapter { .equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) { return; } - if (!mqttAdapterListener.isConnectionInitialized()) { - mqttAdapterListener.createConnection(); + synchronized (this.mqttAdapterListener) { + if (!mqttAdapterListener.isConnectionInitialized()) { + mqttAdapterListener.createConnection(); + } } } @@ -102,8 +104,10 @@ public class MQTTEventAdapter implements InputEventAdapter { if (ServerStatus.getCurrentStatus().equals(ServerStatus.STATUS_SHUTTING_DOWN)) { Thread thread = new Thread(new Runnable() { public void run() { - if (mqttAdapterListener != null) { - mqttAdapterListener.stopListener(eventAdapterConfiguration.getName()); + synchronized (mqttAdapterListener) { + if (mqttAdapterListener != null) { + mqttAdapterListener.stopListener(eventAdapterConfiguration.getName()); + } } } }); diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml index 3334bfafee..bcd8f8bdb7 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -99,7 +99,8 @@ org.wso2.carbon.user.api, org.wso2.carbon.core, org.wso2.carbon.device.mgt.core.config, - org.wso2.carbon.device.mgt.core.config.pull.notification + org.wso2.carbon.device.mgt.core.config.pull.notification, + org.wso2.carbon.utils.multitenancy From bef24e75d167aedbf155e26acb16ebfbdb595342 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 6 Jun 2017 11:01:04 +0530 Subject: [PATCH 07/64] fixed few issues after testing --- .../listener/DeviceTypeOperationAdapterSubscription.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java index 7dcda874c5..f59d96415e 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java @@ -49,8 +49,8 @@ public class DeviceTypeOperationAdapterSubscription implements InputEventAdapter getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration().getAdminUserName()); deviceType = notificationMessage.getDeviceIdentifier().getType(); MqttNotificationDataHolder.getInstance().getDeviceManagementProviderService(). - updatePullNotificationOperation(notificationMessage.getDeviceIdentifier(), - notificationMessage.getOperation()); + notifyPullNotificationSubscriber(notificationMessage.getDeviceIdentifier(), + notificationMessage.getOperation()); } catch (UserStoreException e) { log.error("Failed to retrieve tenant username", e); } catch (PullNotificationExecutionFailedException e) { From b96ba00d6cd69f3de12afa36465371469f308870 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 8 Jun 2017 14:45:46 +0530 Subject: [PATCH 08/64] updated pom version --- .../org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml | 2 +- .../pom.xml | 2 +- components/extensions/pull-notification-listeners/pom.xml | 2 +- .../pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml index 85935dbf80..7c26ab25f3 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 3.0.39-SNAPSHOT + 3.0.41-SNAPSHOT ../../pom.xml diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml index bcd8f8bdb7..00f353bd6c 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins pull-notification-listeners - 3.0.39-SNAPSHOT + 3.0.41-SNAPSHOT ../pom.xml diff --git a/components/extensions/pull-notification-listeners/pom.xml b/components/extensions/pull-notification-listeners/pom.xml index b8c8bb1589..9e8ef0429f 100644 --- a/components/extensions/pull-notification-listeners/pom.xml +++ b/components/extensions/pull-notification-listeners/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 3.0.39-SNAPSHOT + 3.0.41-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index 1ea456b52c..bbd0150f4b 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -5,14 +5,14 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 3.0.39-SNAPSHOT + 3.0.41-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.notification.listener.feature pom - 3.0.39-SNAPSHOT + 3.0.41-SNAPSHOT WSO2 Carbon - Notification Listener http://wso2.org This feature contains the core bundles required iot core listeners From b02bb795612689ca1ee9a304bf9d0ae4b9fd00d7 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Mon, 12 Jun 2017 11:40:24 +0530 Subject: [PATCH 09/64] removed unused files --- .../pom.xml | 7 --- .../src/main/resources/p2.inf | 3 +- .../main/resources/websocket-validation.xml | 50 ------------------- pom.xml | 2 +- 4 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/websocket-validation.xml diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml index 0ba2b296db..25cdd06817 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml @@ -52,10 +52,6 @@ org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.input.adapter.extension - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.input.adapter.http - org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.input.adapter.mqtt @@ -176,9 +172,6 @@ org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.input.adapter.extension:${carbon.devicemgt.plugins.version} - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.input.adapter.http:${carbon.devicemgt.plugins.version} - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.input.adapter.mqtt:${carbon.devicemgt.plugins.version} diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/p2.inf b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/p2.inf index f9b3d0c5b3..e47305adad 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/p2.inf +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/p2.inf @@ -1,4 +1,3 @@ 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.adapter_${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.adapter_${feature.version}/websocket-validation.xml,target:${installFolder}/../../conf/etc/websocket-validation.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.adapter_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ \ No newline at end of file diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/websocket-validation.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/websocket-validation.xml deleted file mode 100644 index b8c789dc7d..0000000000 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/src/main/resources/websocket-validation.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - https://localhost:9443/services/OAuth2TokenValidationService - admin - admin - 2 - 100 - - - - - - - - /permission/device-mgt/user/groups/device_monitor - admin - admin - https://localhost:9443/oauth2 - - 100 - https://localhost:9443 - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 29f8d7a612..6f8ce060ec 100644 --- a/pom.xml +++ b/pom.xml @@ -1157,7 +1157,7 @@ 1.1.1 - 2.0.72-SNAPSHOT + 2.0.74-SNAPSHOT [2.0.0, 3.0.0) From e36fcfad374637f00316f74c3a02f237c9cf22bb Mon Sep 17 00:00:00 2001 From: ayyoob Date: Wed, 14 Jun 2017 13:23:24 +0530 Subject: [PATCH 10/64] updated version --- .../org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml | 2 +- .../pom.xml | 2 +- components/extensions/pull-notification-listeners/pom.xml | 2 +- .../pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml index b9eabf3e8f..1442eea712 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 3.0.42-SNAPSHOT + 3.0.43-SNAPSHOT ../../pom.xml diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml index 7f1ba61422..f74b2e2b4c 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins pull-notification-listeners - 3.0.42-SNAPSHOT + 3.0.43-SNAPSHOT ../pom.xml diff --git a/components/extensions/pull-notification-listeners/pom.xml b/components/extensions/pull-notification-listeners/pom.xml index e50121c2a1..5476543c2e 100644 --- a/components/extensions/pull-notification-listeners/pom.xml +++ b/components/extensions/pull-notification-listeners/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 3.0.42-SNAPSHOT + 3.0.43-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index c48bf5113b..8545668232 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -5,14 +5,14 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 3.0.42-SNAPSHOT + 3.0.43-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.notification.listener.feature pom - 3.0.42-SNAPSHOT + 3.0.43-SNAPSHOT WSO2 Carbon - Notification Listener http://wso2.org This feature contains the core bundles required iot core listeners From b14ddd609a86df9dbb1289fcc99f1763d0096b4f Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 17 Jun 2017 18:54:39 +0530 Subject: [PATCH 11/64] fixing few issues after testing --- .../device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java | 2 +- .../mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java | 2 +- .../mgt/mqtt/authorization/client/OAuthRequestInterceptor.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java index b3351234f6..bc07e8621d 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java @@ -84,7 +84,7 @@ public class MQTTEventAdapterFactory extends OutputEventAdapterFactory { clearSession.setDisplayName(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION)); clearSession.setRequired(false); clearSession.setOptions(new String[]{"true", "false"}); - clearSession.setDefaultValue("true"); + clearSession.setDefaultValue("false"); clearSession.setHint(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION_HINT)); // set Quality of Service diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java index 9d4e609d8d..7859a673f9 100644 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java @@ -133,7 +133,7 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer { return false; } catch (FeignException e) { oAuthRequestInterceptor.resetApiApplicationKey(); - if (e.getMessage().contains(GATEWAY_ERROR_CODE)) { + if (e.getMessage().contains(GATEWAY_ERROR_CODE) || e.status() == 404) { log.error("Failed to connect to the device authorization service."); } else { log.error(e.getMessage(), e); diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java index d2917f59e8..4c098deb0c 100755 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java @@ -125,6 +125,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor { public void resetApiApplicationKey() { apiApplicationKey = null; + tokenIssuerService = null; } private static Client getSSLClient() { From 0a0448ab97c9eade2fc72683d2e967227a9bfc32 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 16:58:37 +0530 Subject: [PATCH 12/64] Android Emulator client --- .../pom.xml | 0 .../pom.xml | 57 ++ .../Constants.java | 39 + .../org.carbon.android.emulator/TryIt.java | 858 ++++++++++++++++++ .../TryItEmulator.java | 75 ++ .../src/assembly/src.xml | 5 +- .../main/resources/android-tryit/README.md | 6 +- .../src/main/resources/android-tryit/start | 244 ----- .../resources/android-tryit/startEmulator.bat | 18 + .../resources/android-tryit/startEmulator.sh | 24 + 10 files changed, 1077 insertions(+), 249 deletions(-) delete mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java delete mode 100755 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/start create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml new file mode 100644 index 0000000000..31e87f5cb8 --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -0,0 +1,57 @@ + + + + + + android-plugin + org.wso2.carbon.devicemgt-plugins + 4.0.2-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.mobile.android.emulator + AndroidTryIt Emulator + Android Virtual Device + + + EmulatorJava + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + true + lib/ + org.carbon.android.emulator.TryIt + + + ../org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit + + + + + + diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java new file mode 100644 index 0000000000..c3ccaabb9e --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java @@ -0,0 +1,39 @@ +/* +* Copyright (c) 2017, 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.carbon.android.emulator; + +/** + * This class has the constant strings used and the system properties. + */ +class Constants { + static final String OS_NAME_PROPERTY = "os.name"; + static final String USER_HOME_PROPERTY = "user.home"; + static final String USER_DIRECTORY_PROPERTY = "user.dir"; + static final String MAC_OS = "macosx"; + static final String WINDOWS_OS = "windows"; + static final String WINDOWS_EXTENSION_EXE = ".exe"; + static final String WINDOWS_EXTENSION_BAT = ".bat"; + static final String NAME = "name="; + static final String SDK_TOOLS_URL = "sdk_tools_url"; + static final String PLATFORM_TOOLS_URL = "platform_tools_url"; + static final String BUILD_TOOL_URL = "build_tools_url"; + static final String PLATFORM_URL = "platform_url"; + static final String SYSTEM_IMAGE_URL = "sys_img_url"; + static final String HAXM_URL = "haxm_url"; +} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java new file mode 100644 index 0000000000..3dbe0cbbc9 --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -0,0 +1,858 @@ +/* +* Copyright (c) 2017, 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.carbon.android.emulator; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Scanner; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +/** + * This class creates an Android TryIt Emulator to be used as virtual device to connect to WSO2 IOT Cloud + * or Product-iot. + */ +public class TryIt { + private String osSuffix; + private String androidSdkHome; + private String userHome; + private String workingDirectory; + private File sdkLocationFile; // file in which SDK location is written + private String adbLocation; // location of executable file abd + private String emulatorLocation; // location of executable file emulator + + /** + * This method gets the system specific variables. + */ + private TryIt() { + osSuffix = System.getProperty(Constants.OS_NAME_PROPERTY).toLowerCase(); + userHome = System.getProperty(Constants.USER_HOME_PROPERTY); + workingDirectory = System.getProperty(Constants.USER_DIRECTORY_PROPERTY); + + if (osSuffix.contains(Constants.WINDOWS_OS)) { + osSuffix = Constants.WINDOWS_OS; + } + if (osSuffix.contains("mac")) { + osSuffix = Constants.MAC_OS; + } + System.out.println("Detected OS " + osSuffix); + } + + /** + * This method creates an android virtual device. + * + * @param args commandline arguments. + */ + public static void main(String[] args) { + + TryIt tryIt = new TryIt(); + tryIt.setAndroidSDK(); + tryIt.checkBuildTools(); + + try { + tryIt.startAVD(); + } catch (IOException e) { + tryIt.handleException("Unable to start AVD", e); + } + + try { + tryIt.checkEmulatorBoot(); + } catch (IOException e) { + tryIt.handleException("Emulator boot process failure", e); + } + + String[] agents = new String[2]; + + try { + agents = tryIt.checkForAgent(); + } catch (IOException ignored) { + // can continue installing agent again + } + System.out.println("Starting Agent ..."); + try { + tryIt.startPackage(agents); + } catch (IOException e) { + tryIt.handleException("Unable to start WSO2 package", e); + } + Process startShell = null; + ProcessBuilder startShellProcessBuilder = new ProcessBuilder(tryIt.adbLocation, "shell"); + try { + startShellProcessBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); + startShellProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); + startShell = startShellProcessBuilder.start(); + } catch (IOException ignored) { + //can continue + } + System.out.println("Connected to device shell"); + try { + if (startShell != null) { + startShell.waitFor(); + } + } catch (InterruptedException ignored) { + // Interrupted if AVD is closed only. + } + System.out.println("Good Bye!"); + } + + /** + * This method downloads the files. + * + * @param path - the URL to download from. + * @param folderName - the folder location to download the files to. + */ + private void downloadArtifacts(String path, String folderName) { + ReadableByteChannel rbc = null; + FileOutputStream fos = null; + URL url = null; + + try { + url = new URL(path); + } catch (MalformedURLException e) { + handleException("Downloading " + folderName + " failed.", e); + } + + try { + if (url != null) { + rbc = Channels.newChannel(url.openStream()); + } + fos = new FileOutputStream(folderName); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + } catch (IOException e) { + if (!new File(folderName).delete()) { + System.out.println("Delete " + folderName + " and try again"); + } + handleException("Downloading " + folderName + " failed.", e); + } finally { + try { + if (fos != null) { + fos.close(); + } + if (rbc != null) { + rbc.close(); + } + } catch (IOException ignored) { + // File close exception ignored + } + } + } + + + /** + * This method validates the Android SDK location provided by the user and write it to the file + * sdkLocationFile. + */ + private void setSDKPath() { + System.out.println("Please provide android SDK location"); + String response = new Scanner(System.in, "UTF-8").next(); + String emulatorLocationPath = response + File.separator + "tools" + File.separator + "emulator"; + + if (osSuffix.equals(Constants.WINDOWS_OS)) { // windows emulator location ends with .bat + emulatorLocationPath += Constants.WINDOWS_EXTENSION_BAT; + } + + if (new File(emulatorLocationPath).exists()) { + Writer writer = null; + try { + writer = new OutputStreamWriter(new FileOutputStream(sdkLocationFile), StandardCharsets.UTF_8); + } catch (FileNotFoundException e) { + System.out.println("Unable to write the sdkLocation to file "); + } + try { + if (writer != null) { + writer.write(response); + } + } catch (IOException e) { + androidSdkHome = response; + System.out.println("Unable to write the sdkLocation to file "); + e.printStackTrace(); + } finally { + try { + if (writer != null) { + writer.close(); + } + } catch (IOException ignored) { + // writer close + } + } + } else { + System.out.println("Invalid SDK location"); + setSDKPath(); + } + } + + + /** + * This method creates a folder named android-sdk and downloads the minimum tools for SDK + * and write the sdk-location to the file sdkLocationFile. + */ + private void getAndroidSDK() { + String androidSdkFolderName = "android-sdk"; + + //noinspection ResultOfMethodCallIgnored + new File(workingDirectory + File.separator + androidSdkFolderName).mkdir(); + + androidSdkHome = workingDirectory + File.separator + androidSdkFolderName; + + getTools(System.getProperty(Constants.SDK_TOOLS_URL), "_Android-sdk-tools.zip"); + + getTools(System.getProperty(Constants.PLATFORM_TOOLS_URL), "_Android-platform-tools.zip"); + + Writer writer = null; + try { + writer = new OutputStreamWriter(new FileOutputStream(sdkLocationFile), StandardCharsets.UTF_8); + } catch (FileNotFoundException e) { + System.out.println("Unable to write the sdkLocation to file "); + } + try { + if (writer != null) { + writer.write(androidSdkHome); + } + } catch (IOException e) { + System.out.println("Unable to write the sdkLocation to file "); + e.printStackTrace(); + } finally { + try { + if (writer != null) { + writer.close(); + } + } catch (IOException ignored) { + // writes close + } + } + } + + /** + * This method downloads and extracts the tools. + * + * @param url - the URL to download from. + * @param folderName - the folder name where to download. + */ + private void getTools(String url, String folderName) { + System.out.println("Downloading " + folderName); + downloadArtifacts(url, androidSdkHome + File.separator + folderName); + System.out.println("Configuring " + folderName); + extractFolder(androidSdkHome + File.separator + folderName); + } + + /** + * This method starts the AVD specified by the user. + * + * @throws IOException process throws if an I/O error occurs. + */ + private void startAVD() throws IOException { + String wso2AvdLocation = userHome + File.separator + ".android" + File.separator + "avd" + File.separator + + "WSO2_AVD.avd"; + + checkForPlatform(); + checkForSystemImages(); + + if (!new File(wso2AvdLocation).isDirectory()) { + Scanner read = new Scanner(System.in, "UTF-8"); + System.out.println("Do you want to create WSO2_AVD with default configs (Y/n)?: "); + if (read.next().toLowerCase().matches("y")) { + createAVD(); + return; + } + } + + System.out.println("+----------------------------------------------------------------+"); + System.out.println("| WSO2 Android TryIt |"); + System.out.println("+----------------------------------------------------------------+"); + + emulatorLocation = androidSdkHome + File.separator + "tools" + File.separator + "emulator"; + + if (osSuffix.equals(Constants.WINDOWS_OS)) { + emulatorLocation += Constants.WINDOWS_EXTENSION_EXE; + } + setExecutePermission(emulatorLocation); + + ProcessBuilder listAVDsProcessBuilder = new ProcessBuilder(emulatorLocation, "-list-avds"); + Process listAVDsProcess = listAVDsProcessBuilder.start(); + + ArrayList devices = new ArrayList<>(); + BufferedReader reader = null; + try { + reader = new BufferedReader(new InputStreamReader(listAVDsProcess.getInputStream() + , StandardCharsets.UTF_8)); + String readLine; + while ((readLine = reader.readLine()) != null) { + devices.add(readLine); + } + } finally { + if (reader != null) { + reader.close(); + } + } + + if (devices.size() == 0) { + System.out.println("No AVDs available in the system "); + startAVD(); + } else if (devices.size() == 1) { + runEmulator(devices.get(0)); + } else { + System.out.println("\nAvailable AVDs in the system\n"); + int count = 1; + for (String device : devices) { + System.out.println(count + " - - " + device); + count++; + } + System.out.print("\nEnter AVD number to start (eg: 1) :"); + Scanner read = new Scanner(System.in, "UTF-8"); + int avdNo = read.nextInt(); + runEmulator(devices.get(--avdNo)); + } + } + + /** + * This method creates WSO2_AVD with the specific configurations. + * + * @throws IOException process throws if an I/O error occurs. + */ + private void createAVD() throws IOException { + String avdManagerPath = androidSdkHome + File.separator + "tools" + File.separator + "bin" + + File.separator + "avdmanager"; + String androidPath = androidSdkHome + File.separator + "tools" + File.separator + "android"; + String configFileLocation = workingDirectory + File.separator + "resources" + File.separator + "config.ini"; + String wso2ConfigFile = userHome + File.separator + ".android" + File.separator + "avd" + File.separator + + "WSO2_AVD.avd" + File.separator + "config.ini"; + + if (osSuffix.equals(Constants.WINDOWS_OS)) { + avdManagerPath += Constants.WINDOWS_EXTENSION_BAT; + } + if (osSuffix.equals(Constants.WINDOWS_OS)) { + androidPath += Constants.WINDOWS_EXTENSION_BAT; + } + setExecutePermission(androidPath); + + System.out.println("Creating a new AVD device"); + + if (new File(avdManagerPath).exists()) { + setExecutePermission(avdManagerPath); + ProcessBuilder createAvdProcessBuilder = new ProcessBuilder(avdManagerPath, "create", "avd", "-k", + "system-images;android-23;default;x86", "-n", "WSO2_AVD"); + + createAvdProcessBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); + createAvdProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); + + Process createAvdProcess = createAvdProcessBuilder.start(); + + try { + createAvdProcess.waitFor(); + } catch (InterruptedException e) { + handleException("Unable to create new AVD", e); + } + } else { + ProcessBuilder createAvd = new ProcessBuilder(androidPath, "create", "avd", "-n", "WSO2_AVD", + "-t", "android-23"); + + createAvd.redirectInput(ProcessBuilder.Redirect.INHERIT); + createAvd.redirectOutput(ProcessBuilder.Redirect.INHERIT); + + Process createAvdProcess = createAvd.start(); + + try { + createAvdProcess.waitFor(); + } catch (InterruptedException e) { + handleException("Unable to create new AVD", e); + } + } + Files.copy(Paths.get(configFileLocation), Paths.get(wso2ConfigFile), StandardCopyOption.REPLACE_EXISTING); + startAVD(); + } + + /** + * This method runs the Android Emulator for the name specified by deviceId. + * + * @param deviceId String name of the device. + * @throws IOException process start throws if an I/O error occurs. + */ + private void runEmulator(String deviceId) throws IOException { + + // mac os and windows needs hardware_Accelerated_execution_Manager + if (osSuffix.equals(Constants.MAC_OS) || osSuffix.equals(Constants.WINDOWS_OS)) { + installHAXM(); + } + System.out.println("Starting : " + deviceId); + startEmulator(deviceId); + checkCacheImg(deviceId); + } + + /** + * This method checks for the availability of android build tools in SDK location to run the AVD. + */ + private void checkBuildTools() { + File buildTools = new File(androidSdkHome + File.separator + "build-tools" + + File.separator + "25.0.2"); + + if (!buildTools.exists()) { + getTools(System.getProperty(Constants.BUILD_TOOL_URL), "_Android-build-tool.zip"); + + File buildTool = new File(androidSdkHome + File.separator + "android-7.1.1"); + + //noinspection ResultOfMethodCallIgnored + new File(androidSdkHome + File.separator + "build-tools").mkdir(); + //noinspection ResultOfMethodCallIgnored + buildTool.renameTo(new File(androidSdkHome + File.separator + "build-tools" + + File.separator + "25.0.2")); + } + } + + /** + * This method halts the system until the emulator is fully booted + * if boot process is not completed successfully, rest of the tasks won't be continued. + * + * @throws IOException process throws if an I/O error occurs. + */ + private void checkEmulatorBoot() throws IOException { + BufferedReader reader; + String readLine; + Boolean sysBootComplete = false; + + do { + ProcessBuilder systemBoot = new ProcessBuilder(adbLocation, "shell", "getprop", + "sys.boot_completed"); + Process systemBootProcess = systemBoot.start(); + try { + systemBootProcess.waitFor(); + } catch (InterruptedException e) { + handleException("System boot process interuppted", e); + } + reader = new BufferedReader(new InputStreamReader(systemBootProcess.getInputStream(), + StandardCharsets.UTF_8)); + while ((readLine = reader.readLine()) != null) { + // if boot process is success the process gives 1 as output + if (readLine.contains("1")) { + sysBootComplete = true; + } + } + System.out.print("."); + try { + Thread.sleep(1000); + } catch (InterruptedException ignored) { + // ignored + } finally { + reader.close(); + } + } while (!sysBootComplete); + System.out.println(); + } + + /** + * This method gets the Android SDK location if available and sets the SDK path else downloads the SDK. + */ + private void setAndroidSDK() { + sdkLocationFile = new File("sdkLocation"); + + if (!(sdkLocationFile.exists() && !sdkLocationFile.isDirectory())) { + Scanner read = new Scanner(System.in, "UTF-8"); + System.out.println("Do you have an Android SDK installed on your computer (y/N)?: "); + String response = read.next().toLowerCase(); + if (response.matches("y")) { + setSDKPath(); + } else { + getAndroidSDK(); + } + } + // writes the Android SDK location to sdkLocationFile file + Scanner scanner = null; + try { + scanner = new Scanner(sdkLocationFile, "UTF-8"); + androidSdkHome = scanner.useDelimiter("\\Z").next(); + } catch (FileNotFoundException ignored) { + System.out.println("sdkLocation file not found"); + // already written to androidSdkHome + } finally { + if (scanner != null) { + scanner.close(); + } + } + + adbLocation = androidSdkHome + File.separator + "platform-tools" + File.separator + "adb"; + if (osSuffix.equals(Constants.WINDOWS_OS)) { + adbLocation += Constants.WINDOWS_EXTENSION_EXE; + } + setExecutePermission(adbLocation); + } + + /** + * this method prints the exception and terminate the program. + * + * @param message -exception method to be printed + * @param ex - exception caught + */ + private void handleException(String message, Exception ex) { + System.out.println(message); + ex.printStackTrace(); + System.exit(0); + } + + /** + * This method check for the android agent in the specified AVD and installs it if not available. + * + * @return package name and act name. + * @throws IOException process throws if an I/O error occurs. + */ + private String[] checkForAgent() throws IOException { + String apkFileLocation = workingDirectory + File.separator + "resources" + File.separator + "android-agent.apk"; + String aaptLocation = androidSdkHome + File.separator + "build-tools" + File.separator + "25.0.2" + + File.separator + "aapt"; + + if (osSuffix.equals(Constants.WINDOWS_OS)) { + aaptLocation += Constants.WINDOWS_EXTENSION_EXE; + } + setExecutePermission(aaptLocation); + + //process to get the name of package and launchable-activity available in android agent apk file + ProcessBuilder badgingApkFileProcessBuilder = new ProcessBuilder(aaptLocation, "d", "badging", + apkFileLocation); + Process badgingApkFileProcess = badgingApkFileProcessBuilder.start(); + + String pkg = null; + String activity = null; + Boolean hasAgent = false; + String readLine; + BufferedReader reader = null; + + try { + reader = new BufferedReader(new InputStreamReader(badgingApkFileProcess.getInputStream(), + StandardCharsets.UTF_8)); + + + while ((readLine = reader.readLine()) != null) { + if (readLine.contains("package")) { + pkg = readLine.substring(readLine.indexOf(Constants.NAME) + 6).substring(0, + readLine.substring(readLine.indexOf(Constants.NAME) + + 6).indexOf("'")); + } + if (readLine.contains("launchable-activity")) { + activity = readLine.substring(readLine.indexOf(Constants.NAME) + 6).substring(0, + readLine.substring(readLine.indexOf(Constants.NAME) + + 6).indexOf("'")); + } + } + } finally { + if (reader != null) { + reader.close(); + } + } + + ProcessBuilder listPackages = new ProcessBuilder(adbLocation, "shell", "pm", "list", "packages"); + Process listPackagesProcess = listPackages.start(); + try { + listPackagesProcess.waitFor(); + } catch (InterruptedException e) { + System.out.println("Unable to read available packages in the current AVD"); + } + + try { + reader = new BufferedReader(new InputStreamReader(listPackagesProcess.getInputStream(), + StandardCharsets.UTF_8)); + + while ((readLine = reader.readLine()) != null) { + if (readLine.contains("package:" + pkg)) { + hasAgent = true; + } + } + } finally { + reader.close(); + } + + + if (!hasAgent) { + installAgent(); + } + return new String[]{pkg, activity}; + } + + /** + * This method installs the Android Agent ( WSO2 iot agent ). + * + * @throws IOException process start throws if an I/O error occurs. + */ + private void installAgent() throws IOException { + String androidAgentLocation = workingDirectory + File.separator + "resources" + File.separator + + "android-agent.apk"; + + System.out.println("Installing agent ..."); + ProcessBuilder installAgentProcessBuilder = new ProcessBuilder(adbLocation, "install", + androidAgentLocation); + Process installAgentProcess = installAgentProcessBuilder.start(); + + try { + installAgentProcess.waitFor(); + } catch (InterruptedException e) { + System.out.println("WSO2 Agent installation failed"); + installAgent(); + } + } + + /** + * This method starts the package (wso2.iot.agent). + * + * @param agents package name and launchable activity name. + * @throws IOException process throws if an I/O error occurs. + */ + private void startPackage(String[] agents) throws IOException { + String pkg = agents[0]; + String activity = agents[1]; + + ProcessBuilder pkgStartProcessBuilder = new ProcessBuilder(adbLocation, "shell", "am", "start", + "-n", pkg + "/" + activity); + Process pkgStartProcess = pkgStartProcessBuilder.start(); + + try { + pkgStartProcess.waitFor(); + } catch (InterruptedException e) { + handleException("Package start process interuptted", e); + } + } + + /** + * This method checks for the availability of Android Platform in SDK and if not available downloads it. + */ + private void checkForPlatform() { + File platform = new File(androidSdkHome + File.separator + "platforms" + File.separator + "android-23"); + + if (!platform.isDirectory()) { + getTools(System.getProperty(Constants.PLATFORM_URL), "_Android-platforms.zip"); + //noinspection ResultOfMethodCallIgnored + new File(androidSdkHome + File.separator + "platforms").mkdir(); + //noinspection ResultOfMethodCallIgnored + new File(androidSdkHome + File.separator + "android-6.0").renameTo(new File(androidSdkHome + + File.separator + "platforms" + File.separator + "android-23")); + } + } + + /** + * This method checks for the system images in the Android SDK and downloads if not available. + */ + private void checkForSystemImages() { + File systemImages = new File(androidSdkHome + File.separator + "system-images" + + File.separator + "android-23" + File.separator + "default"); + + if (!systemImages.isDirectory()) { + getTools(System.getProperty(Constants.SYSTEM_IMAGE_URL), "_sys-images.zip"); + //noinspection ResultOfMethodCallIgnored + new File(androidSdkHome + File.separator + "system-images" + File.separator + + "android-23" + File.separator + "default").mkdirs(); + //noinspection ResultOfMethodCallIgnored + new File(androidSdkHome + File.separator + "x86").renameTo(new File(androidSdkHome + + File.separator + "system-images" + File.separator + "android-23" + File.separator + + "default" + File.separator + "x86")); + } + } + + /** + * This method install Hardware_Accelerated Execution_Manager in mac and windows os. + */ + @SuppressWarnings("ResultOfMethodCallIgnored") + private void installHAXM() { + String haxmLocation = androidSdkHome + File.separator + "extras" + File.separator + "intel" + + File.separator + "Hardware_Accelerated_Execution_Manager"; + + if (!new File(haxmLocation).isDirectory()) { + System.out.println("Downloading intel HAXM..."); + + new File(haxmLocation).mkdirs(); + String folderName = "_haxm.zip"; + + downloadArtifacts(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator + + folderName); + System.out.println("Configuring HAXM..."); + extractFolder(haxmLocation + File.separator + folderName); + + String haxmInstaller = haxmLocation + File.separator + "silent_install"; + + if (osSuffix.equals(Constants.WINDOWS_OS)) { + haxmInstaller += Constants.WINDOWS_EXTENSION_BAT; + } else { + haxmInstaller += ".sh"; + } + setExecutePermission(haxmInstaller); + + ProcessBuilder processBuilder = new ProcessBuilder(haxmInstaller, "-m", "2048", "-log", + workingDirectory + File.separator + "haxmSilentRun.log"); + processBuilder.directory(new File(haxmLocation)); + processBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); + processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); + Process process = null; + try { + process = processBuilder.start(); + } catch (IOException e) { + handleException("HAXM installation failed", e); + } + try { + if (process != null) { + process.waitFor(); + } + } catch (InterruptedException e) { + handleException("HAXM installation failed", e); + } + System.out.println("Please restart your machine and run again."); + System.exit(0); + } + } + + /** + * This method starts the Android emulator for specific device name. + * + * @param deviceId - name of the device to start the emulator. + */ + private void startEmulator(String deviceId) { + String qemuSystemFileLocation = androidSdkHome + File.separator + "tools" + File.separator + + "qemu" + File.separator; + + switch (osSuffix) { + case Constants.MAC_OS: + qemuSystemFileLocation += "darwin" + "-x86_64" + File.separator + "qemu-system-i386"; + break; + case Constants.WINDOWS_OS: + qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386.exe"; + break; + default: + qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386"; + } + setExecutePermission(qemuSystemFileLocation); + ExecutorService service = Executors.newSingleThreadExecutor(); + service.execute(new TryItEmulator(deviceId, emulatorLocation)); + } + + /** + * This method halts the system the cache.img file is created for the particular AVD started. + * + * @param deviceId - name of the AVD. + */ + private void checkCacheImg(String deviceId) { + File cacheImg = new File(userHome + File.separator + ".android" + + File.separator + "avd" + File.separator + deviceId + ".avd" + File.separator + "cache.img"); + + while (!cacheImg.exists()) { + System.out.print("."); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + handleException("Virtual device not loaded properly, process interuptted", e); + } + } + System.out.println(); + } + + /** + * This method sets the executable permission for the specified file, + * if the files are not the executable, the process cannot be continued. + * + * @param fileName name of the file to set execution permission. + */ + private void setExecutePermission(String fileName) { + if (!new File(fileName).canExecute()) { + if (!new File(fileName).setExecutable(true)) { + System.out.println("Set the Execute permission of : " + fileName + " to continue"); + System.exit(0); // if can't execute, unable to proceed + } + } + } + + /** + * This method extracts the zip folder. + * + * @param zipFile -Name of zip to extract + */ + private void extractFolder(String zipFile) { + int BUFFER = 2048; + File file = new File(zipFile); + ZipFile zip; + try { + zip = new ZipFile(file); + String newPath = zipFile.substring(0, zipFile.lastIndexOf(File.separator)); + + //noinspection ResultOfMethodCallIgnored + new File(newPath).mkdirs(); + + Enumeration zipFileEntries = zip.entries(); + + while (zipFileEntries.hasMoreElements()) { + // grab a zip file entry + ZipEntry entry = (ZipEntry) zipFileEntries.nextElement(); + String currentEntry = entry.getName(); + File destFile = new File(newPath, currentEntry); + File destinationParent = destFile.getParentFile(); + + if (destinationParent == null) { + destFile.mkdirs(); + continue; + } else { + //noinspection ResultOfMethodCallIgnored + destinationParent.mkdirs(); + } + + if (!entry.isDirectory()) { + BufferedInputStream is; + try { + is = new BufferedInputStream(zip.getInputStream(entry)); + int currentByte; + // establish buffer for writing file + byte data[] = new byte[BUFFER]; + + // write the current file to disk + FileOutputStream fos = new FileOutputStream(destFile); + BufferedOutputStream dest = new BufferedOutputStream(fos, + BUFFER); + + // read and write until last byte is encountered + while ((currentByte = is.read(data, 0, BUFFER)) != -1) { + dest.write(data, 0, currentByte); + } + dest.flush(); + dest.close(); + is.close(); + } catch (IOException e) { + e.printStackTrace(); + System.exit(0); + } + } + } + zip.close(); + } catch (IOException e) { + handleException("Extraction of " + zipFile + " failed", e); + } + if (!new File(zipFile).delete()) { + System.out.println("Downloaded zip : " + zipFile + " - not deleted"); + } + } +} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java new file mode 100644 index 0000000000..28fc0032fc --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2017, 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.carbon.android.emulator; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.nio.charset.StandardCharsets; + +/** + * This class starts the Emulator with the name ID specified and log the output to emulator.log. + */ +public class TryItEmulator implements Runnable { + private String deviceId; // name of the AVD to start + private String emulatorLocation; // location of the executable file emulator + + TryItEmulator(String id, String emulator) { + deviceId = id; + emulatorLocation = emulator; + } + + public void run() { + String readLine; + BufferedReader reader = null; + Writer writer = null; + ProcessBuilder processBuilder = new ProcessBuilder(emulatorLocation, "-avd", deviceId); + try { + Process process = processBuilder.start(); + reader = new BufferedReader(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8)); + writer = new OutputStreamWriter(new FileOutputStream(new File("emulator.log")), StandardCharsets.UTF_8); + while ((readLine = reader.readLine()) != null) { + writer.append(readLine); + writer.append(readLine); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException ignored) { + // reader close exception ignored + } + } + if (writer != null) { + try { + writer.close(); + } catch (IOException ignored) { + // writer close exception ignored + } + } + + } + } +} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml index 579924f818..32ddb83e1c 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml @@ -43,13 +43,14 @@ true + ${basedir}/target/android-tryit.ZIP - /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ + /devicemgt/app/units/itcdmf.unit.device.type.android.type-view/public/assets/ 755 - \ No newline at end of file + diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md index e9c1f11234..51b790fb93 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md @@ -1,12 +1,12 @@ Prerequisites =============== -1. You should have curl in your computer. -2. Java 7 or higher. +1. Java 8. Instructions ================= -1. Run 'start' script in your terminal. +1. Run 'startEmulator' script in your terminal. + For windows run startEmulator.bat 2. If you already have android sdk in your computer, please provide location of the sdk. Otherwise this tool will download and install minimum SDK components which needs to run the emulator. This is a one time process. diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/start b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/start deleted file mode 100755 index 86f26699e7..0000000000 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/start +++ /dev/null @@ -1,244 +0,0 @@ -#!/bin/bash - -#Make sure we have got everything we need -command -v curl >/dev/null || { echo "curl is not installed. Aborting." >&2; exit 1; } -command -v unzip >/dev/null || { echo "unzip is not installed. Aborting." >&2; exit 1; } - -SCRIPT_HOME=$PWD - -OS_SUFFIX="linux" -if [[ "$OSTYPE" == "darwin"* ]]; then - OS_SUFFIX="macosx" -fi - -downloadArtifacts() { - curl -D headers -O $1 - httpStatus=$(head -1 headers | awk '{print $2}') - [ "$httpStatus" != "200" ] && { echo "Download failed. Aborting." ; exit 1 ;} - rm headers - echo -} - -setSDKPath () { - echo -n "Please provide Android SDK location (ex: /mnt/tools/android-sdk):" - read answer - emulator="$answer/tools/emulator" - if [ -f "$emulator" ]; then - echo "$answer" > sdklocation - else - echo "Invalid SDK location" - setSDKPath - fi -} - -getAndroidSDK() { - echo - echo "Downloading Android SDK tools..." - mkdir android-sdk - cd android-sdk - - downloadArtifacts "https://dl.google.com/android/repository/tools_r25.2.5-$OS_SUFFIX.zip" - echo -n "Configuring Android SDK tools..." - unzip -q tools_r25.2.5-$OS_SUFFIX.zip - rm tools_r25.2.5-$OS_SUFFIX.zip - echo " Done!" - - echo - echo "Downloading Android platform tools..." - downloadArtifacts "http://dl.google.com/android/repository/platform-tools_r25.0.3-$OS_SUFFIX.zip" - - echo -n "Configuring Android platform tools..." - unzip -q platform-tools_r25.0.3-$OS_SUFFIX.zip - rm platform-tools_r25.0.3-$OS_SUFFIX.zip - cd .. - echo "$PWD/android-sdk" > sdklocation - echo " Done!" -} - -createAVD() { - if [ ! -d "$ANDROID_TRYIT_SDK_HOME/platforms/android-23" ]; then - echo - echo "Downloading Android platform..." - cd $ANDROID_TRYIT_SDK_HOME - downloadArtifacts "https://dl.google.com/android/repository/platform-23_r03.zip" - echo -n "Configuring Android platform..." - unzip -q platform-23_r03.zip - mkdir -p platforms/android-23 - mv android-6.0/* platforms/android-23/ - rm -r android-6.0 - rm platform-23_r03.zip - cd .. - echo " Done!" - fi - if [ ! -d "$ANDROID_TRYIT_SDK_HOME/system-images/android-23/default" ]; then - echo "Downloading Android system image..." - cd $ANDROID_TRYIT_SDK_HOME - downloadArtifacts "https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip" - echo -n "Configuring Android system image..." - unzip -q x86-23_r09.zip - mkdir -p system-images/android-23/default - mv x86 system-images/android-23/default - rm x86-23_r09.zip - cd .. - echo " Done!" - fi - echo "Creating a new AVD device" - if [ -f "$ANDROID_TRYIT_SDK_HOME/tools/bin/avdmanager" ]; then - $ANDROID_TRYIT_SDK_HOME/tools/bin/avdmanager create avd -k 'system-images;android-23;default;x86' -n WSO2_AVD - else - $ANDROID_TRYIT_SDK_HOME/tools/android create avd -n WSO2_AVD -t android-23 - fi - rm $HOME/.android/avd/WSO2_AVD.avd/config.ini - cp $SCRIPT_HOME/resources/config.ini $HOME/.android/avd/WSO2_AVD.avd/ - startAVD -} - -startAVD() { - if [ ! -d "$HOME/.android/avd/WSO2_AVD.avd" ]; then - echo -n "Looks you don't have the WSO2_AVD. Do you want to create WSO2_AVD with default configs (Y/n)?: " - read answer - if ! echo "$answer" | grep -iq "^n" ;then - createAVD - return - fi - fi - echo - echo "------------------------------" - echo "Available AVDs in the system:" - echo "------------------------------" - devices=() - count=0 - if [ ! -f "mypipe" ]; then - mkfifo mypipe - fi - $ANDROID_TRYIT_SDK_HOME/tools/emulator -list-avds > mypipe & - while IFS= read -r line - do - let count++ - echo "$count) $line" - devices+=($line) - done < mypipe - rm mypipe - echo "------------------------------" - echo - if [ $count = 0 ]; then - echo -n "No AVDs found on your system. Do you want to create new AVD (Y/n)?: " - read answer - if echo "$answer" | grep -iq "^n" ;then - exit; - else - createAVD - fi - elif [ $count = 1 ]; then - runEmulator ${devices[0]} - else - echo -n "Enter AVD number to start (eg: 1): " - read answer - let answer-- - runEmulator ${devices[$answer]} - fi -} - -runEmulator(){ - if [ $OS_SUFFIX = "macosx" -a ! -d $ANDROID_TRYIT_SDK_HOME/extras/intel/Hardware_Accelerated_Execution_Manager ]; then - cd $ANDROID_TRYIT_SDK_HOME - echo "Downloading intel HAXM..." - mkdir -p extras/intel/Hardware_Accelerated_Execution_Manager - cd extras/intel/Hardware_Accelerated_Execution_Manager - downloadArtifacts "https://dl.google.com/android/repository/extras/intel/haxm-macosx_r6_0_5.zip" - echo -n "Configuring HAXM..." - unzip -q haxm-macosx_r6_0_5.zip - rm haxm-macosx_r6_0_5.zip - ./"HAXM installation" -m 2048 -log $SCRIPT_HOME/haxm_silent_run.log - echo " Done!" - echo "Please restart your computer and run this script again." - exit - fi - cd $SCRIPT_HOME - $ANDROID_TRYIT_SDK_HOME/platform-tools/adb kill-server - echo "Starting AVD $1" - $ANDROID_TRYIT_SDK_HOME/tools/emulator -avd $1 > emulator.log & - while [ ! -f "$HOME/.android/avd/$1.avd/cache.img" ] - do - sleep 1 - echo -n "." - done - count=0 - while [ $count -lt 5 ] - do - sleep 1 - echo -n "." - let count++ - done - echo -} - -echo "+----------------------------------------------------------------+" -echo "| WSO2 Android Tryit |" -echo "+----------------------------------------------------------------+" -echo "Detected OS: " $OSTYPE -if [ ! -f "sdklocation" ]; then - echo -n "Do you have an Android SDK installed on your computer (y/N)?: " - read answer - if echo "$answer" | grep -iq "^y" ;then - setSDKPath - else - getAndroidSDK - fi -fi -export ANDROID_TRYIT_SDK_HOME=$( mypipe & -while IFS= read -r line -do - if [ $line = "package:$pkg" ]; then - let hasAgent=true - fi -done < mypipe -rm mypipe - -if [ $hasAgent = false ]; then - echo - echo "Installing agent..." - cd $SCRIPT_HOME/resources - $ANDROID_TRYIT_SDK_HOME/platform-tools/adb install android-agent.apk -fi - -echo -echo "Staring agent..." -$ANDROID_TRYIT_SDK_HOME/platform-tools/adb shell am start -n $pkg/$act -echo -echo "Connected to device shell" -$ANDROID_TRYIT_SDK_HOME/platform-tools/adb shell -echo -echo "Good bye!" diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat new file mode 100644 index 0000000000..2cccdcdee6 --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat @@ -0,0 +1,18 @@ +echo Welcome + +SET sdk_tools_url="https://dl.google.com/android/repository/tools_r25.2.5-windows.zip" +SET platform_tools_url="http://dl.google.com/android/repository/platform-tools_r25.0.3-windows.zip" +SET build_tools_url="https://dl.google.com/android/repository/build-tools_r25.0.2-windows.zip" +SET platform_url="https://dl.google.com/android/repository/platform-23_r03.zip" +SET sys_img_url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip" +SET haxm_url="https://dl.google.com/android/repository/extras/intel/haxm-windows_r6_0_5.zip" + +java\ + -Dsdk_tools_url=%sdk_tools_url%\ + -Dplatform_tools_url=%platform_tools_url%\ + -Dbuild_tools_url=%build_tools_url%\ + -Dplatform_url=%platform_url%\ + -Dsys_img_url=%sys_img_url%\ + -Dhaxm_url=%haxm_url%\ + -jar EmulatorJava.jar +echo diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh new file mode 100644 index 0000000000..e8eb396e92 --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh @@ -0,0 +1,24 @@ +#!/bin/bash +echo Welcome + +OS_SUFFIX="linux" +if [[ "$OSTYPE" == "darwin"* ]]; then + OS_SUFFIX="macosx" +fi + +sdk_tools_url="https://dl.google.com/android/repository/tools_r25.2.5-$OS_SUFFIX.zip" +platform_tools_url="http://dl.google.com/android/repository/platform-tools_r25.0.3-$OS_SUFFIX.zip" +build_tools_url="https://dl.google.com/android/repository/build-tools_r25.0.2-$OS_SUFFIX.zip" +platform_url="https://dl.google.com/android/repository/platform-23_r03.zip" +sys_img_url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip" +haxm_url="https://dl.google.com/android/repository/extras/intel/haxm-macosx_r6_0_5.zip" + +java\ + -Dsdk_tools_url=$sdk_tools_url\ + -Dplatform_tools_url=$platform_tools_url\ + -Dbuild_tools_url=$build_tools_url\ + -Dplatform_url=$platform_url\ + -Dsys_img_url=$sys_img_url\ + -Dhaxm_url=$haxm_url\ + -jar EmulatorJava.jar +echo From eee153eee9a6e3c6bc63bf0da0e59c73943b9d36 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 17:00:35 +0530 Subject: [PATCH 13/64] Adding org.wso2.carbon.device.mgt.mobile.android.emulator module --- components/mobile-plugins/android-plugin/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml index 90a1bb15d8..70e139ba49 100644 --- a/components/mobile-plugins/android-plugin/pom.xml +++ b/components/mobile-plugins/android-plugin/pom.xml @@ -36,6 +36,7 @@ org.wso2.carbon.device.mgt.mobile.android org.wso2.carbon.device.mgt.mobile.android.api org.wso2.carbon.device.mgt.mobile.android.ui + org.wso2.carbon.device.mgt.mobile.android.emulator From 424a02fa20ef5e0b63fb6bfa3ecb0e9f6c89c556 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 17:07:04 +0530 Subject: [PATCH 14/64] edits --- .../src/assembly/src.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml index 32ddb83e1c..e8bf7799b5 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml @@ -49,7 +49,7 @@ ${basedir}/target/android-tryit.ZIP - /devicemgt/app/units/itcdmf.unit.device.type.android.type-view/public/assets/ + /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ 755 From 9569b0bba7d224f3d64a25c4f67ddc50c6e99251 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 17:42:51 +0530 Subject: [PATCH 15/64] correction --- .../src/assembly/src.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml index e8bf7799b5..ff67664da0 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml @@ -43,7 +43,6 @@ true - From f70cc79590963cbf28a6863950f06b30b255bb28 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 17:57:57 +0530 Subject: [PATCH 16/64] correction --- .../src/assembly/src.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml index ff67664da0..d2b65b091e 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml @@ -48,7 +48,8 @@ ${basedir}/target/android-tryit.ZIP - /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ + /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ + 755 From 603ec856a689721240cbced4c64e92f6d59a2a52 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 17:59:47 +0530 Subject: [PATCH 17/64] type corrections --- .../src/assembly/src.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml index d2b65b091e..ff67664da0 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml @@ -48,8 +48,7 @@ ${basedir}/target/android-tryit.ZIP - /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ - + /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ 755 From 5e7a0c73ec4323514ffe61265e4a400e48a383ba Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 18:04:57 +0530 Subject: [PATCH 18/64] Edits in README --- .../src/main/resources/android-tryit/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md index 51b790fb93..a1ca1df992 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md @@ -5,7 +5,7 @@ Prerequisites Instructions ================= -1. Run 'startEmulator' script in your terminal. +1. Run 'startEmulator.sh' script in your terminal from the current directory. For windows run startEmulator.bat 2. If you already have android sdk in your computer, please provide location of the sdk. Otherwise this tool will download and install minimum SDK components which needs to run the emulator. @@ -17,5 +17,5 @@ Instructions Troubleshooting ================== -1. If your exisitng SDK doen't work or giving any errors, delete 'sdklocation' file and try agin without selecting the existing SDK path. +1. If your existing SDK does not work or giving any errors, delete 'sdkLocation' file and try again without selecting the existing SDK path. 2. If your emulator does not start correctly, please remove all files and directories in $HOME/.android/avd/ directory. Then try again with a new emulator. From 1e10d3180175a43431085cb8ec245b740e949cb0 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 18:14:41 +0530 Subject: [PATCH 19/64] README changes --- .../src/main/resources/android-tryit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md index a1ca1df992..e14a8186d9 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md @@ -1,6 +1,6 @@ Prerequisites =============== -1. Java 8. +1. Java 7 or higher. Instructions ================= From 7c5c0de4ee4f004260623aac28ea99273a0bdf32 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 18:19:24 +0530 Subject: [PATCH 20/64] README changes --- .../src/main/resources/android-tryit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md index e14a8186d9..a1ca1df992 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md @@ -1,6 +1,6 @@ Prerequisites =============== -1. Java 7 or higher. +1. Java 8. Instructions ================= From b1e86877518ed6bfa0c4bd19f733c48abc6dc304 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Mon, 19 Jun 2017 22:30:39 +0530 Subject: [PATCH 21/64] Code clean up --- .../main/java/org.carbon.android.emulator/TryIt.java | 12 ++++-------- .../org.carbon.android.emulator/TryItEmulator.java | 7 +++++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 3dbe0cbbc9..f911a2812a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -308,8 +308,8 @@ public class TryIt { ArrayList devices = new ArrayList<>(); BufferedReader reader = null; try { - reader = new BufferedReader(new InputStreamReader(listAVDsProcess.getInputStream() - , StandardCharsets.UTF_8)); + reader = new BufferedReader(new InputStreamReader(listAVDsProcess.getInputStream(), + StandardCharsets.UTF_8)); String readLine; while ((readLine = reader.readLine()) != null) { devices.add(readLine); @@ -403,7 +403,6 @@ public class TryIt { * @throws IOException process start throws if an I/O error occurs. */ private void runEmulator(String deviceId) throws IOException { - // mac os and windows needs hardware_Accelerated_execution_Manager if (osSuffix.equals(Constants.MAC_OS) || osSuffix.equals(Constants.WINDOWS_OS)) { installHAXM(); @@ -552,8 +551,6 @@ public class TryIt { try { reader = new BufferedReader(new InputStreamReader(badgingApkFileProcess.getInputStream(), StandardCharsets.UTF_8)); - - while ((readLine = reader.readLine()) != null) { if (readLine.contains("package")) { pkg = readLine.substring(readLine.indexOf(Constants.NAME) + 6).substring(0, @@ -613,7 +610,6 @@ public class TryIt { ProcessBuilder installAgentProcessBuilder = new ProcessBuilder(adbLocation, "install", androidAgentLocation); Process installAgentProcess = installAgentProcessBuilder.start(); - try { installAgentProcess.waitFor(); } catch (InterruptedException e) { @@ -715,14 +711,14 @@ public class TryIt { try { process = processBuilder.start(); } catch (IOException e) { - handleException("HAXM installation failed", e); + System.out.println("HAXM installation failed, install HAXM and try again"); } try { if (process != null) { process.waitFor(); } } catch (InterruptedException e) { - handleException("HAXM installation failed", e); + System.out.println("HAXM installation failed, install HAXM and try again"); } System.out.println("Please restart your machine and run again."); System.exit(0); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java index 28fc0032fc..a86f533cc2 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -46,13 +46,16 @@ public class TryItEmulator implements Runnable { ProcessBuilder processBuilder = new ProcessBuilder(emulatorLocation, "-avd", deviceId); try { Process process = processBuilder.start(); - reader = new BufferedReader(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8)); - writer = new OutputStreamWriter(new FileOutputStream(new File("emulator.log")), StandardCharsets.UTF_8); + reader = new BufferedReader(new InputStreamReader(process.getInputStream(), + StandardCharsets.UTF_8)); + writer = new OutputStreamWriter(new FileOutputStream(new File("emulator.log")), + StandardCharsets.UTF_8); while ((readLine = reader.readLine()) != null) { writer.append(readLine); writer.append(readLine); } } catch (IOException e) { + System.out.println("Error in starting " + deviceId); e.printStackTrace(); } finally { if (reader != null) { From d786b7d839219155556fda4181188927701c9103 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 10:52:16 +0530 Subject: [PATCH 22/64] Edits --- .../java/org.carbon.android.emulator/TryIt.java | 2 +- .../resources/android-tryit/startEmulator.bat | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index f911a2812a..e3e100c4d1 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -329,7 +329,7 @@ public class TryIt { System.out.println("\nAvailable AVDs in the system\n"); int count = 1; for (String device : devices) { - System.out.println(count + " - - " + device); + System.out.println(count + ") " + device); count++; } System.out.print("\nEnter AVD number to start (eg: 1) :"); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat index 2cccdcdee6..c6f82114fe 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat @@ -1,3 +1,4 @@ +@echo off echo Welcome SET sdk_tools_url="https://dl.google.com/android/repository/tools_r25.2.5-windows.zip" @@ -7,12 +8,12 @@ SET platform_url="https://dl.google.com/android/repository/platform-23_r03.zip" SET sys_img_url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip" SET haxm_url="https://dl.google.com/android/repository/extras/intel/haxm-windows_r6_0_5.zip" -java\ - -Dsdk_tools_url=%sdk_tools_url%\ - -Dplatform_tools_url=%platform_tools_url%\ - -Dbuild_tools_url=%build_tools_url%\ - -Dplatform_url=%platform_url%\ - -Dsys_img_url=%sys_img_url%\ - -Dhaxm_url=%haxm_url%\ +java^ + -Dsdk_tools_url=%sdk_tools_url%^ + -Dplatform_tools_url=%platform_tools_url%^ + -Dbuild_tools_url=%build_tools_url%^ + -Dplatform_url=%platform_url%^ + -Dsys_img_url=%sys_img_url%^ + -Dhaxm_url=%haxm_url%^ -jar EmulatorJava.jar echo From 702287e09ba593735c4815ea32ecd8b55e314135 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 11:01:27 +0530 Subject: [PATCH 23/64] Adding kill-server method --- .../org.carbon.android.emulator/TryIt.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index e3e100c4d1..440308b9ec 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -744,11 +744,32 @@ public class TryIt { default: qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386"; } + killServer(); + setExecutePermission(qemuSystemFileLocation); ExecutorService service = Executors.newSingleThreadExecutor(); service.execute(new TryItEmulator(deviceId, emulatorLocation)); } + /** + * This method ensures device properly starts. + */ + private void killServer() { + ProcessBuilder processBuilderKillServer = new ProcessBuilder(adbLocation, "kill-server"); + Process processKillServer = null; + + try { + processKillServer = processBuilderKillServer.start(); + } catch (IOException ignored) { + // process works if restarted + } + try { + processKillServer.waitFor(); + } catch (InterruptedException ignored) { + // can be continued + } + } + /** * This method halts the system the cache.img file is created for the particular AVD started. * From 6acf7c4225afa6e7cf95b142e36fb20823e02895 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 11:12:31 +0530 Subject: [PATCH 24/64] edits in print messages in kilServer Method --- .../src/main/java/org.carbon.android.emulator/TryIt.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 440308b9ec..0ed6007ed2 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -761,12 +761,14 @@ public class TryIt { try { processKillServer = processBuilderKillServer.start(); } catch (IOException ignored) { - // process works if restarted + System.out.println("If the device doesn't start properly, stop running the script and restart again"); } try { - processKillServer.waitFor(); + if (processKillServer != null) { + processKillServer.waitFor(); + } } catch (InterruptedException ignored) { - // can be continued + System.out.println("If the device doesn't start properly, stop running the script and restart again"); } } From e708a4a7c569568258e177bdd58409fe83ee06b0 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 20 Jun 2017 19:33:12 +0530 Subject: [PATCH 25/64] few changes on analytics --- .../carbonapps/virtualfirealarm/artifacts.xml | 2 +- .../artifact.xml | 4 ++-- .../virtual_firealarm_publisher.xml} | 2 +- .../adapter/mqtt/MQTTEventAdapterFactory.java | 2 +- .../pom.xml | 22 ------------------- .../pom.xml | 22 ------------------- 6 files changed, 5 insertions(+), 49 deletions(-) rename components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/{temperature_publisher => virtual_firealarm_publisher}/artifact.xml (81%) rename components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/{temperature_publisher/temperature_publisher.xml => virtual_firealarm_publisher/virtual_firealarm_publisher.xml} (87%) diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/artifacts.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/artifacts.xml index 97f0428d9d..5406c20d55 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/artifacts.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/artifacts.xml @@ -20,7 +20,7 @@ - + diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/temperature_publisher/artifact.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtual_firealarm_publisher/artifact.xml similarity index 81% rename from components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/temperature_publisher/artifact.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtual_firealarm_publisher/artifact.xml index 752cb8c410..096e481528 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/temperature_publisher/artifact.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtual_firealarm_publisher/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - temperature_publisher.xml + + virtual_firealarm_publisher.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/temperature_publisher/temperature_publisher.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtual_firealarm_publisher/virtual_firealarm_publisher.xml similarity index 87% rename from components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/temperature_publisher/temperature_publisher.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtual_firealarm_publisher/virtual_firealarm_publisher.xml index d78d384073..5ecab1fd92 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/temperature_publisher/temperature_publisher.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtual_firealarm_publisher/virtual_firealarm_publisher.xml @@ -17,7 +17,7 @@ ~ under the License. --> - + diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java index bc07e8621d..b3351234f6 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java @@ -84,7 +84,7 @@ public class MQTTEventAdapterFactory extends OutputEventAdapterFactory { clearSession.setDisplayName(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION)); clearSession.setRequired(false); clearSession.setOptions(new String[]{"true", "false"}); - clearSession.setDefaultValue("false"); + clearSession.setDefaultValue("true"); clearSession.setHint(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION_HINT)); // set Quality of Service diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml index 084292c00c..a43489d49e 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml @@ -90,28 +90,6 @@ - - unpack-analytics - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.analytics - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml index ff25b99450..d565e31ead 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml @@ -155,28 +155,6 @@ - - unpack-analytics - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.analytics - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - From 276ccfc31aec38f0ba1607aa54340bc49c96eba9 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 20 Jun 2017 19:48:50 +0530 Subject: [PATCH 26/64] updated version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 55e1c870f6..261073eb70 100644 --- a/pom.xml +++ b/pom.xml @@ -1146,7 +1146,7 @@ 1.1.1 - 3.0.4-SNAPSHOT + 3.0.7-SNAPSHOT [3.0.0, 4.0.0) From 944a28aae0bba69cc45dce8b0f07334299b75ba7 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 20:28:58 +0530 Subject: [PATCH 27/64] Adding correction --- .../org.carbon.android.emulator/TryIt.java | 531 +++++++++--------- 1 file changed, 250 insertions(+), 281 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 0ed6007ed2..dc6ac82454 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -41,6 +41,8 @@ import java.util.Enumeration; import java.util.Scanner; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; @@ -53,9 +55,9 @@ public class TryIt { private String androidSdkHome; private String userHome; private String workingDirectory; - private File sdkLocationFile; // file in which SDK location is written private String adbLocation; // location of executable file abd private String emulatorLocation; // location of executable file emulator + private File sdkConfigFile; // file in which SDK location is written /** * This method gets the system specific variables. @@ -68,7 +70,7 @@ public class TryIt { if (osSuffix.contains(Constants.WINDOWS_OS)) { osSuffix = Constants.WINDOWS_OS; } - if (osSuffix.contains("mac")) { + if (osSuffix.contains(Constants.MAC)) { osSuffix = Constants.MAC_OS; } System.out.println("Detected OS " + osSuffix); @@ -80,52 +82,23 @@ public class TryIt { * @param args commandline arguments. */ public static void main(String[] args) { - TryIt tryIt = new TryIt(); tryIt.setAndroidSDK(); tryIt.checkBuildTools(); - - try { - tryIt.startAVD(); - } catch (IOException e) { - tryIt.handleException("Unable to start AVD", e); - } - - try { - tryIt.checkEmulatorBoot(); - } catch (IOException e) { - tryIt.handleException("Emulator boot process failure", e); - } - - String[] agents = new String[2]; - - try { - agents = tryIt.checkForAgent(); - } catch (IOException ignored) { - // can continue installing agent again - } + tryIt.startAVD(); + tryIt.checkEmulatorBoot(); + String[] agents = tryIt.checkForAgent(); System.out.println("Starting Agent ..."); - try { - tryIt.startPackage(agents); - } catch (IOException e) { - tryIt.handleException("Unable to start WSO2 package", e); - } - Process startShell = null; + tryIt.startPackage(agents); ProcessBuilder startShellProcessBuilder = new ProcessBuilder(tryIt.adbLocation, "shell"); try { startShellProcessBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); startShellProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); - startShell = startShellProcessBuilder.start(); - } catch (IOException ignored) { - //can continue - } - System.out.println("Connected to device shell"); - try { - if (startShell != null) { - startShell.waitFor(); - } - } catch (InterruptedException ignored) { - // Interrupted if AVD is closed only. + Process startShell = startShellProcessBuilder.start(); + System.out.println("Connected to device shell"); + startShell.waitFor(); + } catch (IOException | InterruptedException ignored) { + // script can continue without this process } System.out.println("Good Bye!"); } @@ -137,22 +110,16 @@ public class TryIt { * @param folderName - the folder location to download the files to. */ private void downloadArtifacts(String path, String folderName) { - ReadableByteChannel rbc = null; - FileOutputStream fos = null; - URL url = null; - + ReadableByteChannel readableByteChannel = null; + FileOutputStream fileOutputStream = null; try { - url = new URL(path); + URL url = new URL(path); + readableByteChannel = Channels.newChannel(url.openStream()); + fileOutputStream = new FileOutputStream(folderName); + fileOutputStream.getChannel().transferFrom(readableByteChannel, 0, Long.MAX_VALUE); } catch (MalformedURLException e) { - handleException("Downloading " + folderName + " failed.", e); - } - - try { - if (url != null) { - rbc = Channels.newChannel(url.openStream()); - } - fos = new FileOutputStream(folderName); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + System.out.println("Error in download URL of " + folderName); + System.out.println("URL provided " + path); } catch (IOException e) { if (!new File(folderName).delete()) { System.out.println("Delete " + folderName + " and try again"); @@ -160,103 +127,80 @@ public class TryIt { handleException("Downloading " + folderName + " failed.", e); } finally { try { - if (fos != null) { - fos.close(); + if (fileOutputStream != null) { + fileOutputStream.close(); } - if (rbc != null) { - rbc.close(); + if (readableByteChannel != null) { + readableByteChannel.close(); } } catch (IOException ignored) { - // File close exception ignored + // Exception in finally block } } } - /** * This method validates the Android SDK location provided by the user and write it to the file - * sdkLocationFile. + * sdkConfigFile. */ private void setSDKPath() { - System.out.println("Please provide android SDK location"); + System.out.println("Please provide android SDK location : "); String response = new Scanner(System.in, "UTF-8").next(); String emulatorLocationPath = response + File.separator + "tools" + File.separator + "emulator"; - - if (osSuffix.equals(Constants.WINDOWS_OS)) { // windows emulator location ends with .bat + if (osSuffix.equals(Constants.WINDOWS_OS)) { emulatorLocationPath += Constants.WINDOWS_EXTENSION_BAT; } - if (new File(emulatorLocationPath).exists()) { - Writer writer = null; - try { - writer = new OutputStreamWriter(new FileOutputStream(sdkLocationFile), StandardCharsets.UTF_8); - } catch (FileNotFoundException e) { - System.out.println("Unable to write the sdkLocation to file "); - } - try { - if (writer != null) { - writer.write(response); - } - } catch (IOException e) { - androidSdkHome = response; - System.out.println("Unable to write the sdkLocation to file "); - e.printStackTrace(); - } finally { - try { - if (writer != null) { - writer.close(); - } - } catch (IOException ignored) { - // writer close - } - } + androidSdkHome = response; + writeToSdkConfigFile(response); } else { System.out.println("Invalid SDK location"); setSDKPath(); } } - /** - * This method creates a folder named android-sdk and downloads the minimum tools for SDK - * and write the sdk-location to the file sdkLocationFile. + * This method writes the SDK location to a file sdkConfigFile for future use. + * + * @param string - SDK location. */ - private void getAndroidSDK() { - String androidSdkFolderName = "android-sdk"; - - //noinspection ResultOfMethodCallIgnored - new File(workingDirectory + File.separator + androidSdkFolderName).mkdir(); - - androidSdkHome = workingDirectory + File.separator + androidSdkFolderName; - - getTools(System.getProperty(Constants.SDK_TOOLS_URL), "_Android-sdk-tools.zip"); - - getTools(System.getProperty(Constants.PLATFORM_TOOLS_URL), "_Android-platform-tools.zip"); - + private void writeToSdkConfigFile(String string) { Writer writer = null; try { - writer = new OutputStreamWriter(new FileOutputStream(sdkLocationFile), StandardCharsets.UTF_8); - } catch (FileNotFoundException e) { - System.out.println("Unable to write the sdkLocation to file "); - } - try { - if (writer != null) { - writer.write(androidSdkHome); - } + writer = new OutputStreamWriter(new FileOutputStream(sdkConfigFile), StandardCharsets.UTF_8); + writer.write(string); } catch (IOException e) { - System.out.println("Unable to write the sdkLocation to file "); - e.printStackTrace(); + System.out.println("Writing to " + sdkConfigFile.toString() + " failed."); } finally { try { if (writer != null) { writer.close(); } } catch (IOException ignored) { - // writes close + // } } } + + /** + * This method creates a folder named android-sdk and downloads the minimum tools for SDK + * and write the sdk-location to the file sdkConfigFile. + */ + private void getAndroidSDK() { + String androidSdkFolderName = "android-sdk"; + if (!new File(workingDirectory + File.separator + androidSdkFolderName).exists()) { + if (!new File(workingDirectory + File.separator + androidSdkFolderName).mkdir()) { + System.out.println("Unable to make folder named " + androidSdkFolderName + " in " + workingDirectory); + System.exit(1); + } + } + androidSdkHome = workingDirectory + File.separator + androidSdkFolderName; + getTools(System.getProperty(Constants.SDK_TOOLS_URL), "_Android-sdk-tools.zip"); + getTools(System.getProperty(Constants.PLATFORM_TOOLS_URL), "_Android-platform-tools.zip"); + writeToSdkConfigFile(androidSdkHome); + } + /** * This method downloads and extracts the tools. * @@ -272,19 +216,17 @@ public class TryIt { /** * This method starts the AVD specified by the user. - * - * @throws IOException process throws if an I/O error occurs. */ - private void startAVD() throws IOException { + private void startAVD() { String wso2AvdLocation = userHome + File.separator + ".android" + File.separator + "avd" + File.separator - + "WSO2_AVD.avd"; + + Constants.WSO2_AVD_NAME + ".avd"; checkForPlatform(); checkForSystemImages(); if (!new File(wso2AvdLocation).isDirectory()) { Scanner read = new Scanner(System.in, "UTF-8"); - System.out.println("Do you want to create WSO2_AVD with default configs (Y/n)?: "); + System.out.print("Do you want to create WSO2_AVD with default configs (Y/n)?: "); if (read.next().toLowerCase().matches("y")) { createAVD(); return; @@ -296,30 +238,50 @@ public class TryIt { System.out.println("+----------------------------------------------------------------+"); emulatorLocation = androidSdkHome + File.separator + "tools" + File.separator + "emulator"; - if (osSuffix.equals(Constants.WINDOWS_OS)) { emulatorLocation += Constants.WINDOWS_EXTENSION_EXE; } setExecutePermission(emulatorLocation); - ProcessBuilder listAVDsProcessBuilder = new ProcessBuilder(emulatorLocation, "-list-avds"); - Process listAVDsProcess = listAVDsProcessBuilder.start(); + listAVDs(); + } + + /** + * This method gets the available AVDs' name from the system. + */ + private void listAVDs() { ArrayList devices = new ArrayList<>(); BufferedReader reader = null; try { + ProcessBuilder listAVDsProcessBuilder = new ProcessBuilder(emulatorLocation, "-list-avds"); + Process listAVDsProcess = listAVDsProcessBuilder.start(); reader = new BufferedReader(new InputStreamReader(listAVDsProcess.getInputStream(), StandardCharsets.UTF_8)); String readLine; while ((readLine = reader.readLine()) != null) { devices.add(readLine); } + selectAVD(devices); + } catch (IOException e) { + //TODO } finally { - if (reader != null) { - reader.close(); + try { + if (reader != null) { + reader.close(); + } + } catch (IOException ignored) { + // exception in finally block } } + } + /** + * This method enables the user to select an AVD form available AVDs. + * + * @param devices - list of available AVDs. + */ + private void selectAVD(ArrayList devices) { if (devices.size() == 0) { System.out.println("No AVDs available in the system "); startAVD(); @@ -341,69 +303,66 @@ public class TryIt { /** * This method creates WSO2_AVD with the specific configurations. - * - * @throws IOException process throws if an I/O error occurs. */ - private void createAVD() throws IOException { + private void createAVD() { String avdManagerPath = androidSdkHome + File.separator + "tools" + File.separator + "bin" + File.separator + "avdmanager"; String androidPath = androidSdkHome + File.separator + "tools" + File.separator + "android"; - String configFileLocation = workingDirectory + File.separator + "resources" + File.separator + "config.ini"; - String wso2ConfigFile = userHome + File.separator + ".android" + File.separator + "avd" + File.separator - + "WSO2_AVD.avd" + File.separator + "config.ini"; if (osSuffix.equals(Constants.WINDOWS_OS)) { avdManagerPath += Constants.WINDOWS_EXTENSION_BAT; - } - if (osSuffix.equals(Constants.WINDOWS_OS)) { androidPath += Constants.WINDOWS_EXTENSION_BAT; } setExecutePermission(androidPath); System.out.println("Creating a new AVD device"); - - if (new File(avdManagerPath).exists()) { - setExecutePermission(avdManagerPath); - ProcessBuilder createAvdProcessBuilder = new ProcessBuilder(avdManagerPath, "create", "avd", "-k", - "system-images;android-23;default;x86", "-n", "WSO2_AVD"); - - createAvdProcessBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); - createAvdProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); - - Process createAvdProcess = createAvdProcessBuilder.start(); - - try { + try { + if (new File(avdManagerPath).exists()) { + setExecutePermission(avdManagerPath); + ProcessBuilder createAvdProcessBuilder = new ProcessBuilder(avdManagerPath, "create", "avd", "-k", + "system-images;android-23;default;x86", "-n", Constants.WSO2_AVD_NAME); + createAvdProcessBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); + createAvdProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); + Process createAvdProcess = createAvdProcessBuilder.start(); createAvdProcess.waitFor(); - } catch (InterruptedException e) { - handleException("Unable to create new AVD", e); - } - } else { - ProcessBuilder createAvd = new ProcessBuilder(androidPath, "create", "avd", "-n", "WSO2_AVD", - "-t", "android-23"); - - createAvd.redirectInput(ProcessBuilder.Redirect.INHERIT); - createAvd.redirectOutput(ProcessBuilder.Redirect.INHERIT); - Process createAvdProcess = createAvd.start(); - - try { + } else { + ProcessBuilder createAvd = new ProcessBuilder(androidPath, "create", "avd", "-n", + Constants.WSO2_AVD_NAME, "-t", "android-23"); + createAvd.redirectInput(ProcessBuilder.Redirect.INHERIT); + createAvd.redirectOutput(ProcessBuilder.Redirect.INHERIT); + Process createAvdProcess = createAvd.start(); createAvdProcess.waitFor(); - } catch (InterruptedException e) { - handleException("Unable to create new AVD", e); } + } catch (IOException e) { + handleException("Unable to create " + Constants.WSO2_AVD_NAME, e); + } catch (InterruptedException ignored) { + // interruption in main thread } - Files.copy(Paths.get(configFileLocation), Paths.get(wso2ConfigFile), StandardCopyOption.REPLACE_EXISTING); + copyDefaultWSO2Configs(); startAVD(); } + /** + * This method replaces the default configurations provided in the resources to the WSoO2 AVD created + */ + private void copyDefaultWSO2Configs() { + String configFileLocation = workingDirectory + Constants.WSO2_CONFIG_LOCATION; + String wso2ConfigFile = userHome + File.separator + ".android" + File.separator + "avd" + File.separator + + Constants.WSO2_AVD_NAME + ".avd" + File.separator + "config.ini"; + try { + Files.copy(Paths.get(configFileLocation), Paths.get(wso2ConfigFile), StandardCopyOption.REPLACE_EXISTING); + } catch (IOException ignored) { + System.out.println("Failed to have WSO2 default AVD configurations"); + } + } + /** * This method runs the Android Emulator for the name specified by deviceId. * * @param deviceId String name of the device. - * @throws IOException process start throws if an I/O error occurs. */ - private void runEmulator(String deviceId) throws IOException { - // mac os and windows needs hardware_Accelerated_execution_Manager + private void runEmulator(String deviceId) { if (osSuffix.equals(Constants.MAC_OS) || osSuffix.equals(Constants.WINDOWS_OS)) { installHAXM(); } @@ -417,56 +376,57 @@ public class TryIt { */ private void checkBuildTools() { File buildTools = new File(androidSdkHome + File.separator + "build-tools" - + File.separator + "25.0.2"); + + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION)); if (!buildTools.exists()) { getTools(System.getProperty(Constants.BUILD_TOOL_URL), "_Android-build-tool.zip"); - File buildTool = new File(androidSdkHome + File.separator + "android-7.1.1"); + File buildTool = new File(androidSdkHome + File.separator + System.getProperty(Constants.DOWNLOADED_BUILD_TOOL_NAME)); //noinspection ResultOfMethodCallIgnored new File(androidSdkHome + File.separator + "build-tools").mkdir(); //noinspection ResultOfMethodCallIgnored buildTool.renameTo(new File(androidSdkHome + File.separator + "build-tools" - + File.separator + "25.0.2")); + + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION))); } } /** * This method halts the system until the emulator is fully booted * if boot process is not completed successfully, rest of the tasks won't be continued. - * - * @throws IOException process throws if an I/O error occurs. */ - private void checkEmulatorBoot() throws IOException { - BufferedReader reader; + private void checkEmulatorBoot() { + BufferedReader reader = null; String readLine; Boolean sysBootComplete = false; do { ProcessBuilder systemBoot = new ProcessBuilder(adbLocation, "shell", "getprop", "sys.boot_completed"); - Process systemBootProcess = systemBoot.start(); try { + Process systemBootProcess = systemBoot.start(); systemBootProcess.waitFor(); - } catch (InterruptedException e) { - handleException("System boot process interuppted", e); - } - reader = new BufferedReader(new InputStreamReader(systemBootProcess.getInputStream(), - StandardCharsets.UTF_8)); - while ((readLine = reader.readLine()) != null) { - // if boot process is success the process gives 1 as output - if (readLine.contains("1")) { - sysBootComplete = true; + reader = new BufferedReader(new InputStreamReader(systemBootProcess.getInputStream(), + StandardCharsets.UTF_8)); + while ((readLine = reader.readLine()) != null) { + // if boot process is success the process gives 1 as output + if (readLine.contains("1")) { + sysBootComplete = true; + } } - } - System.out.print("."); - try { + System.out.print("."); Thread.sleep(1000); + } catch (IOException e) { + System.out.println("Unable to check boot process"); } catch (InterruptedException ignored) { - // ignored + //interruption in main thread } finally { - reader.close(); + try { + if (reader != null) { + reader.close(); + } + } catch (IOException ignored) { + } } } while (!sysBootComplete); System.out.println(); @@ -476,29 +436,28 @@ public class TryIt { * This method gets the Android SDK location if available and sets the SDK path else downloads the SDK. */ private void setAndroidSDK() { - sdkLocationFile = new File("sdkLocation"); + sdkConfigFile = new File("sdkLocation"); - if (!(sdkLocationFile.exists() && !sdkLocationFile.isDirectory())) { + if (!(sdkConfigFile.exists() && !sdkConfigFile.isDirectory())) { Scanner read = new Scanner(System.in, "UTF-8"); - System.out.println("Do you have an Android SDK installed on your computer (y/N)?: "); + System.out.print("Do you have an Android SDK installed on your computer (y/N) ? : "); String response = read.next().toLowerCase(); if (response.matches("y")) { setSDKPath(); } else { getAndroidSDK(); } - } - // writes the Android SDK location to sdkLocationFile file - Scanner scanner = null; - try { - scanner = new Scanner(sdkLocationFile, "UTF-8"); - androidSdkHome = scanner.useDelimiter("\\Z").next(); - } catch (FileNotFoundException ignored) { - System.out.println("sdkLocation file not found"); - // already written to androidSdkHome - } finally { - if (scanner != null) { - scanner.close(); + } else { + Scanner scanner = null; + try { + scanner = new Scanner(sdkConfigFile, "UTF-8"); + androidSdkHome = scanner.useDelimiter("\\Z").next(); + } catch (FileNotFoundException ignored) { + // already checked + } finally { + if (scanner != null) { + scanner.close(); + } } } @@ -518,103 +477,121 @@ public class TryIt { private void handleException(String message, Exception ex) { System.out.println(message); ex.printStackTrace(); - System.exit(0); + System.exit(1); } /** * This method check for the android agent in the specified AVD and installs it if not available. * * @return package name and act name. - * @throws IOException process throws if an I/O error occurs. */ - private String[] checkForAgent() throws IOException { - String apkFileLocation = workingDirectory + File.separator + "resources" + File.separator + "android-agent.apk"; - String aaptLocation = androidSdkHome + File.separator + "build-tools" + File.separator + "25.0.2" + private String[] checkForAgent() { + String pkg = null; + String activity = null; + String readLine; + BufferedReader reader = null; + String apkFileLocation = workingDirectory + Constants.APK_LOCATION; + String aaptLocation = androidSdkHome + File.separator + "build-tools" + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION) + File.separator + "aapt"; - if (osSuffix.equals(Constants.WINDOWS_OS)) { aaptLocation += Constants.WINDOWS_EXTENSION_EXE; } setExecutePermission(aaptLocation); - - //process to get the name of package and launchable-activity available in android agent apk file ProcessBuilder badgingApkFileProcessBuilder = new ProcessBuilder(aaptLocation, "d", "badging", apkFileLocation); - Process badgingApkFileProcess = badgingApkFileProcessBuilder.start(); - - String pkg = null; - String activity = null; - Boolean hasAgent = false; - String readLine; - BufferedReader reader = null; - try { + Process badgingApkFileProcess = badgingApkFileProcessBuilder.start(); reader = new BufferedReader(new InputStreamReader(badgingApkFileProcess.getInputStream(), StandardCharsets.UTF_8)); while ((readLine = reader.readLine()) != null) { if (readLine.contains("package")) { - pkg = readLine.substring(readLine.indexOf(Constants.NAME) + 6).substring(0, - readLine.substring(readLine.indexOf(Constants.NAME) - + 6).indexOf("'")); + Pattern pattern = Pattern.compile("'(.*?)'"); + Matcher matcher = pattern.matcher(readLine); + if (matcher.find()) { + pkg = matcher.group(1); + } } if (readLine.contains("launchable-activity")) { - activity = readLine.substring(readLine.indexOf(Constants.NAME) + 6).substring(0, - readLine.substring(readLine.indexOf(Constants.NAME) - + 6).indexOf("'")); + Pattern pattern = Pattern.compile("'(.*?)'"); + Matcher matcher = pattern.matcher(readLine); + if (matcher.find()) { + activity = matcher.group(1); + } } } + } catch (IOException ignored) { + // } finally { if (reader != null) { - reader.close(); + try { + reader.close(); + } catch (IOException ignored) { + // + } } } + if (!checkForPackage(pkg)) { + installAgent(); + } + return new String[]{pkg, activity}; + } + /** + * This method check whether the package is available in the AVD. + * + * @param pkg - name og package to check for. + * @return - available or not. + */ + private boolean checkForPackage(String pkg) { + String readLine; + BufferedReader reader = null; + Boolean hasAgent = false; ProcessBuilder listPackages = new ProcessBuilder(adbLocation, "shell", "pm", "list", "packages"); - Process listPackagesProcess = listPackages.start(); - try { - listPackagesProcess.waitFor(); - } catch (InterruptedException e) { - System.out.println("Unable to read available packages in the current AVD"); - } try { + Process listPackagesProcess = listPackages.start(); + listPackagesProcess.waitFor(); reader = new BufferedReader(new InputStreamReader(listPackagesProcess.getInputStream(), StandardCharsets.UTF_8)); - while ((readLine = reader.readLine()) != null) { if (readLine.contains("package:" + pkg)) { hasAgent = true; } } + } catch (IOException | InterruptedException ignored) { + //TODO } finally { - reader.close(); - } - - - if (!hasAgent) { - installAgent(); + try { + if (reader != null) { + reader.close(); + } + } catch (IOException ignored) { + //TODO + } } - return new String[]{pkg, activity}; + return hasAgent; } /** * This method installs the Android Agent ( WSO2 iot agent ). - * - * @throws IOException process start throws if an I/O error occurs. */ - private void installAgent() throws IOException { - String androidAgentLocation = workingDirectory + File.separator + "resources" + File.separator - + "android-agent.apk"; + private void installAgent() { + String androidAgentLocation = workingDirectory + Constants.APK_LOCATION; System.out.println("Installing agent ..."); + ProcessBuilder installAgentProcessBuilder = new ProcessBuilder(adbLocation, "install", androidAgentLocation); - Process installAgentProcess = installAgentProcessBuilder.start(); try { + Process installAgentProcess = installAgentProcessBuilder.start(); installAgentProcess.waitFor(); - } catch (InterruptedException e) { + } catch (Exception e) { System.out.println("WSO2 Agent installation failed"); - installAgent(); + Scanner read = new Scanner(System.in, "UTF-8"); + System.out.println("Do you want to install agent again (Y/N) ? "); + if (read.next().toLowerCase().matches("y")) { + installAgent(); + } } } @@ -622,20 +599,20 @@ public class TryIt { * This method starts the package (wso2.iot.agent). * * @param agents package name and launchable activity name. - * @throws IOException process throws if an I/O error occurs. */ - private void startPackage(String[] agents) throws IOException { + private void startPackage(String[] agents) { String pkg = agents[0]; String activity = agents[1]; ProcessBuilder pkgStartProcessBuilder = new ProcessBuilder(adbLocation, "shell", "am", "start", "-n", pkg + "/" + activity); - Process pkgStartProcess = pkgStartProcessBuilder.start(); - try { + Process pkgStartProcess = pkgStartProcessBuilder.start(); pkgStartProcess.waitFor(); - } catch (InterruptedException e) { - handleException("Package start process interuptted", e); + } catch (InterruptedException ignored) { + // TODO + } catch (IOException e) { + handleException("Unable to start WSO2 package", e); } } @@ -643,15 +620,17 @@ public class TryIt { * This method checks for the availability of Android Platform in SDK and if not available downloads it. */ private void checkForPlatform() { - File platform = new File(androidSdkHome + File.separator + "platforms" + File.separator + "android-23"); + File platform = new File(androidSdkHome + File.separator + "platforms" + File.separator + + System.getProperty(Constants.TARGET_VERSION)); if (!platform.isDirectory()) { getTools(System.getProperty(Constants.PLATFORM_URL), "_Android-platforms.zip"); //noinspection ResultOfMethodCallIgnored new File(androidSdkHome + File.separator + "platforms").mkdir(); //noinspection ResultOfMethodCallIgnored - new File(androidSdkHome + File.separator + "android-6.0").renameTo(new File(androidSdkHome - + File.separator + "platforms" + File.separator + "android-23")); + new File(androidSdkHome + File.separator + System.getProperty(Constants.DOWNLOADED_PLATFORM_NAME)). + renameTo(new File(androidSdkHome + File.separator + "platforms" + + File.separator + System.getProperty(Constants.TARGET_VERSION))); } } @@ -660,17 +639,17 @@ public class TryIt { */ private void checkForSystemImages() { File systemImages = new File(androidSdkHome + File.separator + "system-images" - + File.separator + "android-23" + File.separator + "default"); + + File.separator + System.getProperty(Constants.TARGET_VERSION) + File.separator + "default"); if (!systemImages.isDirectory()) { getTools(System.getProperty(Constants.SYSTEM_IMAGE_URL), "_sys-images.zip"); //noinspection ResultOfMethodCallIgnored new File(androidSdkHome + File.separator + "system-images" + File.separator - + "android-23" + File.separator + "default").mkdirs(); + + System.getProperty(Constants.TARGET_VERSION) + File.separator + "default").mkdirs(); //noinspection ResultOfMethodCallIgnored - new File(androidSdkHome + File.separator + "x86").renameTo(new File(androidSdkHome - + File.separator + "system-images" + File.separator + "android-23" + File.separator - + "default" + File.separator + "x86")); + new File(androidSdkHome + File.separator + System.getProperty(Constants.OS_TARGET)).renameTo(new File(androidSdkHome + + File.separator + "system-images" + File.separator + System.getProperty(Constants.TARGET_VERSION) + File.separator + + "default" + File.separator + System.getProperty(Constants.OS_TARGET))); } } @@ -683,22 +662,21 @@ public class TryIt { + File.separator + "Hardware_Accelerated_Execution_Manager"; if (!new File(haxmLocation).isDirectory()) { - System.out.println("Downloading intel HAXM..."); - + //System.out.println("Downloading intel HAXM..."); new File(haxmLocation).mkdirs(); String folderName = "_haxm.zip"; - - downloadArtifacts(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator + getTools(Constants.HAXM_URL, haxmLocation + File.separator + folderName); - System.out.println("Configuring HAXM..."); - extractFolder(haxmLocation + File.separator + folderName); - +// downloadArtifacts(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator +// + folderName); +// System.out.println("Configuring HAXM..."); +// extractFolder(haxmLocation + File.separator + folderName); String haxmInstaller = haxmLocation + File.separator + "silent_install"; if (osSuffix.equals(Constants.WINDOWS_OS)) { haxmInstaller += Constants.WINDOWS_EXTENSION_BAT; } else { - haxmInstaller += ".sh"; + haxmInstaller += Constants.MAC_HAXM_EXTENSION; } setExecutePermission(haxmInstaller); @@ -707,17 +685,10 @@ public class TryIt { processBuilder.directory(new File(haxmLocation)); processBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); - Process process = null; - try { - process = processBuilder.start(); - } catch (IOException e) { - System.out.println("HAXM installation failed, install HAXM and try again"); - } try { - if (process != null) { - process.waitFor(); - } - } catch (InterruptedException e) { + Process process = processBuilder.start(); + process.waitFor(); + } catch (IOException | InterruptedException e) { System.out.println("HAXM installation failed, install HAXM and try again"); } System.out.println("Please restart your machine and run again."); @@ -736,7 +707,7 @@ public class TryIt { switch (osSuffix) { case Constants.MAC_OS: - qemuSystemFileLocation += "darwin" + "-x86_64" + File.separator + "qemu-system-i386"; + qemuSystemFileLocation += Constants.MAC_DARWIN + "-x86_64" + File.separator + "qemu-system-i386"; break; case Constants.WINDOWS_OS: qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386.exe"; @@ -745,7 +716,6 @@ public class TryIt { qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386"; } killServer(); - setExecutePermission(qemuSystemFileLocation); ExecutorService service = Executors.newSingleThreadExecutor(); service.execute(new TryItEmulator(deviceId, emulatorLocation)); @@ -757,7 +727,6 @@ public class TryIt { private void killServer() { ProcessBuilder processBuilderKillServer = new ProcessBuilder(adbLocation, "kill-server"); Process processKillServer = null; - try { processKillServer = processBuilderKillServer.start(); } catch (IOException ignored) { @@ -785,8 +754,8 @@ public class TryIt { System.out.print("."); try { Thread.sleep(1000); - } catch (InterruptedException e) { - handleException("Virtual device not loaded properly, process interuptted", e); + } catch (InterruptedException ignored) { + // } } System.out.println(); From 414af3339e449b4d94a80e24bad0ffb19745e032 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 20:29:40 +0530 Subject: [PATCH 28/64] Givins as system properties --- .../resources/android-tryit/startEmulator.bat | 26 +++++++++---------- .../resources/android-tryit/startEmulator.sh | 24 ++++++++--------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat index c6f82114fe..a5816993a6 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat @@ -1,19 +1,17 @@ @echo off echo Welcome -SET sdk_tools_url="https://dl.google.com/android/repository/tools_r25.2.5-windows.zip" -SET platform_tools_url="http://dl.google.com/android/repository/platform-tools_r25.0.3-windows.zip" -SET build_tools_url="https://dl.google.com/android/repository/build-tools_r25.0.2-windows.zip" -SET platform_url="https://dl.google.com/android/repository/platform-23_r03.zip" -SET sys_img_url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip" -SET haxm_url="https://dl.google.com/android/repository/extras/intel/haxm-windows_r6_0_5.zip" - java^ - -Dsdk_tools_url=%sdk_tools_url%^ - -Dplatform_tools_url=%platform_tools_url%^ - -Dbuild_tools_url=%build_tools_url%^ - -Dplatform_url=%platform_url%^ - -Dsys_img_url=%sys_img_url%^ - -Dhaxm_url=%haxm_url%^ - -jar EmulatorJava.jar + -Dsdk.tools.url="https://dl.google.com/android/repository/tools_r25.2.5-windows.zip"^ + -Dplatform.tools.url="http://dl.google.com/android/repository/platform-tools_r25.0.3-windows.zip"^ + -Dbuild.tools.url="https://dl.google.com/android/repository/build-tools_r25.0.2-windows.zip"^ + -Dplatform.url="https://dl.google.com/android/repository/platform-23_r03.zip"^ + -Dsys.img.url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip"^ + -Dhaxm.url="https://dl.google.com/android/repository/extras/intel/haxm-windows_r6_0_5.zip"^ + -Ddownloaded.build.tool.name="android-7.1.1"^ + -Dbuild.tool.version="25.0.2"^ + -Ddownloaded.platform.name="android-6.0"^ + -Dtarget.version="android-23"^ + -Dos.target="x86"^ + -jar EmulatorJava.jar echo diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh index e8eb396e92..882de8abf4 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh @@ -6,19 +6,17 @@ if [[ "$OSTYPE" == "darwin"* ]]; then OS_SUFFIX="macosx" fi -sdk_tools_url="https://dl.google.com/android/repository/tools_r25.2.5-$OS_SUFFIX.zip" -platform_tools_url="http://dl.google.com/android/repository/platform-tools_r25.0.3-$OS_SUFFIX.zip" -build_tools_url="https://dl.google.com/android/repository/build-tools_r25.0.2-$OS_SUFFIX.zip" -platform_url="https://dl.google.com/android/repository/platform-23_r03.zip" -sys_img_url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip" -haxm_url="https://dl.google.com/android/repository/extras/intel/haxm-macosx_r6_0_5.zip" - java\ - -Dsdk_tools_url=$sdk_tools_url\ - -Dplatform_tools_url=$platform_tools_url\ - -Dbuild_tools_url=$build_tools_url\ - -Dplatform_url=$platform_url\ - -Dsys_img_url=$sys_img_url\ - -Dhaxm_url=$haxm_url\ + -Dsdk.tools.url="https://dl.google.com/android/repository/tools_r25.2.5-$OS_SUFFIX.zip"\ + -Dplatform.tools.url="http://dl.google.com/android/repository/platform-tools_r25.0.3-$OS_SUFFIX.zip"\ + -Dbuild.tools.url="https://dl.google.com/android/repository/build-tools_r25.0.2-$OS_SUFFIX.zip"\ + -Dplatform.url="https://dl.google.com/android/repository/platform-23_r03.zip"\ + -Dsys.img.url="https://dl.google.com/android/repository/sys-img/android/x86-23_r09.zip"\ + -Dhaxm.url="https://dl.google.com/android/repository/extras/intel/haxm-macosx_r6_0_5.zip"\ + -Ddownloaded.build.tool.name="android-7.1.1"\ + -Dbuild.tool.version="25.0.2"\ + -Ddownloaded.platform.name="android-6.0"\ + -Dtarget.version="android-23"\ + -Dos.target="x86"\ -jar EmulatorJava.jar echo From ad09d0d21f4c16cc5df4da7d24870e17b92b32ed Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 20:30:12 +0530 Subject: [PATCH 29/64] adding constants --- .../Constants.java | 34 +++++++++++++++---- .../TryItEmulator.java | 15 ++------ 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java index c3ccaabb9e..278b0d9d7d 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java @@ -18,6 +18,8 @@ package org.carbon.android.emulator; +import java.io.File; + /** * This class has the constant strings used and the system properties. */ @@ -26,14 +28,34 @@ class Constants { static final String USER_HOME_PROPERTY = "user.home"; static final String USER_DIRECTORY_PROPERTY = "user.dir"; static final String MAC_OS = "macosx"; + static final String MAC = "mac"; static final String WINDOWS_OS = "windows"; static final String WINDOWS_EXTENSION_EXE = ".exe"; static final String WINDOWS_EXTENSION_BAT = ".bat"; static final String NAME = "name="; - static final String SDK_TOOLS_URL = "sdk_tools_url"; - static final String PLATFORM_TOOLS_URL = "platform_tools_url"; - static final String BUILD_TOOL_URL = "build_tools_url"; - static final String PLATFORM_URL = "platform_url"; - static final String SYSTEM_IMAGE_URL = "sys_img_url"; - static final String HAXM_URL = "haxm_url"; + + static final String SDK_TOOLS_URL = "sdk.tools.url"; + static final String PLATFORM_TOOLS_URL = "platform.tools.url"; + static final String BUILD_TOOL_URL = "build.tools.url"; + static final String PLATFORM_URL = "platform.url"; + static final String SYSTEM_IMAGE_URL = "sys.img.url"; + static final String HAXM_URL = "haxm.url"; + + static final String DOWNLOADED_BUILD_TOOL_NAME = "downloaded.build.tool.name"; //"android-7.1.1"; + static final String BUILD_TOOLS_VERSION = "build.tool.version"; //"25.0.2"; + static final String DOWNLOADED_PLATFORM_NAME = "downloaded.platform.name"; //"android-6.0"; + static final String TARGET_VERSION = "target.version"; //"android-23"; + static final String OS_TARGET = "os.target";//"x86"; + + + static final String WSO2_AVD_NAME = "WSO2_AVD"; + static final String APK_LOCATION = File.separator + "resources" + File.separator + "android-agent.apk"; + static final String WSO2_CONFIG_LOCATION = File.separator + "resources" + File.separator + "config.ini"; + + static final String MAC_HAXM_EXTENSION = ".sh"; + static final String MAC_DARWIN = "darwin"; + +// class AndroidCommands{ +// static final String LIST_AVD = "-list-avds"; +// } } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java index a86f533cc2..3dedf50a94 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -58,21 +58,12 @@ public class TryItEmulator implements Runnable { System.out.println("Error in starting " + deviceId); e.printStackTrace(); } finally { - if (reader != null) { try { - reader.close(); + if (reader != null) reader.close(); + if (writer != null) writer.close(); } catch (IOException ignored) { - // reader close exception ignored - } + // } - if (writer != null) { - try { - writer.close(); - } catch (IOException ignored) { - // writer close exception ignored - } - } - } } } From 7fc365f205227291d8593719bece971d171b1249 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 20 Jun 2017 23:52:35 +0530 Subject: [PATCH 30/64] changes after code review --- .../Constants.java | 24 ++---- .../org.carbon.android.emulator/TryIt.java | 82 ++++++++----------- .../TryItEmulator.java | 1 - 3 files changed, 42 insertions(+), 65 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java index 278b0d9d7d..862198ca2b 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java @@ -32,30 +32,24 @@ class Constants { static final String WINDOWS_OS = "windows"; static final String WINDOWS_EXTENSION_EXE = ".exe"; static final String WINDOWS_EXTENSION_BAT = ".bat"; - static final String NAME = "name="; + static final String MAC_HAXM_EXTENSION = ".sh"; + static final String MAC_DARWIN = "darwin"; + // System properties static final String SDK_TOOLS_URL = "sdk.tools.url"; static final String PLATFORM_TOOLS_URL = "platform.tools.url"; static final String BUILD_TOOL_URL = "build.tools.url"; static final String PLATFORM_URL = "platform.url"; static final String SYSTEM_IMAGE_URL = "sys.img.url"; static final String HAXM_URL = "haxm.url"; + static final String DOWNLOADED_BUILD_TOOL_NAME = "downloaded.build.tool.name"; + static final String BUILD_TOOLS_VERSION = "build.tool.version"; + static final String DOWNLOADED_PLATFORM_NAME = "downloaded.platform.name"; + static final String TARGET_VERSION = "target.version"; + static final String OS_TARGET = "os.target"; - static final String DOWNLOADED_BUILD_TOOL_NAME = "downloaded.build.tool.name"; //"android-7.1.1"; - static final String BUILD_TOOLS_VERSION = "build.tool.version"; //"25.0.2"; - static final String DOWNLOADED_PLATFORM_NAME = "downloaded.platform.name"; //"android-6.0"; - static final String TARGET_VERSION = "target.version"; //"android-23"; - static final String OS_TARGET = "os.target";//"x86"; - - + // WSO2 AVD specific variables static final String WSO2_AVD_NAME = "WSO2_AVD"; static final String APK_LOCATION = File.separator + "resources" + File.separator + "android-agent.apk"; static final String WSO2_CONFIG_LOCATION = File.separator + "resources" + File.separator + "config.ini"; - - static final String MAC_HAXM_EXTENSION = ".sh"; - static final String MAC_DARWIN = "darwin"; - -// class AndroidCommands{ -// static final String LIST_AVD = "-list-avds"; -// } } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index dc6ac82454..11b0036674 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -220,10 +220,8 @@ public class TryIt { private void startAVD() { String wso2AvdLocation = userHome + File.separator + ".android" + File.separator + "avd" + File.separator + Constants.WSO2_AVD_NAME + ".avd"; - checkForPlatform(); checkForSystemImages(); - if (!new File(wso2AvdLocation).isDirectory()) { Scanner read = new Scanner(System.in, "UTF-8"); System.out.print("Do you want to create WSO2_AVD with default configs (Y/n)?: "); @@ -232,7 +230,6 @@ public class TryIt { return; } } - System.out.println("+----------------------------------------------------------------+"); System.out.println("| WSO2 Android TryIt |"); System.out.println("+----------------------------------------------------------------+"); @@ -242,7 +239,6 @@ public class TryIt { emulatorLocation += Constants.WINDOWS_EXTENSION_EXE; } setExecutePermission(emulatorLocation); - listAVDs(); } @@ -250,7 +246,6 @@ public class TryIt { * This method gets the available AVDs' name from the system. */ private void listAVDs() { - ArrayList devices = new ArrayList<>(); BufferedReader reader = null; try { @@ -264,7 +259,7 @@ public class TryIt { } selectAVD(devices); } catch (IOException e) { - //TODO + handleException("Unable to list the available AVDs",e); } finally { try { if (reader != null) { @@ -308,13 +303,11 @@ public class TryIt { String avdManagerPath = androidSdkHome + File.separator + "tools" + File.separator + "bin" + File.separator + "avdmanager"; String androidPath = androidSdkHome + File.separator + "tools" + File.separator + "android"; - if (osSuffix.equals(Constants.WINDOWS_OS)) { avdManagerPath += Constants.WINDOWS_EXTENSION_BAT; androidPath += Constants.WINDOWS_EXTENSION_BAT; } setExecutePermission(androidPath); - System.out.println("Creating a new AVD device"); try { if (new File(avdManagerPath).exists()) { @@ -377,20 +370,29 @@ public class TryIt { private void checkBuildTools() { File buildTools = new File(androidSdkHome + File.separator + "build-tools" + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION)); - if (!buildTools.exists()) { getTools(System.getProperty(Constants.BUILD_TOOL_URL), "_Android-build-tool.zip"); - - File buildTool = new File(androidSdkHome + File.separator + System.getProperty(Constants.DOWNLOADED_BUILD_TOOL_NAME)); - - //noinspection ResultOfMethodCallIgnored - new File(androidSdkHome + File.separator + "build-tools").mkdir(); - //noinspection ResultOfMethodCallIgnored + File buildTool = new File(androidSdkHome + File.separator + + System.getProperty(Constants.DOWNLOADED_BUILD_TOOL_NAME)); + if(!new File(androidSdkHome + File.separator + "build-tools").exists() + && !new File(androidSdkHome + File.separator + "build-tools").mkdir()){ + makeDirectoryError("build-tools",androidSdkHome ); + } buildTool.renameTo(new File(androidSdkHome + File.separator + "build-tools" + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION))); } } + /** + * This method make sure whether the directory can be created. + * @param name - name of the folder to be made + * @param location - location to make folder + */ + private void makeDirectoryError(String name,String location){ + System.out.println("Unable to make folder named " + name + " in " + location); + System.exit(0); + } + /** * This method halts the system until the emulator is fully booted * if boot process is not completed successfully, rest of the tasks won't be continued. @@ -399,7 +401,6 @@ public class TryIt { BufferedReader reader = null; String readLine; Boolean sysBootComplete = false; - do { ProcessBuilder systemBoot = new ProcessBuilder(adbLocation, "shell", "getprop", "sys.boot_completed"); @@ -437,7 +438,6 @@ public class TryIt { */ private void setAndroidSDK() { sdkConfigFile = new File("sdkLocation"); - if (!(sdkConfigFile.exists() && !sdkConfigFile.isDirectory())) { Scanner read = new Scanner(System.in, "UTF-8"); System.out.print("Do you have an Android SDK installed on your computer (y/N) ? : "); @@ -460,7 +460,6 @@ public class TryIt { } } } - adbLocation = androidSdkHome + File.separator + "platform-tools" + File.separator + "adb"; if (osSuffix.equals(Constants.WINDOWS_OS)) { adbLocation += Constants.WINDOWS_EXTENSION_EXE; @@ -491,8 +490,8 @@ public class TryIt { String readLine; BufferedReader reader = null; String apkFileLocation = workingDirectory + Constants.APK_LOCATION; - String aaptLocation = androidSdkHome + File.separator + "build-tools" + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION) - + File.separator + "aapt"; + String aaptLocation = androidSdkHome + File.separator + "build-tools" + File.separator + + System.getProperty(Constants.BUILD_TOOLS_VERSION) + File.separator + "aapt"; if (osSuffix.equals(Constants.WINDOWS_OS)) { aaptLocation += Constants.WINDOWS_EXTENSION_EXE; } @@ -547,7 +546,6 @@ public class TryIt { BufferedReader reader = null; Boolean hasAgent = false; ProcessBuilder listPackages = new ProcessBuilder(adbLocation, "shell", "pm", "list", "packages"); - try { Process listPackagesProcess = listPackages.start(); listPackagesProcess.waitFor(); @@ -559,14 +557,14 @@ public class TryIt { } } } catch (IOException | InterruptedException ignored) { - //TODO + // } finally { try { if (reader != null) { reader.close(); } } catch (IOException ignored) { - //TODO + // } } return hasAgent; @@ -577,9 +575,7 @@ public class TryIt { */ private void installAgent() { String androidAgentLocation = workingDirectory + Constants.APK_LOCATION; - System.out.println("Installing agent ..."); - ProcessBuilder installAgentProcessBuilder = new ProcessBuilder(adbLocation, "install", androidAgentLocation); try { @@ -603,14 +599,13 @@ public class TryIt { private void startPackage(String[] agents) { String pkg = agents[0]; String activity = agents[1]; - ProcessBuilder pkgStartProcessBuilder = new ProcessBuilder(adbLocation, "shell", "am", "start", "-n", pkg + "/" + activity); try { Process pkgStartProcess = pkgStartProcessBuilder.start(); pkgStartProcess.waitFor(); } catch (InterruptedException ignored) { - // TODO + // } catch (IOException e) { handleException("Unable to start WSO2 package", e); } @@ -622,11 +617,12 @@ public class TryIt { private void checkForPlatform() { File platform = new File(androidSdkHome + File.separator + "platforms" + File.separator + System.getProperty(Constants.TARGET_VERSION)); - if (!platform.isDirectory()) { getTools(System.getProperty(Constants.PLATFORM_URL), "_Android-platforms.zip"); - //noinspection ResultOfMethodCallIgnored - new File(androidSdkHome + File.separator + "platforms").mkdir(); + if(!new File(androidSdkHome + File.separator + "platforms").exists() + && !new File(androidSdkHome + File.separator + "platforms").mkdir()){ + makeDirectoryError("platforms",androidSdkHome); + } //noinspection ResultOfMethodCallIgnored new File(androidSdkHome + File.separator + System.getProperty(Constants.DOWNLOADED_PLATFORM_NAME)). renameTo(new File(androidSdkHome + File.separator + "platforms" @@ -647,32 +643,29 @@ public class TryIt { new File(androidSdkHome + File.separator + "system-images" + File.separator + System.getProperty(Constants.TARGET_VERSION) + File.separator + "default").mkdirs(); //noinspection ResultOfMethodCallIgnored - new File(androidSdkHome + File.separator + System.getProperty(Constants.OS_TARGET)).renameTo(new File(androidSdkHome - + File.separator + "system-images" + File.separator + System.getProperty(Constants.TARGET_VERSION) + File.separator - + "default" + File.separator + System.getProperty(Constants.OS_TARGET))); + new File(androidSdkHome + File.separator + System.getProperty(Constants.OS_TARGET)) + .renameTo(new File(androidSdkHome + File.separator + "system-images" + File.separator + + System.getProperty(Constants.TARGET_VERSION) + File.separator + "default" + + File.separator + System.getProperty(Constants.OS_TARGET))); } } /** * This method install Hardware_Accelerated Execution_Manager in mac and windows os. */ - @SuppressWarnings("ResultOfMethodCallIgnored") private void installHAXM() { String haxmLocation = androidSdkHome + File.separator + "extras" + File.separator + "intel" + File.separator + "Hardware_Accelerated_Execution_Manager"; if (!new File(haxmLocation).isDirectory()) { //System.out.println("Downloading intel HAXM..."); - new File(haxmLocation).mkdirs(); + if(!new File(haxmLocation).mkdirs()){ + makeDirectoryError(haxmLocation,androidSdkHome); + } String folderName = "_haxm.zip"; getTools(Constants.HAXM_URL, haxmLocation + File.separator + folderName); -// downloadArtifacts(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator -// + folderName); -// System.out.println("Configuring HAXM..."); -// extractFolder(haxmLocation + File.separator + folderName); String haxmInstaller = haxmLocation + File.separator + "silent_install"; - if (osSuffix.equals(Constants.WINDOWS_OS)) { haxmInstaller += Constants.WINDOWS_EXTENSION_BAT; } else { @@ -749,7 +742,6 @@ public class TryIt { private void checkCacheImg(String deviceId) { File cacheImg = new File(userHome + File.separator + ".android" + File.separator + "avd" + File.separator + deviceId + ".avd" + File.separator + "cache.img"); - while (!cacheImg.exists()) { System.out.print("."); try { @@ -788,19 +780,14 @@ public class TryIt { try { zip = new ZipFile(file); String newPath = zipFile.substring(0, zipFile.lastIndexOf(File.separator)); - - //noinspection ResultOfMethodCallIgnored new File(newPath).mkdirs(); - Enumeration zipFileEntries = zip.entries(); - while (zipFileEntries.hasMoreElements()) { // grab a zip file entry ZipEntry entry = (ZipEntry) zipFileEntries.nextElement(); String currentEntry = entry.getName(); File destFile = new File(newPath, currentEntry); File destinationParent = destFile.getParentFile(); - if (destinationParent == null) { destFile.mkdirs(); continue; @@ -808,7 +795,6 @@ public class TryIt { //noinspection ResultOfMethodCallIgnored destinationParent.mkdirs(); } - if (!entry.isDirectory()) { BufferedInputStream is; try { @@ -816,12 +802,10 @@ public class TryIt { int currentByte; // establish buffer for writing file byte data[] = new byte[BUFFER]; - // write the current file to disk FileOutputStream fos = new FileOutputStream(destFile); BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER); - // read and write until last byte is encountered while ((currentByte = is.read(data, 0, BUFFER)) != -1) { dest.write(data, 0, currentByte); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java index 3dedf50a94..750167af63 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -52,7 +52,6 @@ public class TryItEmulator implements Runnable { StandardCharsets.UTF_8); while ((readLine = reader.readLine()) != null) { writer.append(readLine); - writer.append(readLine); } } catch (IOException e) { System.out.println("Error in starting " + deviceId); From 952a78b81b05cd79e2fd0fdebd570b48e55156f2 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 00:12:45 +0530 Subject: [PATCH 31/64] . --- .../src/main/java/org.carbon.android.emulator/TryIt.java | 1 + 1 file changed, 1 insertion(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 11b0036674..2d218f77b2 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -97,6 +97,7 @@ public class TryIt { Process startShell = startShellProcessBuilder.start(); System.out.println("Connected to device shell"); startShell.waitFor(); + startShell.destroy(); } catch (IOException | InterruptedException ignored) { // script can continue without this process } From acc82acdbedee20ff52ff344afae6277ecbc8d3f Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 09:56:40 +0530 Subject: [PATCH 32/64] Change of Module order --- components/mobile-plugins/android-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml index 70e139ba49..fa4d1ba736 100644 --- a/components/mobile-plugins/android-plugin/pom.xml +++ b/components/mobile-plugins/android-plugin/pom.xml @@ -35,8 +35,8 @@ org.wso2.carbon.device.mgt.mobile.android org.wso2.carbon.device.mgt.mobile.android.api - org.wso2.carbon.device.mgt.mobile.android.ui org.wso2.carbon.device.mgt.mobile.android.emulator + org.wso2.carbon.device.mgt.mobile.android.ui From 85346a531b95aaa707e2428d596760305e4c7914 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 09:57:13 +0530 Subject: [PATCH 33/64] . --- .../src/main/resources/android-tryit/startEmulator.bat | 2 +- .../src/main/resources/android-tryit/startEmulator.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat index a5816993a6..bf9e999167 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat @@ -14,4 +14,4 @@ java^ -Dtarget.version="android-23"^ -Dos.target="x86"^ -jar EmulatorJava.jar -echo + diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh index 882de8abf4..da5db6f6bf 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh @@ -19,4 +19,4 @@ java\ -Dtarget.version="android-23"\ -Dos.target="x86"\ -jar EmulatorJava.jar -echo + From 054c10df3e61306cd2a1129f0cb4d7854151725a Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 09:57:30 +0530 Subject: [PATCH 34/64] updates --- .../src/main/java/org.carbon.android.emulator/TryIt.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 2d218f77b2..f6c160bf04 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -97,7 +97,6 @@ public class TryIt { Process startShell = startShellProcessBuilder.start(); System.out.println("Connected to device shell"); startShell.waitFor(); - startShell.destroy(); } catch (IOException | InterruptedException ignored) { // script can continue without this process } @@ -664,7 +663,7 @@ public class TryIt { makeDirectoryError(haxmLocation,androidSdkHome); } String folderName = "_haxm.zip"; - getTools(Constants.HAXM_URL, haxmLocation + File.separator + getTools(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator + folderName); String haxmInstaller = haxmLocation + File.separator + "silent_install"; if (osSuffix.equals(Constants.WINDOWS_OS)) { From 6b340597b4580f31aee08597315517132e9176c8 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 21 Jun 2017 10:56:12 +0530 Subject: [PATCH 35/64] Changing artifact uploader admin service resource path --- .../public/js/platform-configuration.js | 2 +- .../public/js/platform-configuration.js | 2 +- .../public/js/platform-configuration.js | 2 +- .../public/js/platform-configuration.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration/public/js/platform-configuration.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration/public/js/platform-configuration.js index 9a1ed8202e..7c522fe6f3 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration/public/js/platform-configuration.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration/public/js/platform-configuration.js @@ -99,7 +99,7 @@ var addConfiguration = function () { var artifactUpload = function () { var contentType = "application/json"; var backendEndBasePath = "/api/device-mgt/v1.0"; - var urix = backendEndBasePath + "/admin/devicetype/deploy/android_sense"; + var urix = backendEndBasePath + "/admin/publish-artifact/deploy/android_sense"; var defaultStatusClasses = "fw fw-stack-1x"; var content = $("#androidsense-statistic-response-template").find(".content"); var title = content.find("#title"); diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration/public/js/platform-configuration.js b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration/public/js/platform-configuration.js index 5a32d87334..72424628bd 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration/public/js/platform-configuration.js +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration/public/js/platform-configuration.js @@ -107,7 +107,7 @@ var addConfiguration = function () { var artifactUpload = function () { var contentType = "application/json"; var backendEndBasePath = "/api/device-mgt/v1.0"; - var urix = backendEndBasePath + "/admin/devicetype/deploy/arduino"; + var urix = backendEndBasePath + "/admin/publish-artifact/deploy/arduino"; var defaultStatusClasses = "fw fw-stack-1x"; var content = $("#arduino-statistic-response-template").find(".content"); var title = content.find("#title"); diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js index 88ab1888af..e15c8148ea 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js @@ -117,7 +117,7 @@ var addConfiguration = function () { var artifactUpload = function () { var contentType = "application/json"; var backendEndBasePath = "/api/device-mgt/v1.0"; - var urix = backendEndBasePath + "/admin/devicetype/deploy/raspberrypi"; + var urix = backendEndBasePath + "/admin/publish-artifact/deploy/raspberrypi"; var defaultStatusClasses = "fw fw-stack-1x"; var content = $("#raspberrypi-statistic-response-template").find(".content"); var title = content.find("#title"); diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js index 9c69e78993..82bccf3447 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js @@ -107,7 +107,7 @@ var addConfiguration = function () { var artifactUpload = function () { var contentType = "application/json"; var backendEndBasePath = "/api/device-mgt/v1.0"; - var urix = backendEndBasePath + "/admin/devicetype/deploy/virtual_firealarm"; + var urix = backendEndBasePath + "/admin/publish-artifact/deploy/virtual_firealarm"; var defaultStatusClasses = "fw fw-stack-1x"; var content = $("#virtual-firealarm-statistic-response-template").find(".content"); var title = content.find("#title"); From 04261dac138f26c018c804dbab7421800baf1d8a Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 21 Jun 2017 11:01:07 +0530 Subject: [PATCH 36/64] Updating cdmf version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f1bf59f9f8..b483f90a43 100644 --- a/pom.xml +++ b/pom.xml @@ -1142,7 +1142,7 @@ 1.1.1 - 3.0.6 + 3.0.8 [3.0.0, 4.0.0) From b646dc680118b2d4734e552d7676da69bb4ac0f6 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 11:26:05 +0530 Subject: [PATCH 37/64] removing output directory attribute --- .../org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml index 31e87f5cb8..be89740f08 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -48,7 +48,6 @@ org.carbon.android.emulator.TryIt - ../org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit From 0a6ddb3b0fb0656342ea5eb52b99497daeac0c6b Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 11:26:43 +0530 Subject: [PATCH 38/64] Adding maven-dependency-plugin --- .../pom.xml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index a0c91bd3e3..644c4856f9 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -35,6 +35,31 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + EmulatorJava.jar + process-resources + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.mobile.android.emulator + 4.0.2-SNAPSHOT + true + ${project.basedir}/src/main/resources/android-tryit/ + JavaApp.jar + + + + + + maven-antrun-plugin ${maven-antrun-plugin.version} From f4037a8885928374961a0fa4222fcb17f49d3b59 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 11:27:14 +0530 Subject: [PATCH 39/64] Chaging Java App name --- .../src/main/resources/android-tryit/startEmulator.bat | 2 +- .../src/main/resources/android-tryit/startEmulator.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat index bf9e999167..aedb7fb050 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat @@ -13,5 +13,5 @@ java^ -Ddownloaded.platform.name="android-6.0"^ -Dtarget.version="android-23"^ -Dos.target="x86"^ - -jar EmulatorJava.jar + -jar JavaApp.jar diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh index da5db6f6bf..22b3922081 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh @@ -18,5 +18,5 @@ java\ -Ddownloaded.platform.name="android-6.0"\ -Dtarget.version="android-23"\ -Dos.target="x86"\ - -jar EmulatorJava.jar + -jar JavaApp.jar From ce8893e41c1c6b5ef0f962b71f70b5875b76ab83 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 14:10:42 +0530 Subject: [PATCH 40/64] Adding File Permissions --- .../org.wso2.carbon.device.mgt.mobile.android.ui/build.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml index 9fbdb7899e..fa0d8c18fd 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml @@ -26,11 +26,12 @@ - - + - + + + From 14583ac30c66d52e919739aea01dcbea3e6c1621 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 14:11:33 +0530 Subject: [PATCH 41/64] ile permissions --- .../src/main/resources/android-tryit/startEmulator.bat | 0 .../src/main/resources/android-tryit/startEmulator.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat mode change 100644 => 100755 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.bat old mode 100644 new mode 100755 diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/startEmulator.sh old mode 100644 new mode 100755 From 9a2fe3cfb1fcc97af86ae835c768790d7ba68167 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 14:11:51 +0530 Subject: [PATCH 42/64] edits --- .../src/main/java/org.carbon.android.emulator/Constants.java | 2 -- .../src/main/java/org.carbon.android.emulator/TryIt.java | 2 +- .../main/java/org.carbon.android.emulator/TryItEmulator.java | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java index 862198ca2b..5928ced496 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java @@ -34,7 +34,6 @@ class Constants { static final String WINDOWS_EXTENSION_BAT = ".bat"; static final String MAC_HAXM_EXTENSION = ".sh"; static final String MAC_DARWIN = "darwin"; - // System properties static final String SDK_TOOLS_URL = "sdk.tools.url"; static final String PLATFORM_TOOLS_URL = "platform.tools.url"; @@ -47,7 +46,6 @@ class Constants { static final String DOWNLOADED_PLATFORM_NAME = "downloaded.platform.name"; static final String TARGET_VERSION = "target.version"; static final String OS_TARGET = "os.target"; - // WSO2 AVD specific variables static final String WSO2_AVD_NAME = "WSO2_AVD"; static final String APK_LOCATION = File.separator + "resources" + File.separator + "android-agent.apk"; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index f6c160bf04..3acad67375 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -100,7 +100,7 @@ public class TryIt { } catch (IOException | InterruptedException ignored) { // script can continue without this process } - System.out.println("Good Bye!"); + System.out.println("\nGood Bye!"); } /** diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java index 750167af63..650e51802a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -64,5 +64,6 @@ public class TryItEmulator implements Runnable { // } } + System.exit(0); } } From eccad44dfffc2de83ab75156e23ab3b707e91da8 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 14:24:22 +0530 Subject: [PATCH 43/64] edits --- .../src/main/java/org.carbon.android.emulator/TryIt.java | 2 -- .../org.wso2.carbon.device.mgt.mobile.android.ui/build.xml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 3acad67375..fe1105d538 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -66,7 +66,6 @@ public class TryIt { osSuffix = System.getProperty(Constants.OS_NAME_PROPERTY).toLowerCase(); userHome = System.getProperty(Constants.USER_HOME_PROPERTY); workingDirectory = System.getProperty(Constants.USER_DIRECTORY_PROPERTY); - if (osSuffix.contains(Constants.WINDOWS_OS)) { osSuffix = Constants.WINDOWS_OS; } @@ -318,7 +317,6 @@ public class TryIt { createAvdProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); Process createAvdProcess = createAvdProcessBuilder.start(); createAvdProcess.waitFor(); - } else { ProcessBuilder createAvd = new ProcessBuilder(androidPath, "create", "avd", "-n", Constants.WSO2_AVD_NAME, "-t", "android-23"); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml index fa0d8c18fd..f9445ccaf4 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml @@ -29,7 +29,7 @@ - + From e27029010595b72515ed624a8559a95c2836881d Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 17:14:42 +0530 Subject: [PATCH 44/64] with corrections --- .../org.carbon.android.emulator/TryIt.java | 92 ++++++++++++------- .../TryItEmulator.java | 8 +- 2 files changed, 67 insertions(+), 33 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index fe1105d538..fa9e7316f8 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -64,8 +64,17 @@ public class TryIt { */ private TryIt() { osSuffix = System.getProperty(Constants.OS_NAME_PROPERTY).toLowerCase(); + if (osSuffix == null) { + sysPropertyError("OS NAME"); + } userHome = System.getProperty(Constants.USER_HOME_PROPERTY); + if (userHome == null) { + sysPropertyError("Home Directory"); + } workingDirectory = System.getProperty(Constants.USER_DIRECTORY_PROPERTY); + if (workingDirectory == null) { + sysPropertyError("Current Working Directory"); + } if (osSuffix.contains(Constants.WINDOWS_OS)) { osSuffix = Constants.WINDOWS_OS; } @@ -102,6 +111,15 @@ public class TryIt { System.out.println("\nGood Bye!"); } + /** + * This method is called when then is an error in getting system properties + * @param error - system property name + */ + private void sysPropertyError(String error) { + System.out.println("Unable to get the " + error + " of your system"); + System.exit(1); + } + /** * This method downloads the files. * @@ -144,7 +162,7 @@ public class TryIt { */ private void setSDKPath() { System.out.println("Please provide android SDK location : "); - String response = new Scanner(System.in, "UTF-8").next(); + String response = new Scanner(System.in, StandardCharsets.UTF_8.toString()).next(); String emulatorLocationPath = response + File.separator + "tools" + File.separator + "emulator"; if (osSuffix.equals(Constants.WINDOWS_OS)) { emulatorLocationPath += Constants.WINDOWS_EXTENSION_BAT; @@ -222,7 +240,7 @@ public class TryIt { checkForPlatform(); checkForSystemImages(); if (!new File(wso2AvdLocation).isDirectory()) { - Scanner read = new Scanner(System.in, "UTF-8"); + Scanner read = new Scanner(System.in, StandardCharsets.UTF_8.toString()); System.out.print("Do you want to create WSO2_AVD with default configs (Y/n)?: "); if (read.next().toLowerCase().matches("y")) { createAVD(); @@ -251,14 +269,14 @@ public class TryIt { ProcessBuilder listAVDsProcessBuilder = new ProcessBuilder(emulatorLocation, "-list-avds"); Process listAVDsProcess = listAVDsProcessBuilder.start(); reader = new BufferedReader(new InputStreamReader(listAVDsProcess.getInputStream(), - StandardCharsets.UTF_8)); + StandardCharsets.UTF_8.toString())); String readLine; while ((readLine = reader.readLine()) != null) { devices.add(readLine); } selectAVD(devices); } catch (IOException e) { - handleException("Unable to list the available AVDs",e); + handleException("Unable to list the available AVDs", e); } finally { try { if (reader != null) { @@ -270,6 +288,19 @@ public class TryIt { } } + /** + * This method makes the thread wait. + * + * @param milliSec -time to wait for + */ + private void delay(long milliSec) { + try { + Thread.sleep(milliSec); + } catch (InterruptedException ignored) { + // interruption in main thread + } + } + /** * This method enables the user to select an AVD form available AVDs. * @@ -289,7 +320,7 @@ public class TryIt { count++; } System.out.print("\nEnter AVD number to start (eg: 1) :"); - Scanner read = new Scanner(System.in, "UTF-8"); + Scanner read = new Scanner(System.in, StandardCharsets.UTF_8.toString()); int avdNo = read.nextInt(); runEmulator(devices.get(--avdNo)); } @@ -344,7 +375,7 @@ public class TryIt { try { Files.copy(Paths.get(configFileLocation), Paths.get(wso2ConfigFile), StandardCopyOption.REPLACE_EXISTING); } catch (IOException ignored) { - System.out.println("Failed to have WSO2 default AVD configurations"); + System.out.println("WARN : Failed to have WSO2 default AVD configurations"); } } @@ -372,10 +403,10 @@ public class TryIt { getTools(System.getProperty(Constants.BUILD_TOOL_URL), "_Android-build-tool.zip"); File buildTool = new File(androidSdkHome + File.separator + System.getProperty(Constants.DOWNLOADED_BUILD_TOOL_NAME)); - if(!new File(androidSdkHome + File.separator + "build-tools").exists() - && !new File(androidSdkHome + File.separator + "build-tools").mkdir()){ - makeDirectoryError("build-tools",androidSdkHome ); - } + if (!new File(androidSdkHome + File.separator + "build-tools").exists() + && !new File(androidSdkHome + File.separator + "build-tools").mkdir()) { + makeDirectoryError("build-tools", androidSdkHome); + } buildTool.renameTo(new File(androidSdkHome + File.separator + "build-tools" + File.separator + System.getProperty(Constants.BUILD_TOOLS_VERSION))); } @@ -383,10 +414,11 @@ public class TryIt { /** * This method make sure whether the directory can be created. - * @param name - name of the folder to be made + * + * @param name - name of the folder to be made * @param location - location to make folder */ - private void makeDirectoryError(String name,String location){ + private void makeDirectoryError(String name, String location) { System.out.println("Unable to make folder named " + name + " in " + location); System.exit(0); } @@ -414,9 +446,9 @@ public class TryIt { } } System.out.print("."); - Thread.sleep(1000); + delay(1000); } catch (IOException e) { - System.out.println("Unable to check boot process"); + System.out.println("WARN : Unable to check boot process"); } catch (InterruptedException ignored) { //interruption in main thread } finally { @@ -435,9 +467,10 @@ public class TryIt { * This method gets the Android SDK location if available and sets the SDK path else downloads the SDK. */ private void setAndroidSDK() { - sdkConfigFile = new File("sdkLocation"); + sdkConfigFile = new File("sdkConfigLocation"); if (!(sdkConfigFile.exists() && !sdkConfigFile.isDirectory())) { - Scanner read = new Scanner(System.in, "UTF-8"); + //TODO + Scanner read = new Scanner(System.in, StandardCharsets.UTF_8.toString()); System.out.print("Do you have an Android SDK installed on your computer (y/N) ? : "); String response = read.next().toLowerCase(); if (response.matches("y")) { @@ -448,10 +481,10 @@ public class TryIt { } else { Scanner scanner = null; try { - scanner = new Scanner(sdkConfigFile, "UTF-8"); + scanner = new Scanner(sdkConfigFile, StandardCharsets.UTF_8.toString()); androidSdkHome = scanner.useDelimiter("\\Z").next(); } catch (FileNotFoundException ignored) { - // already checked + // } finally { if (scanner != null) { scanner.close(); @@ -517,7 +550,7 @@ public class TryIt { } } } catch (IOException ignored) { - // + System.out.println("WARN : Failed to get the available packages"); } finally { if (reader != null) { try { @@ -555,7 +588,7 @@ public class TryIt { } } } catch (IOException | InterruptedException ignored) { - // + System.out.println("WARN : Failed to check the available packages, agent will be installed"); } finally { try { if (reader != null) { @@ -581,7 +614,8 @@ public class TryIt { installAgentProcess.waitFor(); } catch (Exception e) { System.out.println("WSO2 Agent installation failed"); - Scanner read = new Scanner(System.in, "UTF-8"); + //TODO + Scanner read = new Scanner(System.in, StandardCharsets.UTF_8.toString()); System.out.println("Do you want to install agent again (Y/N) ? "); if (read.next().toLowerCase().matches("y")) { installAgent(); @@ -617,9 +651,9 @@ public class TryIt { + System.getProperty(Constants.TARGET_VERSION)); if (!platform.isDirectory()) { getTools(System.getProperty(Constants.PLATFORM_URL), "_Android-platforms.zip"); - if(!new File(androidSdkHome + File.separator + "platforms").exists() - && !new File(androidSdkHome + File.separator + "platforms").mkdir()){ - makeDirectoryError("platforms",androidSdkHome); + if (!new File(androidSdkHome + File.separator + "platforms").exists() + && !new File(androidSdkHome + File.separator + "platforms").mkdir()) { + makeDirectoryError("platforms", androidSdkHome); } //noinspection ResultOfMethodCallIgnored new File(androidSdkHome + File.separator + System.getProperty(Constants.DOWNLOADED_PLATFORM_NAME)). @@ -657,8 +691,8 @@ public class TryIt { if (!new File(haxmLocation).isDirectory()) { //System.out.println("Downloading intel HAXM..."); - if(!new File(haxmLocation).mkdirs()){ - makeDirectoryError(haxmLocation,androidSdkHome); + if (!new File(haxmLocation).mkdirs()) { + makeDirectoryError(haxmLocation, androidSdkHome); } String folderName = "_haxm.zip"; getTools(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator @@ -742,11 +776,7 @@ public class TryIt { + File.separator + "avd" + File.separator + deviceId + ".avd" + File.separator + "cache.img"); while (!cacheImg.exists()) { System.out.print("."); - try { - Thread.sleep(1000); - } catch (InterruptedException ignored) { - // - } + delay(1000); } System.out.println(); } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java index 650e51802a..9d910104f8 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -58,8 +58,12 @@ public class TryItEmulator implements Runnable { e.printStackTrace(); } finally { try { - if (reader != null) reader.close(); - if (writer != null) writer.close(); + if (reader != null){ + reader.close(); + } + if (writer != null) { + writer.close(); + } } catch (IOException ignored) { // } From ef8b53960d1a017fb14c38d90d2771670b68b092 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 17:15:31 +0530 Subject: [PATCH 45/64] README modified to be more clear --- .../src/main/resources/android-tryit/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md index a1ca1df992..6c5e13ae77 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/android-tryit/README.md @@ -2,20 +2,19 @@ Prerequisites =============== 1. Java 8. -Instructions -================= +Instructions +============ -1. Run 'startEmulator.sh' script in your terminal from the current directory. - For windows run startEmulator.bat +1. For Linux/Mac : Run 'startEmulator.sh' script in your terminal from the current directory. + For Windows : Run 'startEmulator.bat' script in your terminal from the current directory. 2. If you already have android sdk in your computer, please provide location of the sdk. Otherwise this tool will download and install minimum SDK components which needs to run the emulator. This is a one time process. 3. This tool will ask to create AVD if you don't have any in your computer. Otherwise you can select existing AVD to try out IoT Agent. - Troubleshooting ================== -1. If your existing SDK does not work or giving any errors, delete 'sdkLocation' file and try again without selecting the existing SDK path. +1. If your existing SDK does not work or giving any errors, delete 'sdkConfigLocation' file and try again without selecting the existing SDK path. 2. If your emulator does not start correctly, please remove all files and directories in $HOME/.android/avd/ directory. Then try again with a new emulator. From 6388ea1e45546e2ffe3392c69c34241d01c116e2 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 17:16:03 +0530 Subject: [PATCH 46/64] getting the project verion automatically --- .../org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index 0eb0810faa..6566732ac8 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -50,7 +50,7 @@ org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.mobile.android.emulator - 4.0.2-SNAPSHOT + ${project.version} true ${project.basedir}/src/main/resources/android-tryit/ JavaApp.jar From a2d703334a806729b1fd5c610f260bea1dc173c5 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 17:34:20 +0530 Subject: [PATCH 47/64] reformatting code --- .../org.carbon.android.emulator/Constants.java | 2 +- .../org.carbon.android.emulator/TryIt.java | 1 + .../TryItEmulator.java | 18 +++++++++--------- .../pom.xml | 8 +++++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java index 5928ced496..e1ad6c6302 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/Constants.java @@ -44,7 +44,7 @@ class Constants { static final String DOWNLOADED_BUILD_TOOL_NAME = "downloaded.build.tool.name"; static final String BUILD_TOOLS_VERSION = "build.tool.version"; static final String DOWNLOADED_PLATFORM_NAME = "downloaded.platform.name"; - static final String TARGET_VERSION = "target.version"; + static final String TARGET_VERSION = "target.version"; static final String OS_TARGET = "os.target"; // WSO2 AVD specific variables static final String WSO2_AVD_NAME = "WSO2_AVD"; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index fa9e7316f8..79edf52d9c 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -113,6 +113,7 @@ public class TryIt { /** * This method is called when then is an error in getting system properties + * * @param error - system property name */ private void sysPropertyError(String error) { diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java index 9d910104f8..d4ddd22652 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryItEmulator.java @@ -57,15 +57,15 @@ public class TryItEmulator implements Runnable { System.out.println("Error in starting " + deviceId); e.printStackTrace(); } finally { - try { - if (reader != null){ - reader.close(); - } - if (writer != null) { - writer.close(); - } - } catch (IOException ignored) { - // + try { + if (reader != null) { + reader.close(); + } + if (writer != null) { + writer.close(); + } + } catch (IOException ignored) { + // } } System.exit(0); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index 6566732ac8..0b49fb1d3f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -18,7 +18,8 @@ ~ under the License. --> - + android-plugin @@ -52,7 +53,8 @@ org.wso2.carbon.device.mgt.mobile.android.emulator ${project.version} true - ${project.basedir}/src/main/resources/android-tryit/ + ${project.basedir}/src/main/resources/android-tryit/ + JavaApp.jar @@ -68,7 +70,7 @@ process-resources - + From 11774f5f8bca7caeb20f62e86d3bafb2f0f826c9 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 17:53:30 +0530 Subject: [PATCH 48/64] changing version --- .../org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml | 2 +- components/mobile-plugins/android-plugin/pom.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml index be89740f08..911a6d4832 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -23,7 +23,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.2-SNAPSHOT + 4.0.5-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml index 8155623577..2a25629ff0 100644 --- a/components/mobile-plugins/android-plugin/pom.xml +++ b/components/mobile-plugins/android-plugin/pom.xml @@ -17,7 +17,8 @@ ~ under the License. --> - + org.wso2.carbon.devicemgt-plugins From dbe38202902b7c702e596910312a65656e87a56d Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 22:53:31 +0530 Subject: [PATCH 49/64] changing file permissions --- .../build.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml index f9445ccaf4..44c3b0fc35 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml @@ -24,14 +24,16 @@ - + - - - - + + + + From 3fec4edf90f877fef410c525b960013b2ea8776f Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 21 Jun 2017 23:13:58 +0530 Subject: [PATCH 50/64] adding warn messages --- .../src/main/java/org.carbon.android.emulator/TryIt.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 79edf52d9c..a45d56b1d5 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -105,8 +105,10 @@ public class TryIt { Process startShell = startShellProcessBuilder.start(); System.out.println("Connected to device shell"); startShell.waitFor(); - } catch (IOException | InterruptedException ignored) { - // script can continue without this process + } catch (IOException e) { + tryIt.handleException("Unable to start the shell", e); + } catch (InterruptedException ignored) { + // } System.out.println("\nGood Bye!"); } From 6edc54b9408fce1a45eaf1aa1ea4080fbb90b005 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 22 Jun 2017 06:50:28 +0530 Subject: [PATCH 51/64] updated version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19ec72a394..c3e8887eb0 100644 --- a/pom.xml +++ b/pom.xml @@ -1153,7 +1153,7 @@ 1.2.25 - 4.0.4 + 4.0.5-SNAPSHOT 4.4.8 From 6aba44e6c79b32ae11cc089f385e5e7c2cb5c137 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 13:33:45 +0530 Subject: [PATCH 52/64] Chnage in download Artifacts method --- .../org.carbon.android.emulator/TryIt.java | 86 ++++++++++++------- 1 file changed, 54 insertions(+), 32 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index a45d56b1d5..d33f8d4a32 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -30,12 +30,14 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLConnection; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; +import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Enumeration; import java.util.Scanner; @@ -113,52 +115,72 @@ public class TryIt { System.out.println("\nGood Bye!"); } - /** - * This method is called when then is an error in getting system properties - * - * @param error - system property name - */ - private void sysPropertyError(String error) { - System.out.println("Unable to get the " + error + " of your system"); - System.exit(1); - } /** - * This method downloads the files. + * This method downloads the artifacts from remote url. * - * @param path - the URL to download from. - * @param folderName - the folder location to download the files to. + * @param remotePath - remote url + * @param localPath - local path to download */ - private void downloadArtifacts(String path, String folderName) { - ReadableByteChannel readableByteChannel = null; - FileOutputStream fileOutputStream = null; + private void downloadArtifacts(String remotePath, String localPath) { + BufferedInputStream in = null; + FileOutputStream out = null; + long startingTime = System.currentTimeMillis(); + try { - URL url = new URL(path); - readableByteChannel = Channels.newChannel(url.openStream()); - fileOutputStream = new FileOutputStream(folderName); - fileOutputStream.getChannel().transferFrom(readableByteChannel, 0, Long.MAX_VALUE); + URL url = new URL(remotePath); + URLConnection conn = url.openConnection(); + int size = conn.getContentLength(); + in = new BufferedInputStream(url.openStream()); + out = new FileOutputStream(localPath); + byte data[] = new byte[1024]; + int count; + double sumCount = 0.0; + + while ((count = in.read(data, 0, 1024)) != -1) { + out.write(data, 0, count); + sumCount += count; + if ((size > 0 && (System.currentTimeMillis() - startingTime > 5000)) + || (sumCount / size * 100.0) == 100) { + System.out.println("Downloading: " + + new DecimalFormat("#.##").format((sumCount / size * 100.0)) + " %"); + startingTime = System.currentTimeMillis(); + } + } } catch (MalformedURLException e) { - System.out.println("Error in download URL of " + folderName); - System.out.println("URL provided " + path); + System.out.println("Error in download URL of " + localPath); + System.out.println("URL provided " + remotePath); } catch (IOException e) { - if (!new File(folderName).delete()) { - System.out.println("Delete " + folderName + " and try again"); + if (!new File(localPath).delete()) { + System.out.println("Delete " + localPath + " and try again"); } - handleException("Downloading " + folderName + " failed.", e); + handleException("Downloading " + localPath + " failed.", e); } finally { - try { - if (fileOutputStream != null) { - fileOutputStream.close(); + if (in != null) + try { + in.close(); + } catch (IOException ignored) { + // } - if (readableByteChannel != null) { - readableByteChannel.close(); + if (out != null) + try { + out.close(); + } catch (IOException ignored) { + // } - } catch (IOException ignored) { - // Exception in finally block - } } } + /** + * This method is called when then is an error in getting system properties + * + * @param error - system property name + */ + private void sysPropertyError(String error) { + System.out.println("Unable to get the " + error + " of your system"); + System.exit(1); + } + /** * This method validates the Android SDK location provided by the user and write it to the file * sdkConfigFile. From 44e667d8140ed38b1c00ba33233607ec557d0ae8 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 13:34:46 +0530 Subject: [PATCH 53/64] creating ant directory in target --- .../src/assembly/src.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml index ff67664da0..d66b520d51 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/assembly/src.xml @@ -46,9 +46,10 @@ - ${basedir}/target/android-tryit.ZIP + ${basedir}/target/ant/android-tryit.ZIP - /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ + /devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/assets/ + 755 From 558cb57815ee1ba682a390c07c084f48bfd66b14 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 13:35:30 +0530 Subject: [PATCH 54/64] adding file permissions --- .../org.wso2.carbon.device.mgt.mobile.android.ui/build.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml index 44c3b0fc35..9e77106039 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/build.xml @@ -20,7 +20,7 @@ - + @@ -31,7 +31,9 @@ - + From da6d525d25e66d0244febbf43cd74cdc733acf6a Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 13:36:18 +0530 Subject: [PATCH 55/64] copying jar file to target directory --- .../org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index 0b49fb1d3f..a320af3b26 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -41,8 +41,8 @@ maven-dependency-plugin - EmulatorJava.jar - process-resources + copy-jar + package copy @@ -53,7 +53,7 @@ org.wso2.carbon.device.mgt.mobile.android.emulator ${project.version} true - ${project.basedir}/src/main/resources/android-tryit/ + ${project.basedir}/target/ JavaApp.jar @@ -67,7 +67,7 @@ ${maven-antrun-plugin.version} - process-resources + package From 1f07327d69839a31095fee92f6081fc5f6064be7 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 15:05:50 +0530 Subject: [PATCH 56/64] Adding maven-jar-plugin --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index f1bf59f9f8..dee2613d7a 100644 --- a/pom.xml +++ b/pom.xml @@ -1385,6 +1385,11 @@ maven-war-plugin 2.2 + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + From 73a0176c3a944143f9cad40b87d00e3d07f40480 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 15:06:16 +0530 Subject: [PATCH 57/64] removind version --- .../org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml index 911a6d4832..5d2cd15f46 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -39,7 +39,6 @@ org.apache.maven.plugins maven-jar-plugin - 3.0.2 From fe342b6eb32dc30ef488236f90cf7c42de885df8 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 15:06:36 +0530 Subject: [PATCH 58/64] Adding correction --- .../org.carbon.android.emulator/TryIt.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index d33f8d4a32..98fe694202 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -31,8 +31,6 @@ import java.io.Writer; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.nio.channels.Channels; -import java.nio.channels.ReadableByteChannel; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; @@ -65,17 +63,19 @@ public class TryIt { * This method gets the system specific variables. */ private TryIt() { - osSuffix = System.getProperty(Constants.OS_NAME_PROPERTY).toLowerCase(); + osSuffix = System.getProperty(Constants.OS_NAME_PROPERTY); if (osSuffix == null) { - sysPropertyError("OS NAME"); + sysPropertyError(Constants.OS_NAME_PROPERTY, "OS Name"); + } else { + osSuffix = osSuffix.toLowerCase(); } userHome = System.getProperty(Constants.USER_HOME_PROPERTY); if (userHome == null) { - sysPropertyError("Home Directory"); + sysPropertyError(Constants.USER_HOME_PROPERTY, "Home Directory"); } workingDirectory = System.getProperty(Constants.USER_DIRECTORY_PROPERTY); if (workingDirectory == null) { - sysPropertyError("Current Working Directory"); + sysPropertyError(Constants.USER_DIRECTORY_PROPERTY, "Current Working Directory"); } if (osSuffix.contains(Constants.WINDOWS_OS)) { osSuffix = Constants.WINDOWS_OS; @@ -174,10 +174,11 @@ public class TryIt { /** * This method is called when then is an error in getting system properties * - * @param error - system property name + * @param property -property type + * @param hint - property name */ - private void sysPropertyError(String error) { - System.out.println("Unable to get the " + error + " of your system"); + private void sysPropertyError(String property, String hint) { + System.out.println("Unable to get the" + property + "property of your system (" + hint + ")"); System.exit(1); } @@ -445,7 +446,7 @@ public class TryIt { */ private void makeDirectoryError(String name, String location) { System.out.println("Unable to make folder named " + name + " in " + location); - System.exit(0); + System.exit(1); } /** @@ -815,8 +816,10 @@ public class TryIt { private void setExecutePermission(String fileName) { if (!new File(fileName).canExecute()) { if (!new File(fileName).setExecutable(true)) { - System.out.println("Set the Execute permission of : " + fileName + " to continue"); - System.exit(0); // if can't execute, unable to proceed + System.out.println("Unable to set the execute permission of : " + fileName); + System.out.println("Please set the executable permission for file " + + new File(fileName).getAbsolutePath() + " to continue"); + System.exit(1); // if can't execute, unable to proceed } } } From e49e57beb3636ec2b492b8094af0416a8a015060 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 15:10:53 +0530 Subject: [PATCH 59/64] formatting issue --- pom.xml | 113 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/pom.xml b/pom.xml index dee2613d7a..ca9178e49b 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,8 @@ ~ under the License. --> - + 4.0.0 org.wso2.carbon.devicemgt-plugins @@ -355,11 +356,11 @@ org.wso2.carbon.event.output.adapter.core ${carbon.analytics.common.version} - - org.wso2.carbon.analytics-common - org.wso2.carbon.event.input.adapter.wso2event - ${carbon.analytics.common.version} - + + org.wso2.carbon.analytics-common + org.wso2.carbon.event.input.adapter.wso2event + ${carbon.analytics.common.version} + org.wso2.carbon.analytics-common org.wso2.carbon.event.input.adapter.core @@ -370,21 +371,21 @@ org.wso2.carbon.databridge.commons ${carbon.analytics.common.version} - - org.wso2.carbon.analytics-common - org.wso2.carbon.databridge.commons.thrift - ${carbon.analytics.common.version} - - - org.wso2.carbon.analytics-common - org.wso2.carbon.databridge.commons.binary - ${carbon.analytics.common.version} - - - org.wso2.carbon.analytics-common - org.wso2.carbon.databridge.core - ${carbon.analytics.common.version} - + + org.wso2.carbon.analytics-common + org.wso2.carbon.databridge.commons.thrift + ${carbon.analytics.common.version} + + + org.wso2.carbon.analytics-common + org.wso2.carbon.databridge.commons.binary + ${carbon.analytics.common.version} + + + org.wso2.carbon.analytics-common + org.wso2.carbon.databridge.core + ${carbon.analytics.common.version} + org.wso2.carbon.analytics org.wso2.carbon.analytics.api @@ -407,11 +408,11 @@ org.wso2.carbon.device.mgt.output.adapter.mqtt ${carbon.devicemgt.plugins.version} - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.input.adapter.thrift - ${carbon.devicemgt.plugins.version} - + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.input.adapter.thrift + ${carbon.devicemgt.plugins.version} + org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.output.adapter.xmpp @@ -543,16 +544,16 @@ org.wso2.carbon.appmgt org.wso2.carbon.appmgt.mobile ${carbon.appmgt.version} - - - org.apache.ws.commons.axiom - axiom-api - - - org.apache.ws.commons.axiom - axiom-impl - - + + + org.apache.ws.commons.axiom + axiom-api + + + org.apache.ws.commons.axiom + axiom-impl + + @@ -813,11 +814,11 @@ commons-httpclient ${orbit.version.commons-httpclient} - - commons-codec.wso2 - commons-codec - ${commons-codec.version.wso2} - + + commons-codec.wso2 + commons-codec + ${commons-codec.version.wso2} + commons-codec commons-codec @@ -978,11 +979,11 @@ ${identity.inbound.auth.oauth.version} provided - - org.wso2.carbon.identity.carbon.auth.jwt - org.wso2.carbon.identity.authenticator.signedjwt - ${identity.carbon.auth.jwt.version} - + + org.wso2.carbon.identity.carbon.auth.jwt + org.wso2.carbon.identity.authenticator.signedjwt + ${identity.carbon.auth.jwt.version} + org.apache.httpcomponents.wso2 httpcore @@ -1076,11 +1077,11 @@ feign-gson ${io.github.openfeign.version} - - io.github.openfeign - feign-slf4j - ${io.github.openfeign.version} - + + io.github.openfeign + feign-slf4j + ${io.github.openfeign.version} + @@ -1161,7 +1162,7 @@ 5.6.89 5.3.1 [5.2.0, 6.0.0) - 5.1.2 + 5.1.2 4.6.1 @@ -1228,7 +1229,7 @@ 3.0.0.wso2v1 (3.0.0, 4.0.0] - [2.0.0,4.0.0) + [2.0.0,4.0.0) 0.9.1 1.1.wso2v1 3.2.2 @@ -1386,9 +1387,9 @@ 2.2 - org.apache.maven.plugins - maven-jar-plugin - 3.0.2 + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 From f141836cbabf283154840be9299e97caf04c3f7e Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Thu, 22 Jun 2017 15:14:04 +0530 Subject: [PATCH 60/64] adding space in print ln --- .../src/main/java/org.carbon.android.emulator/TryIt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 98fe694202..51ee83acf1 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -178,7 +178,7 @@ public class TryIt { * @param hint - property name */ private void sysPropertyError(String property, String hint) { - System.out.println("Unable to get the" + property + "property of your system (" + hint + ")"); + System.out.println("Unable to get the " + property + " property of your system (" + hint + ")"); System.exit(1); } From da21efe9be220e84747f463846ea417572e87eca Mon Sep 17 00:00:00 2001 From: dunithd Date: Thu, 22 Jun 2017 16:51:19 +0530 Subject: [PATCH 61/64] Adding new UX design for Raspberry Pi device details page. --- .../device-view.hbs | 80 +++++++------------ .../device-view.hbs | 38 ++++----- .../device-view.hbs | 30 +++---- 3 files changed, 66 insertions(+), 82 deletions(-) diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs index 8f77b561b1..86e3452351 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs @@ -24,15 +24,38 @@ {{/zone}} {{#zone "device-thumbnail"}} - + +{{/zone}} + +{{#zone "device-details-header"}} +

+ {{device.enrolmentInfo.owner}}'s {{device.name}} + + + +

+

Ownership - {{device.enrolmentInfo.ownership}}

+

Device is + + {{#equal device.enrolmentInfo.status "ACTIVE"}}Active{{/equal}} + {{#equal device.enrolmentInfo.status "INACTIVE"}}Inactive{{/equal}} + {{#equal device.enrolmentInfo.status "BLOCKED"}}Blocked{{/equal}} + {{#equal device.enrolmentInfo.status "REMOVED"}}Removed{{/equal}} + {{#equal device.enrolmentInfo.status "UNREACHABLE"}}Unreachable{{/equal}} + +

{{/zone}} {{#zone "device-opetations"}} -
- Operations -
-
- {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams +
+
+

Device Operations

+
+ {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams encodedFeaturePayloads=encodedFeaturePayloads}}
{{/zone}} @@ -42,10 +65,6 @@ data-toggle="tab" aria-controls="device_statistics">Device Statistics -
  • Operations Log
  • -
  • Map
  • {{/zone}} {{#zone "device-view-tab-contents"}} @@ -54,43 +73,4 @@
    Device Statistics
    {{unit "cdmf.unit.device.type.raspberrypi.realtime.analytics-view" device=device}}
    -
    -
    Operations Log
    -
    - -
    -
    - Not available yet -
    -
    -
    -
    -
    - -{{/zone}} \ No newline at end of file +{{/zone}} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 09121c01f9..a9cb25acba 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -50,25 +50,27 @@ {{/zone}} {{#zone "device-details"}} - {{#if device.deviceInfoAvailable}} - {{#if device.BatteryLevel}} -

    {{device.BatteryLevel.value}}%

    - {{/if}} - {{#if device.ramUsage}} -

    {{device.ramUsage.value}}%

    - {{/if}} - {{#if device.internalMemory}} -

    {{device.internalMemory.usage}} - GB/{{device.internalMemory.total}}GB

    - {{/if}} - {{#if device.externalMemory}} -

    {{device.externalMemory.usage}} - GB/{{device.externalMemory.total}}GB

    +
    + {{#if device.deviceInfoAvailable}} + {{#if device.BatteryLevel}} +

    {{device.BatteryLevel.value}}%

    + {{/if}} + {{#if device.ramUsage}} +

    {{device.ramUsage.value}}%

    + {{/if}} + {{#if device.internalMemory}} +

    {{device.internalMemory.usage}} + GB/{{device.internalMemory.total}}GB

    + {{/if}} + {{#if device.externalMemory}} +

    {{device.externalMemory.usage}} + GB/{{device.externalMemory.total}}GB

    + {{/if}} + {{else}} +

    Battery, RAM and Storage related information are not + available yet.

    {{/if}} - {{else}} -

    Battery, RAM and Storage related information are not - available yet.

    - {{/if}} +
    {{/zone}} {{#zone "device-details-tab-injected"}} diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs index 35eac61145..1fb4ef3203 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs @@ -52,21 +52,23 @@ {{/zone}} {{#zone "device-details"}} - {{#if device.deviceInfoAvailable}} - {{#if device.BatteryLevel}} -

    {{device.BatteryLevel.value}}%

    +
    + {{#if device.deviceInfoAvailable}} + {{#if device.BatteryLevel}} +

    {{device.BatteryLevel.value}}%

    + {{/if}} + {{#if device.ramUsage}} +

    {{device.ramUsage.value}} MB

    + {{/if}} + {{#if device.internalMemory}} +

    {{device.internalMemory.value}} GB +

    + {{/if}} + {{else}} +

    Battery, RAM and Storage related information are not + available yet.

    {{/if}} - {{#if device.ramUsage}} -

    {{device.ramUsage.value}} MB

    - {{/if}} - {{#if device.internalMemory}} -

    {{device.internalMemory.value}} GB -

    - {{/if}} - {{else}} -

    Battery, RAM and Storage related information are not - available yet.

    - {{/if}} +
    {{/zone}} {{#zone "device-details-tab-injected"}} From 15bfa09a84f7d4d21ba08c46242a16ff03087062 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 22 Jun 2017 20:37:19 +0530 Subject: [PATCH 62/64] fixed commit issues --- .../internal/PullNotificationListenerServiceComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java index 7e94759154..78e918ec73 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java @@ -54,7 +54,7 @@ public class PullNotificationListenerServiceComponent { try { //Do nothing if (log.isDebugEnabled()) { - log.debug("pull notification provider implementation bundle has been successfully " + + log.debug("Pull notification provider implementation bundle has been successfully " + "initialized"); } BundleContext bundleContext = componentContext.getBundleContext(); From 5888a5321acd444d9c9fe08779c5ff48d31fccd6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Jun 2017 21:03:24 +0530 Subject: [PATCH 63/64] [WSO2 Release] [Jenkins #2792] [Release 4.0.5] prepare release v4.0.5 --- .../org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.analytics/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.iot.geo.dashboard/pom.xml | 2 +- components/analytics/iot-analytics/pom.xml | 2 +- components/analytics/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-types/androidsense-plugin/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml | 2 +- components/device-types/arduino-plugin/pom.xml | 2 +- components/device-types/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-types/raspberrypi-plugin/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../device-types/virtual-fire-alarm-plugin/pom.xml | 2 +- .../org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml | 2 +- .../org.wso2.carbon.appmgt.mdm.restconnector/pom.xml | 2 +- components/extensions/appm-connector/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/extensions/cdmf-transport-adapters/pom.xml | 2 +- .../pom.xml | 2 +- components/extensions/mb-extensions/pom.xml | 2 +- components/extensions/pom.xml | 2 +- .../pom.xml | 2 +- .../extensions/pull-notification-listeners/pom.xml | 2 +- .../org.wso2.extension.siddhi.execution.json/pom.xml | 2 +- .../org.wso2.gpl.siddhi.extension.geo.script/pom.xml | 2 +- components/extensions/siddhi-extensions/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 6 ++---- .../org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml | 9 ++++----- .../org.wso2.carbon.device.mgt.mobile.android/pom.xml | 2 +- components/mobile-plugins/android-plugin/pom.xml | 5 ++--- components/mobile-plugins/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.mobile.windows/pom.xml | 2 +- components/mobile-plugins/windows-plugin/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.iot.geo.dashboard.feature/pom.xml | 2 +- features/analytics-feature/pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../androidsense-plugin-feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../device-types-feature/arduino-plugin-feature/pom.xml | 2 +- features/device-types-feature/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../raspberrypi-plugin-feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../virtual-fire-alarm-plugin-feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 6 +++--- .../pom.xml | 6 +++--- .../org.wso2.carbon.device.mgt.adapter.feature/pom.xml | 4 ++-- .../pom.xml | 8 +++----- .../pom.xml | 4 ++-- .../pom.xml | 2 +- features/extensions-feature/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../android-plugin-feature/pom.xml | 4 ++-- features/mobile-plugins-feature/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../windows-plugin-feature/pom.xml | 4 ++-- pom.xml | 9 ++++----- 92 files changed, 121 insertions(+), 128 deletions(-) diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml index b182b174dc..a2ebf9dab5 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml index 1f00c0db25..d14eb1120e 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml index 03f6142d6f..d1487b9197 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml index 03aab39d0a..1455793bbc 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/analytics/iot-analytics/pom.xml b/components/analytics/iot-analytics/pom.xml index 28cd2f8f2f..23065d4901 100644 --- a/components/analytics/iot-analytics/pom.xml +++ b/components/analytics/iot-analytics/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins analytics - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/analytics/pom.xml b/components/analytics/pom.xml index 990f9dee8a..abae8a01a9 100644 --- a/components/analytics/pom.xml +++ b/components/analytics/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml index 91dd779e2c..738d096190 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml @@ -21,7 +21,7 @@ androidsense-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml index 328d2777f9..a7e359fd2b 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml @@ -3,7 +3,7 @@ androidsense-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml index 500f2a0ed8..9d8e867caf 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml @@ -22,7 +22,7 @@ androidsense-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/androidsense-plugin/pom.xml b/components/device-types/androidsense-plugin/pom.xml index ef15cfc30c..f51ec43f3e 100644 --- a/components/device-types/androidsense-plugin/pom.xml +++ b/components/device-types/androidsense-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml index fcf4426ada..fcab682746 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml @@ -21,7 +21,7 @@ arduino-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml index cdb54644e1..d9dd64ad43 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml @@ -21,7 +21,7 @@ arduino-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml index 33c3c19a83..7d4ee69eee 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml @@ -23,7 +23,7 @@ arduino-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/arduino-plugin/pom.xml b/components/device-types/arduino-plugin/pom.xml index 41d0e17a44..fbb717a01a 100644 --- a/components/device-types/arduino-plugin/pom.xml +++ b/components/device-types/arduino-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/pom.xml b/components/device-types/pom.xml index 73cb801c2e..52996afa2c 100644 --- a/components/device-types/pom.xml +++ b/components/device-types/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml index 811b4bebdc..c654e04d5e 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml @@ -21,7 +21,7 @@ raspberrypi-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml index 5d00e95c07..a51170d67c 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml @@ -21,7 +21,7 @@ raspberrypi-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml index 6b370f3f4b..6d25c05277 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml @@ -23,7 +23,7 @@ raspberrypi-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/raspberrypi-plugin/pom.xml b/components/device-types/raspberrypi-plugin/pom.xml index 6e527c6928..87bd578d39 100644 --- a/components/device-types/raspberrypi-plugin/pom.xml +++ b/components/device-types/raspberrypi-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml index 998cc96380..13ac31a89a 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml index 0ac8859bb3..d5e87551e1 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml index 74dc70f71c..6b639b74b5 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml index ff8f2492ce..5b85b07280 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml index b56d3e95ff..1aae20705a 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/pom.xml b/components/device-types/virtual-fire-alarm-plugin/pom.xml index 7a9c7b6320..b54ae9a516 100644 --- a/components/device-types/virtual-fire-alarm-plugin/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml index 4a37dea9b8..a5d65c45f4 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml @@ -18,7 +18,7 @@ org.wso2.carbon.devicemgt-plugins appm-connector - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml index 5fd529a941..74e0513e5e 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml @@ -18,7 +18,7 @@ org.wso2.carbon.devicemgt-plugins appm-connector - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/appm-connector/pom.xml b/components/extensions/appm-connector/pom.xml index 3accbfaafc..7dc1b5e6f2 100644 --- a/components/extensions/appm-connector/pom.xml +++ b/components/extensions/appm-connector/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml index be6295fb5e..71fae350b7 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml index ebc40e752f..ad4e5b7d1b 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml index 589c8c7032..9aee4bcced 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml index 5de0150af7..c7b809c77c 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml index d70eefa03e..32b564b868 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml index 7d6701812e..1580b554ca 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml index 4c08c7c1f3..782b86c93c 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml index ee36826b20..338ddf9549 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml index 5a5003ba27..4712f700ce 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/pom.xml b/components/extensions/cdmf-transport-adapters/pom.xml index fcac8fa288..b88d70b529 100644 --- a/components/extensions/cdmf-transport-adapters/pom.xml +++ b/components/extensions/cdmf-transport-adapters/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml index e44c5e3370..a2c24098e3 100644 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mb-extensions - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/mb-extensions/pom.xml b/components/extensions/mb-extensions/pom.xml index df960d7972..d33df6da51 100644 --- a/components/extensions/mb-extensions/pom.xml +++ b/components/extensions/mb-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/pom.xml b/components/extensions/pom.xml index ee8f5730a9..ddb010d7d3 100644 --- a/components/extensions/pom.xml +++ b/components/extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml index fad4b84173..03ae055e1d 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins pull-notification-listeners - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/pull-notification-listeners/pom.xml b/components/extensions/pull-notification-listeners/pom.xml index 173a5bde7c..2fa938154b 100644 --- a/components/extensions/pull-notification-listeners/pom.xml +++ b/components/extensions/pull-notification-listeners/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 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 6429bada74..2ba7d3f6b5 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 - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml index 276fb5aa05..77139b585a 100644 --- a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins siddhi-extensions - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/extensions/siddhi-extensions/pom.xml b/components/extensions/siddhi-extensions/pom.xml index 1d9f4df8c0..5154ab8e0c 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 - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml index 7e37488fad..fc2f68c0f1 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml @@ -21,7 +21,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml index 5d2cd15f46..d2556e2a1a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -17,13 +17,11 @@ ~ under the License. --> - + android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index a320af3b26..0fe2e1055f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -18,19 +18,18 @@ ~ under the License. --> - + android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.android.ui - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Mobile Android UI pom @@ -70,7 +69,7 @@ package - + 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 d98431db5c..d9ffb2ad8d 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 @@ -22,7 +22,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml index 2a25629ff0..75c1f194cf 100644 --- a/components/mobile-plugins/android-plugin/pom.xml +++ b/components/mobile-plugins/android-plugin/pom.xml @@ -17,13 +17,12 @@ ~ under the License. --> - + org.wso2.carbon.devicemgt-plugins mobile-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/pom.xml b/components/mobile-plugins/pom.xml index e0d01625e9..9ae7ad9996 100644 --- a/components/mobile-plugins/pom.xml +++ b/components/mobile-plugins/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml index 2627a921ea..ba7d32131f 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml @@ -21,7 +21,7 @@ windows-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml index 9793ee3ce0..590a395869 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml @@ -23,13 +23,13 @@ windows-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.windows.ui - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Mobile Windows UI pom diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml index f88797ec25..be3833d4c4 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml @@ -22,7 +22,7 @@ windows-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/components/mobile-plugins/windows-plugin/pom.xml b/components/mobile-plugins/windows-plugin/pom.xml index 086290a69e..934ffb2d52 100644 --- a/components/mobile-plugins/windows-plugin/pom.xml +++ b/components/mobile-plugins/windows-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml index eae803ab1d..001a4b04ba 100644 --- a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml index 0585b1006b..53cac8c9b3 100644 --- a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.analytics.feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - IoT Server Analytics Feature http://wso2.org diff --git a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml index 9975cbfe37..8917d918f9 100644 --- a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.iot.device.statistics.dashboard.feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - IoT Server Analytics Feature http://wso2.org diff --git a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml index c371eee888..c54b4c20a7 100644 --- a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/analytics-feature/pom.xml b/features/analytics-feature/pom.xml index f93e1791bd..4fca8486ec 100644 --- a/features/analytics-feature/pom.xml +++ b/features/analytics-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml index 68f63bb7c7..1a67f711da 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins androidsense-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - IoT Server Android Sense Analytics Feature http://wso2.org diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml index 6309f0ea0b..8339ae3b09 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins androidsense-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.androidsense.backend.feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - IoT Server Android Sense Backend Feature http://wso2.org diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml index 6d9aceab67..36da0188f6 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins androidsense-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.androidsense.ui.feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - IoT Server Android Sense UI Feature http://wso2.org diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml index f1ef0178bd..dfcf4bd9a5 100644 --- a/features/device-types-feature/androidsense-plugin-feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml index 23faea5b89..d3e4cc614d 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins arduino-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml index fda8906d1b..fb6501e669 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins arduino-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml index f1b35cb5cb..479cccacc9 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins arduino-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml index 748366797a..539bf1f3fe 100644 --- a/features/device-types-feature/arduino-plugin-feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/pom.xml b/features/device-types-feature/pom.xml index dce40047e3..55426792e1 100644 --- a/features/device-types-feature/pom.xml +++ b/features/device-types-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 device-types-feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - Device Management IoT Plugins Feature http://wso2.org diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml index 3cdad32be0..93a9ba0435 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins raspberrypi-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml index 4acb6b02e7..714109fa26 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins raspberrypi-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml index 864e555909..d314036adc 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins raspberrypi-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml index 2231a1e25b..8e1379a712 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml index 31b350b676..4db63efa40 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins virtual-fire-alarm-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml index 068e02de50..36db574caf 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins virtual-fire-alarm-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml index f3300092bf..03ccfe3af9 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins virtual-fire-alarm-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml index 3c49b64840..04aa0b2d80 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml index 13be9b3ff3..cdc182296f 100644 --- a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml index 93ad37bf31..423b6d2a41 100644 --- a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml @@ -20,13 +20,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml org.wso2.carbon.appmgt.mdm.osgiconnector.feature pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - App management MDM OSGI Connector http://wso2.org This feature contains the core bundles required for APP management OSGI MDM connection @@ -36,7 +36,7 @@ org.wso2.carbon.devicemgt-plugins org.wso2.carbon.appmgt.mdm.osgiconnector - 4.0.5-SNAPSHOT + 4.0.5 org.apache.ws.commons.axiom diff --git a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml index 738635b5cb..293bdca66f 100644 --- a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml @@ -20,13 +20,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml org.wso2.carbon.appmgt.mdm.restconnector.feature pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - App management MDM REST Connector http://wso2.org This feature contains the core bundles required for APP management MDM REST connection @@ -36,7 +36,7 @@ org.wso2.carbon.devicemgt-plugins org.wso2.carbon.appmgt.mdm.restconnector - 4.0.5-SNAPSHOT + 4.0.5 org.apache.ws.commons.axiom diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml index 98807cd266..ae4d6aa124 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.adapter.feature pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Device Management Adapters Feature http://wso2.org This feature contains the adapter bundles required for IoT Server diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index d9c005eaa7..fa0f642ed6 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -1,18 +1,16 @@ - + org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.notification.listener.feature pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Notification Listener http://wso2.org This feature contains the core bundles required iot core listeners 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 eb65c6650e..2422be5250 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,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml org.wso2.extension.siddhi.execution.json.feature pom - 4.0.5-SNAPSHOT + 4.0.5 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/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml index 0fad7e0f06..903ce7a229 100644 --- a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml +++ b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml index c1308ae651..5f4bab3cd1 100644 --- a/features/extensions-feature/pom.xml +++ b/features/extensions-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 extensions-feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - Device Management Extensions http://wso2.org diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml index 8c3b7c49ff..0f2fadef1b 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt-plugins android-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.android.feature pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Android Device Management Feature http://wso2.org This feature contains the core bundles required for Android Device Management diff --git a/features/mobile-plugins-feature/android-plugin-feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/pom.xml index 4b864eb274..1e98835104 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/pom.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 android-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - Device Management Android Plugin Feature http://wso2.org diff --git a/features/mobile-plugins-feature/pom.xml b/features/mobile-plugins-feature/pom.xml index 10fd3bafa9..5a67ecd439 100644 --- a/features/mobile-plugins-feature/pom.xml +++ b/features/mobile-plugins-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5-SNAPSHOT + 4.0.5 ../../pom.xml 4.0.0 mobile-plugins-feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - Device Management EMM Plugins Feature http://wso2.org diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml index 81733c2d74..847b8a7e3a 100644 --- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt-plugins windows-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.windows.feature pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Windows Device Management Feature http://wso2.org This feature contains the core bundles required for Windows Device Management diff --git a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml index 9ba56524d0..ec1b9e0782 100644 --- a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml +++ b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins-feature - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml 4.0.0 windows-plugin-feature - 4.0.5-SNAPSHOT + 4.0.5 pom WSO2 Carbon - Device Management Windows Plugin Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 5b5c3b2c1d..e4da9c713c 100644 --- a/pom.xml +++ b/pom.xml @@ -17,14 +17,13 @@ ~ under the License. --> - + 4.0.0 org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent pom - 4.0.5-SNAPSHOT + 4.0.5 WSO2 Carbon - Device Management Plugins Parent http://wso2.org WSO2 Carbon - Device Management Plugins Parent @@ -1154,7 +1153,7 @@ 1.2.25 - 4.0.5-SNAPSHOT + 4.0.5 4.4.8 @@ -1281,7 +1280,7 @@ scm:git:https://github.com/wso2/carbon-device-mgt-plugins.git scm:git:https://github.com/wso2/carbon-device-mgt-plugins.git - HEAD + v4.0.5 From ad7b87917f943fcf9711c047e1e4d2875f9bc3b6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Jun 2017 21:03:37 +0530 Subject: [PATCH 64/64] [WSO2 Release] [Jenkins #2792] [Release 4.0.5] prepare for next development iteration --- .../org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.analytics/pom.xml | 2 +- .../org.wso2.carbon.iot.device.statistics.dashboard/pom.xml | 2 +- .../iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml | 2 +- components/analytics/iot-analytics/pom.xml | 2 +- components/analytics/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml | 2 +- components/device-types/androidsense-plugin/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml | 2 +- components/device-types/arduino-plugin/pom.xml | 2 +- components/device-types/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml | 2 +- components/device-types/raspberrypi-plugin/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-types/virtual-fire-alarm-plugin/pom.xml | 2 +- .../org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml | 2 +- .../org.wso2.carbon.appmgt.mdm.restconnector/pom.xml | 2 +- components/extensions/appm-connector/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.input.adapter.http/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml | 2 +- components/extensions/cdmf-transport-adapters/pom.xml | 2 +- .../pom.xml | 2 +- components/extensions/mb-extensions/pom.xml | 2 +- components/extensions/pom.xml | 2 +- .../pom.xml | 2 +- components/extensions/pull-notification-listeners/pom.xml | 2 +- .../org.wso2.extension.siddhi.execution.json/pom.xml | 2 +- .../org.wso2.gpl.siddhi.extension.geo.script/pom.xml | 2 +- components/extensions/siddhi-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.mobile.android.api/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.mobile.android/pom.xml | 2 +- components/mobile-plugins/android-plugin/pom.xml | 2 +- components/mobile-plugins/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.mobile.windows/pom.xml | 2 +- components/mobile-plugins/windows-plugin/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.iot.geo.dashboard.feature/pom.xml | 2 +- features/analytics-feature/pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../androidsense-plugin-feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../device-types-feature/arduino-plugin-feature/pom.xml | 2 +- features/device-types-feature/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../device-types-feature/raspberrypi-plugin-feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../virtual-fire-alarm-plugin-feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 6 +++--- .../pom.xml | 6 +++--- .../org.wso2.carbon.device.mgt.adapter.feature/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 2 +- features/extensions-feature/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../mobile-plugins-feature/android-plugin-feature/pom.xml | 4 ++-- features/mobile-plugins-feature/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../mobile-plugins-feature/windows-plugin-feature/pom.xml | 4 ++-- pom.xml | 6 +++--- 92 files changed, 115 insertions(+), 115 deletions(-) diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml index a2ebf9dab5..739caed699 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml index d14eb1120e..150019817a 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml index d1487b9197..1524e0fdb9 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml index 1455793bbc..4765fa17f2 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/analytics/iot-analytics/pom.xml b/components/analytics/iot-analytics/pom.xml index 23065d4901..eb034227bf 100644 --- a/components/analytics/iot-analytics/pom.xml +++ b/components/analytics/iot-analytics/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins analytics - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/analytics/pom.xml b/components/analytics/pom.xml index abae8a01a9..08358a7e15 100644 --- a/components/analytics/pom.xml +++ b/components/analytics/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml index 738d096190..5595a191aa 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml @@ -21,7 +21,7 @@ androidsense-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml index a7e359fd2b..debfec519b 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml @@ -3,7 +3,7 @@ androidsense-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml index 9d8e867caf..f6980098f0 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml @@ -22,7 +22,7 @@ androidsense-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/androidsense-plugin/pom.xml b/components/device-types/androidsense-plugin/pom.xml index f51ec43f3e..bbc5521918 100644 --- a/components/device-types/androidsense-plugin/pom.xml +++ b/components/device-types/androidsense-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml index fcab682746..ed84a0bd5d 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml @@ -21,7 +21,7 @@ arduino-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml index d9dd64ad43..c9ca951350 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml @@ -21,7 +21,7 @@ arduino-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml index 7d4ee69eee..b8955d8cfc 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml @@ -23,7 +23,7 @@ arduino-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/arduino-plugin/pom.xml b/components/device-types/arduino-plugin/pom.xml index fbb717a01a..30fa5b2377 100644 --- a/components/device-types/arduino-plugin/pom.xml +++ b/components/device-types/arduino-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/pom.xml b/components/device-types/pom.xml index 52996afa2c..8568c665f5 100644 --- a/components/device-types/pom.xml +++ b/components/device-types/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml index c654e04d5e..3d79860bcb 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml @@ -21,7 +21,7 @@ raspberrypi-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml index a51170d67c..0799086cff 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml @@ -21,7 +21,7 @@ raspberrypi-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml index 6d25c05277..dbfa138dbc 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml @@ -23,7 +23,7 @@ raspberrypi-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/raspberrypi-plugin/pom.xml b/components/device-types/raspberrypi-plugin/pom.xml index 87bd578d39..c93f727e0f 100644 --- a/components/device-types/raspberrypi-plugin/pom.xml +++ b/components/device-types/raspberrypi-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml index 13ac31a89a..941bbb01e6 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml index d5e87551e1..ebf41cf451 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml index 6b639b74b5..072e42604a 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml index 5b85b07280..3d676f0ff2 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml index 1aae20705a..caacce023b 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/device-types/virtual-fire-alarm-plugin/pom.xml b/components/device-types/virtual-fire-alarm-plugin/pom.xml index b54ae9a516..411342bdec 100644 --- a/components/device-types/virtual-fire-alarm-plugin/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml index a5d65c45f4..9edf2a65e6 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml @@ -18,7 +18,7 @@ org.wso2.carbon.devicemgt-plugins appm-connector - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml index 74e0513e5e..329c17516e 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml @@ -18,7 +18,7 @@ org.wso2.carbon.devicemgt-plugins appm-connector - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/appm-connector/pom.xml b/components/extensions/appm-connector/pom.xml index 7dc1b5e6f2..b4fc7c9651 100644 --- a/components/extensions/appm-connector/pom.xml +++ b/components/extensions/appm-connector/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml index 71fae350b7..2def4286b3 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml index ad4e5b7d1b..e79987c35b 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml index 9aee4bcced..40e940d98a 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml index c7b809c77c..f6fe3921c6 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml index 32b564b868..62d7c4e9b5 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml index 1580b554ca..34c42719f1 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml index 782b86c93c..596e562722 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml index 338ddf9549..97900d6956 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml index 4712f700ce..0105f6af03 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/pom.xml b/components/extensions/cdmf-transport-adapters/pom.xml index b88d70b529..6912d89967 100644 --- a/components/extensions/cdmf-transport-adapters/pom.xml +++ b/components/extensions/cdmf-transport-adapters/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml index a2c24098e3..b1002faf8c 100644 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mb-extensions - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/mb-extensions/pom.xml b/components/extensions/mb-extensions/pom.xml index d33df6da51..a4b168f26c 100644 --- a/components/extensions/mb-extensions/pom.xml +++ b/components/extensions/mb-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/pom.xml b/components/extensions/pom.xml index ddb010d7d3..9c01c4afd4 100644 --- a/components/extensions/pom.xml +++ b/components/extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml index 03ae055e1d..3da4559f76 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins pull-notification-listeners - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/pull-notification-listeners/pom.xml b/components/extensions/pull-notification-listeners/pom.xml index 2fa938154b..e42998457c 100644 --- a/components/extensions/pull-notification-listeners/pom.xml +++ b/components/extensions/pull-notification-listeners/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 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 2ba7d3f6b5..0d8d747cd2 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 - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml index 77139b585a..122cb6caa7 100644 --- a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins siddhi-extensions - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/extensions/siddhi-extensions/pom.xml b/components/extensions/siddhi-extensions/pom.xml index 5154ab8e0c..bab9054a48 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 - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml index fc2f68c0f1..ad1b587830 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml @@ -21,7 +21,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml index d2556e2a1a..36155b3851 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -21,7 +21,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index 0fe2e1055f..f10a7d2a59 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -23,13 +23,13 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.android.ui - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Mobile Android UI pom 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 d9ffb2ad8d..9a1c330ccb 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 @@ -22,7 +22,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml index 75c1f194cf..9b6da809ae 100644 --- a/components/mobile-plugins/android-plugin/pom.xml +++ b/components/mobile-plugins/android-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/pom.xml b/components/mobile-plugins/pom.xml index 9ae7ad9996..7c0023869e 100644 --- a/components/mobile-plugins/pom.xml +++ b/components/mobile-plugins/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml index ba7d32131f..7cbe7ddab3 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml @@ -21,7 +21,7 @@ windows-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml index 590a395869..6d8a319d8f 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml @@ -23,13 +23,13 @@ windows-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.windows.ui - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Mobile Windows UI pom diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml index be3833d4c4..3a8b4394f3 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml @@ -22,7 +22,7 @@ windows-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/windows-plugin/pom.xml b/components/mobile-plugins/windows-plugin/pom.xml index 934ffb2d52..f89ee1cad6 100644 --- a/components/mobile-plugins/windows-plugin/pom.xml +++ b/components/mobile-plugins/windows-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml index 001a4b04ba..e74e7db881 100644 --- a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml index 53cac8c9b3..bb09440e08 100644 --- a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.analytics.feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - IoT Server Analytics Feature http://wso2.org diff --git a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml index 8917d918f9..86931a4319 100644 --- a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.iot.device.statistics.dashboard.feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - IoT Server Analytics Feature http://wso2.org diff --git a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml index c54b4c20a7..8a3ff09345 100644 --- a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/analytics-feature/pom.xml b/features/analytics-feature/pom.xml index 4fca8486ec..3c2b90592c 100644 --- a/features/analytics-feature/pom.xml +++ b/features/analytics-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml index 1a67f711da..0d0ec74c09 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins androidsense-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - IoT Server Android Sense Analytics Feature http://wso2.org diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml index 8339ae3b09..33e2ff39f0 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins androidsense-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.androidsense.backend.feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - IoT Server Android Sense Backend Feature http://wso2.org diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml index 36da0188f6..417696a29e 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt-plugins androidsense-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.androidsense.ui.feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - IoT Server Android Sense UI Feature http://wso2.org diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml index dfcf4bd9a5..f22637b55c 100644 --- a/features/device-types-feature/androidsense-plugin-feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml index d3e4cc614d..bf14899cb5 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins arduino-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml index fb6501e669..32cd312aba 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins arduino-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml index 479cccacc9..1f8ccef94c 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins arduino-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml index 539bf1f3fe..d12131cdd7 100644 --- a/features/device-types-feature/arduino-plugin-feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/pom.xml b/features/device-types-feature/pom.xml index 55426792e1..767d6a8a07 100644 --- a/features/device-types-feature/pom.xml +++ b/features/device-types-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 device-types-feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - Device Management IoT Plugins Feature http://wso2.org diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml index 93a9ba0435..0a45fdeb54 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins raspberrypi-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml index 714109fa26..7f9aaaf126 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins raspberrypi-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml index d314036adc..abca3b0881 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins raspberrypi-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml index 8e1379a712..5f81762948 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml index 4db63efa40..626689619e 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins virtual-fire-alarm-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml index 36db574caf..8ce9be3d80 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins virtual-fire-alarm-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml index 03ccfe3af9..50186fec77 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins virtual-fire-alarm-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml index 04aa0b2d80..d92d464e13 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins device-types-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml index cdc182296f..b214cb1c3c 100644 --- a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml index 423b6d2a41..1dd76808de 100644 --- a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml @@ -20,13 +20,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml org.wso2.carbon.appmgt.mdm.osgiconnector.feature pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - App management MDM OSGI Connector http://wso2.org This feature contains the core bundles required for APP management OSGI MDM connection @@ -36,7 +36,7 @@ org.wso2.carbon.devicemgt-plugins org.wso2.carbon.appmgt.mdm.osgiconnector - 4.0.5 + 4.0.6-SNAPSHOT org.apache.ws.commons.axiom diff --git a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml index 293bdca66f..ba14121a57 100644 --- a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml @@ -20,13 +20,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml org.wso2.carbon.appmgt.mdm.restconnector.feature pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - App management MDM REST Connector http://wso2.org This feature contains the core bundles required for APP management MDM REST connection @@ -36,7 +36,7 @@ org.wso2.carbon.devicemgt-plugins org.wso2.carbon.appmgt.mdm.restconnector - 4.0.5 + 4.0.6-SNAPSHOT org.apache.ws.commons.axiom diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml index ae4d6aa124..7b594c6cdb 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.adapter.feature pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Device Management Adapters Feature http://wso2.org This feature contains the adapter bundles required for IoT Server diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index fa0f642ed6..5850f7bd1d 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -3,14 +3,14 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.notification.listener.feature pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Notification Listener http://wso2.org This feature contains the core bundles required iot core listeners 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 2422be5250..5e05c66df5 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,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml org.wso2.extension.siddhi.execution.json.feature pom - 4.0.5 + 4.0.6-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/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml index 903ce7a229..cdc28e2583 100644 --- a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml +++ b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml index 5f4bab3cd1..3fa781fffc 100644 --- a/features/extensions-feature/pom.xml +++ b/features/extensions-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 extensions-feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - Device Management Extensions http://wso2.org diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml index 0f2fadef1b..6c3818c77c 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt-plugins android-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.android.feature pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Android Device Management Feature http://wso2.org This feature contains the core bundles required for Android Device Management diff --git a/features/mobile-plugins-feature/android-plugin-feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/pom.xml index 1e98835104..06de43a609 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/pom.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 android-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - Device Management Android Plugin Feature http://wso2.org diff --git a/features/mobile-plugins-feature/pom.xml b/features/mobile-plugins-feature/pom.xml index 5a67ecd439..d17f632e3e 100644 --- a/features/mobile-plugins-feature/pom.xml +++ b/features/mobile-plugins-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 4.0.5 + 4.0.6-SNAPSHOT ../../pom.xml 4.0.0 mobile-plugins-feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - Device Management EMM Plugins Feature http://wso2.org diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml index 847b8a7e3a..b25ac050bd 100644 --- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt-plugins windows-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.mobile.windows.feature pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Windows Device Management Feature http://wso2.org This feature contains the core bundles required for Windows Device Management diff --git a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml index ec1b9e0782..1b94e7af9e 100644 --- a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml +++ b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins-feature - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml 4.0.0 windows-plugin-feature - 4.0.5 + 4.0.6-SNAPSHOT pom WSO2 Carbon - Device Management Windows Plugin Feature http://wso2.org diff --git a/pom.xml b/pom.xml index e4da9c713c..7780334bbc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent pom - 4.0.5 + 4.0.6-SNAPSHOT WSO2 Carbon - Device Management Plugins Parent http://wso2.org WSO2 Carbon - Device Management Plugins Parent @@ -1153,7 +1153,7 @@ 1.2.25 - 4.0.5 + 4.0.6-SNAPSHOT 4.4.8 @@ -1280,7 +1280,7 @@ scm:git:https://github.com/wso2/carbon-device-mgt-plugins.git scm:git:https://github.com/wso2/carbon-device-mgt-plugins.git - v4.0.5 + HEAD