From a9750a26805127ac899ea222511400b871cacdbf Mon Sep 17 00:00:00 2001 From: GPrathap Date: Tue, 19 Jan 2016 14:11:00 +0530 Subject: [PATCH] added a new maven archetype to generate sample structure of cdmf device type --- .../tools/cdmf-devicetype-archetype/README.md | 25 ++ .../tools/cdmf-devicetype-archetype/pom.xml | 66 +++++ .../META-INF/maven/archetype-metadata.xml | 154 ++++++++++ .../component/agent/pom.xml | 58 ++++ .../agent/src/main/webapp/WEB-INF/web.xml | 23 ++ .../component/agent/src/main/webapp/index.jsp | 22 ++ .../component/controller/pom.xml | 53 ++++ .../webapp/META-INF/webapp-classloading.xml | 34 +++ .../src/main/webapp/WEB-INF/web.xml | 70 +++++ .../component/manager/pom.xml | 61 ++++ .../webapp/META-INF/webapp-classloading.xml | 34 +++ .../manager/src/main/webapp/WEB-INF/web.xml | 70 +++++ .../component/plugin/pom.xml | 68 +++++ .../plugin/internal/ServiceComponent.java | 21 ++ .../archetype-resources/component/pom.xml | 13 + .../feature/analytics/build.xml | 27 ++ .../feature/analytics/pom.xml | 66 +++++ .../feature/feature/pom.xml | 57 ++++ .../resources/agent/deviceConfig.properties | 29 ++ .../main/resources/agent/sketch.properties | 16 ++ .../src/main/resources/build.properties | 18 ++ .../resources/configs/__rootArtifactId__.json | 25 ++ .../resources/configs/__rootArtifactId__.xml | 25 ++ .../__rootArtifactId__-datasources.xml | 46 +++ .../src/main/resources/dbscripts/h2.sql | 4 + .../src/main/resources/dbscripts/mysql.sql | 5 + .../device-view.hbs | 94 ++++++ .../device-view.js | 36 +++ .../device-view.json | 20 ++ .../public/images/thumb.png | Bin 0 -> 5417 bytes .../public/images/thumb.png | Bin 0 -> 5417 bytes .../public/js/download.js | 0 .../type-view.hbs | 267 ++++++++++++++++++ .../type-view.json | 20 ++ .../feature/feature/src/main/resources/p2.inf | 16 ++ .../archetype-resources/feature/pom.xml | 30 ++ .../resources/archetype-resources/pom.xml | 129 +++++++++ .../tools/mdm-android-agent-archetype/pom.xml | 6 +- modules/tools/pom.xml | 11 +- 39 files changed, 1710 insertions(+), 9 deletions(-) create mode 100644 modules/tools/cdmf-devicetype-archetype/README.md create mode 100644 modules/tools/cdmf-devicetype-archetype/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/WEB-INF/web.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/index.jsp create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/META-INF/webapp-classloading.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/WEB-INF/web.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/META-INF/webapp-classloading.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/WEB-INF/web.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__rootArtifactId__/plugin/internal/ServiceComponent.java create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/build.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/deviceConfig.properties create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/sketch.properties create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/build.properties create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.json create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/datasources/__rootArtifactId__-datasources.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/h2.sql create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mysql.sql create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.hbs create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.js create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.json create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/public/images/thumb.png create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/public/images/thumb.png create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/public/js/download.js create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.hbs create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.json create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/p2.inf create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/pom.xml create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/pom.xml diff --git a/modules/tools/cdmf-devicetype-archetype/README.md b/modules/tools/cdmf-devicetype-archetype/README.md new file mode 100644 index 00000000..e9e81d48 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/README.md @@ -0,0 +1,25 @@ +# multi-module-maven-archetype example + + +To create new project + + mvn archetype:generate -DarchetypeCatalog=local + +Then select the cdmf.devicetype:cdmf-devicetype-archetype as new archetype. Then you need to provide groupId, artifactId, version and packaging as shown bellow. + + Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 3 + Define value for property 'groupId': : org.coffeeking + Define value for property 'artifactId': : connectedcup + Define value for property 'version': 1.0-SNAPSHOT: : 1.0.0-SNAPSHOT + Define value for property 'package': org.coffeeking: : + Confirm properties configuration: + groupId: org.coffeeking + artifactId: connectedcup + version: 1.0.0-SNAPSHOT + package: org.coffeeking + Y: : Y + + + + + diff --git a/modules/tools/cdmf-devicetype-archetype/pom.xml b/modules/tools/cdmf-devicetype-archetype/pom.xml new file mode 100644 index 00000000..d9255a41 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/pom.xml @@ -0,0 +1,66 @@ + + + + + org.wso2.iot + wso2cdmf-tools + 1.0.0-SNAPSHOT + ../pom.xml + + 4.0.0 + cdmf.devicetype + cdmf-devicetype-archetype + 1.0.0-SNAPSHOT + Archetype of WSO2 CDMF Device Type + Archetype of WSO2 CDMF Device Type + maven-archetype + + WSO2 Inc. + http://www.wso2.com + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + org.apache.maven.archetype + archetype-packaging + ${archetype.packaging.version} + + + + + + maven-archetype-plugin + ${archetype.plugin.version} + + + + + + 2.4 + 2.4 + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 00000000..e23abc8b --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,154 @@ + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + + src/test/java + + + src/test/resources + + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.xml + + + + src/main/resources + + + src/test/java + + + src/test/resources + + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.xml + + + + src/main/resources + + + src/test/java + + + src/test/resources + + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + + + + src/main/resources + + + src/test/java + + + src/test/resources + + + + + + + + + + + + + build.xml + + + + + + + + src/main/resources + + **/*.xml + **/*.properties + **/*.car + **/*.db + **/*.sql + **/*.png + **/*.json + **/*.js + **/*.inf + **/*.sh + **/*.hbs + + + + + + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/pom.xml new file mode 100644 index 00000000..99a734b2 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/pom.xml @@ -0,0 +1,58 @@ + + + + ${groupId} + component + ${version} + ../pom.xml + + 4.0.0 + ${artifactId} + ${version} + ${artifactId} + + + junit + junit + ${junit.version} + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + + + maven-war-plugin + ${maven-war-plugin.version} + + ${artifactId} + + + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/WEB-INF/web.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..f39e4103 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,23 @@ + + + Sample-Agent-Webapp + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/index.jsp b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/index.jsp new file mode 100644 index 00000000..fa3b38f0 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/agent/src/main/webapp/index.jsp @@ -0,0 +1,22 @@ +<%--/* +* 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. +*/--%> + + +

Hello World!

+ + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/pom.xml new file mode 100644 index 00000000..17fa04be --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/pom.xml @@ -0,0 +1,53 @@ + + + + ${groupId} + component + ${version} + ../pom.xml + + 4.0.0 + ${artifactId} + ${version} + war + ${artifactId} API + http://wso2.com + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + + + maven-war-plugin + ${maven-war-plugin.version} + + ${artifactId} + + + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/META-INF/webapp-classloading.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/META-INF/webapp-classloading.xml new file mode 100644 index 00000000..01f27b48 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/META-INF/webapp-classloading.xml @@ -0,0 +1,34 @@ + + + + + + + + false + + + CXF,Carbon + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/WEB-INF/web.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..5b0899bf --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/controller/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,70 @@ + + + + Sample-Webapp-Controller + + JAX-WS/JAX-RS Endpoint + JAX-WS/JAX-RS Servlet + CXFServlet + + org.apache.cxf.transport.servlet.CXFServlet + + 1 + + + CXFServlet + /* + + + + isAdminService + false + + + doAuthentication + false + + + + + managed-api-enabled + true + + + managed-api-owner + admin + + + + managed-api-context-template + /sampleapp/{version} + + + managed-api-application + sampleapp + + + managed-api-isSecured + true + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/pom.xml new file mode 100644 index 00000000..adfe7878 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/pom.xml @@ -0,0 +1,61 @@ + + + + ${groupId} + component + ${version} + ../pom.xml + + 4.0.0 + ${artifactId} + war + ${version} + ${artifactId} + http://wso2.org + + ${basedir}/src/main/java + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + + + maven-war-plugin + ${maven-war-plugin.version} + + ${artifactId} + + + + + + + ${groupId} + ${project-base-package}.plugin + ${version} + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/META-INF/webapp-classloading.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/META-INF/webapp-classloading.xml new file mode 100644 index 00000000..01f27b48 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/META-INF/webapp-classloading.xml @@ -0,0 +1,34 @@ + + + + + + + + false + + + CXF,Carbon + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/WEB-INF/web.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..ed2e3a26 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/manager/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,70 @@ + + + + Sample-Webapp-Manager + + JAX-WS/JAX-RS Endpoint + JAX-WS/JAX-RS Servlet + CXFServlet + + org.apache.cxf.transport.servlet.CXFServlet + + 1 + + + CXFServlet + /* + + + + isAdminService + false + + + doAuthentication + false + + + + + managed-api-enabled + false + + + managed-api-owner + admin + + + + managed-api-context-template + /sampleapp/{version} + + + managed-api-application + sampleapp + + + managed-api-isSecured + true + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/pom.xml new file mode 100644 index 00000000..6e9e696d --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/pom.xml @@ -0,0 +1,68 @@ + + + + ${groupId} + component + ${version} + ../pom.xml + + 4.0.0 + ${version} + ${artifactId} + bundle + ${artifactId} for CDMF + http://wso2.org + + ${artifactId} + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + + + org.apache.felix + maven-bundle-plugin + ${org.apache.felix.version} + true + + + ${artifactId} + ${artifactId} + ${carbon.iot.device.mgt.version} + IoT Server Impl Bundle + ${package}.${rootArtifactId}.plugin.internal + + + + !${package}.${rootArtifactId}.plugin.internal, + ${package}.${rootArtifactId}.plugin.* + + + + + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__rootArtifactId__/plugin/internal/ServiceComponent.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__rootArtifactId__/plugin/internal/ServiceComponent.java new file mode 100644 index 00000000..f823f7e6 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__rootArtifactId__/plugin/internal/ServiceComponent.java @@ -0,0 +1,21 @@ +package ${package}.${rootArtifactId}.plugin.internal; +/* + * 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. + */ +public class ServiceComponent{ + +} \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/pom.xml new file mode 100644 index 00000000..4028ecf2 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/pom.xml @@ -0,0 +1,13 @@ + + + ${groupId} + ${rootArtifactId} + ${version} + ../pom.xml + + 4.0.0 + ${version} + ${artifactId} + pom + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/build.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/build.xml new file mode 100644 index 00000000..9e3e6168 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/build.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/pom.xml new file mode 100644 index 00000000..7c5799cb --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/analytics/pom.xml @@ -0,0 +1,66 @@ + + + + ${groupId} + feature + ${version} + ../pom.xml + + 4.0.0 + ${artifactId} + ${version} + pom + ${artifactId} + http://wso2.org + + + + maven-clean-plugin + ${maven-clean-plugin.version} + + + auto-clean + initialize + + clean + + + + + + maven-antrun-plugin + ${wso2.maven.compiler.source} + + + process-resources + + + + + + + run + + + + + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/pom.xml new file mode 100644 index 00000000..b659470e --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/pom.xml @@ -0,0 +1,57 @@ + + + + ${groupId} + feature + ${version} + ../pom.xml + + 4.0.0 + ${version} + ${artifactId} + pom + ${project.artifactId} + http://wso2.org + + + ${groupId} + ${project-base-package}.plugin + ${version} + + + ${groupId} + ${project-base-package}.manager + ${version} + war + + + ${groupId} + ${project-base-package}.controller + ${version} + war + + + ${groupId} + ${project-base-package}.agent + ${version} + war + + + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/deviceConfig.properties b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/deviceConfig.properties new file mode 100644 index 00000000..46e92d4b --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/deviceConfig.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +#[Device-Configurations] +owner=${DEVICE_OWNER} +deviceId=${DEVICE_ID} +device-name=${DEVICE_NAME} +controller-context=/digital_display/controller +mqtt-ep=${MQTT_EP} +auth-method=token +auth-token=${DEVICE_TOKEN} +refresh-token=${DEVICE_REFRESH_TOKEN} +push-interval=15 + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/sketch.properties b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/sketch.properties new file mode 100644 index 00000000..77fb5058 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/agent/sketch.properties @@ -0,0 +1,16 @@ +#/* +# * 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. +# */ +templates=deviceConfig.properties +zipfilename=Agent.zip diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/build.properties b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/build.properties new file mode 100644 index 00000000..a7e289bc --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/build.properties @@ -0,0 +1,18 @@ +# +custom = true diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.json b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.json new file mode 100644 index 00000000..eae77b20 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.json @@ -0,0 +1,25 @@ +/* + * 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. + */ +{ + "deviceType": { + "label": "", + "category": "virtual", + }, + "analyticStreams": [ + ] +} \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.xml new file mode 100644 index 00000000..95e326ab --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/configs/__rootArtifactId__.xml @@ -0,0 +1,25 @@ + + + + + + jdbc/device_typeDM_DB + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/datasources/__rootArtifactId__-datasources.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/datasources/__rootArtifactId__-datasources.xml new file mode 100644 index 00000000..96d9b3b4 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/datasources/__rootArtifactId__-datasources.xml @@ -0,0 +1,46 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + ${rootArtifactId}DM_DB + The datasource used for the this device type + + jdbc/device_typeDM_DB + + + + jdbc:h2:repository/database/device_typeDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/h2.sql b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 00000000..fd40910d --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,4 @@ + + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mysql.sql b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 00000000..3f2ff2d6 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,5 @@ + + + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.hbs b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.hbs new file mode 100644 index 00000000..3793cad4 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.hbs @@ -0,0 +1,94 @@ +{{#zone "topCss"}} + +{{/zone}} + +{{#zone "device-thumbnail"}} + +{{/zone}} + +{{#zone "device-opetations"}} +
+ Operations +
+ +{{/zone}} +{{#zone "device-detail-properties"}} +
+ +
+
+ +
+
Device Statistics
+ {{unit "iot.unit.device.stats" device=device}} +
+ +
+
Policy Compliance
+
+ +
+
+ Not available yet +
+
+
+
+
+
+
Operations Log
+
+ +
+
+ Not available yet +
+
+
+
+
+
+
+
+{{/zone}} + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.js b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.js new file mode 100644 index 00000000..a1d45de2 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.js @@ -0,0 +1,36 @@ +/* + * 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. + */ + + +function onRequest(context) { + var log = new Log("detail.js"); + var deviceType = context.uriParams.deviceType; + var deviceId = request.getParameter("id"); + + if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { + var deviceModule = require("/app/modules/device.js").deviceModule; + var device = deviceModule.viewDevice(deviceType, deviceId); + + if (device && device.status != "error") { + log.info(device); + var deviceProperties = device.properties; + device.accessToken = deviceProperties.accessToken + return {"device": device}; + } + } +} \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.json b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.json new file mode 100644 index 00000000..2def3808 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/device-view.json @@ -0,0 +1,20 @@ +/**/ +{ + "version": "1.0.0" +} \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/public/images/thumb.png b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.device-view/public/images/thumb.png new file mode 100644 index 0000000000000000000000000000000000000000..7dda85e4c299a7be0663a27e6b0bc7cd3cf99115 GIT binary patch literal 5417 zcmV+^71rvBP)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_DijopiF$2PET#mZ8eu=y$(ArYkv7@Ex`GL?QCc!_*KFrd&;n1r7 zqW-CFs9&fT)ZaU5gc&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c+((OzD}JXe=)n1zEDg}%b!dMPU%>uDqOdILFwrx z7Guuo`RCd}AKUnPSji-XPMuBV_~ODiQ*--NQ-LeLINIG;n2T~XoM!1Fc)Caa`+*lr9@V|b;&Lv|AQT)+xl2YsE*8Arfoq*Q3pOJ6BU(-* z$ExD*ApI?fybK(Hmr?vxll^Pb*=^u?diWh9@HmZMwa`NS%g7dYeOq^w1MaTzwBcSN z86$Smz4Q!$#S~BI8Ka!MzVS!)3`Y+q0|8vzUr2-t<}MZ%-r_i#2(KJ_F%bA4pbd#} T4l&yC00000NkvXXu0mjf$Q68~ literal 0 HcmV?d00001 diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/public/images/thumb.png b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/public/images/thumb.png new file mode 100644 index 0000000000000000000000000000000000000000..7dda85e4c299a7be0663a27e6b0bc7cd3cf99115 GIT binary patch literal 5417 zcmV+^71rvBP)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bv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g($jC)zd zc+ly*#J+aL6Js5IIq-XkVZEvvhwKL<`s~xHt9-ZJFJr_7v>g8tYM)1hEtSnwpVZU* z+etT6QugHJ^U08(*5$bV(TRrIc+((OzD}JXe=)n1zEDg}%b!dMPU%>uDqOdILFwrx z7Guuo`RCd}AKUnPSji-XPMuBV_~ODiQ*--NQ-LeLINIG;n2T~XoM!1Fc)Caa`+*lr9@V|b;&Lv|AQT)+xl2YsE*8Arfoq*Q3pOJ6BU(-* z$ExD*ApI?fybK(Hmr?vxll^Pb*=^u?diWh9@HmZMwa`NS%g7dYeOq^w1MaTzwBcSN z86$Smz4Q!$#S~BI8Ka!MzVS!)3`Y+q0|8vzUr2-t<}MZ%-r_i#2(KJ_F%bA4pbd#} T4l&yC00000NkvXXu0mjf$Q68~ literal 0 HcmV?d00001 diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/public/js/download.js b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/public/js/download.js new file mode 100644 index 00000000..e69de29b diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.hbs b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.hbs new file mode 100644 index 00000000..85dddee7 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.hbs @@ -0,0 +1,267 @@ + + +
+

Name of your device type

+
+

device type

+
+
+ +
+
+

Ingredients

+
+

Hardware Requirements

+
+
    + +
+
+ + View API   + Create an Instance + +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +

+
+ +
+

Prepare


+

Get your device ready

+
+
    + +
+
+
+ +
+

Schematic Diagram


+

Click on the image to zoom

+
+ +
+
+
+ +
+

Connect (Quick Start)


+

Internet of Things Foundation Quickstart connection

+
+
    + +
+
+
+ + + + + + + +{{#zone "bottomJs"}} + {{js "/js/download.js"}} + {{js "/js/jquery.validate.js"}} +{{/zone}} + + + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.json b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.json new file mode 100644 index 00000000..2def3808 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__rootArtifactId__.type-view/type-view.json @@ -0,0 +1,20 @@ +/**/ +{ + "version": "1.0.0" +} \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/p2.inf b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/p2.inf new file mode 100644 index 00000000..dba0e65d --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/p2.inf @@ -0,0 +1,16 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../conf/device-types/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/configs/,target:${installFolder}/../../conf/device-types/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/sketches/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/sketches/${rootArtifactId}/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/agent/,target:${installFolder}/../../resources/sketches/${rootArtifactId}/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/${rootArtifactId},overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/${package}.${rootArtifactId}_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/pom.xml new file mode 100644 index 00000000..530e9007 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/pom.xml @@ -0,0 +1,30 @@ + + + + ${groupId} + ${rootArtifactId} + ${version} + ../pom.xml + + ${artifactId} + 4.0.0 + pom + ${version} + \ No newline at end of file diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/pom.xml b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 00000000..c5507f72 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,129 @@ + + + ${groupId} + ${artifactId} + ${version} + pom + 4.0.0 + http://wso2.com + + component + feature + + + 1.7 + 1.7 + ${groupId}.${rootArtifactId} + 3.8.1 + 1.0.0 + 1.4.0 + 2.4.1 + 2.3.2 + 2.6 + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + Apache Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + WSO2 Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + gcm-server-repository + GCM Server repository - GitHub + https://github.com/slorber/gcm-server-repository/raw/master/releases/ + + + wso2-staging + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/orgwso2carbonapimgt-174/ + + true + daily + ignore + + + + \ No newline at end of file diff --git a/modules/tools/mdm-android-agent-archetype/pom.xml b/modules/tools/mdm-android-agent-archetype/pom.xml index 733a2689..772ae90f 100644 --- a/modules/tools/mdm-android-agent-archetype/pom.xml +++ b/modules/tools/mdm-android-agent-archetype/pom.xml @@ -21,9 +21,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - org.wso2.mdm - wso2mdm-tools - 2.0.0-SNAPSHOT + org.wso2.iot + wso2cdm-tools + 1.0.0-SNAPSHOT ../pom.xml diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml index 149ed722..86ff9469 100644 --- a/modules/tools/pom.xml +++ b/modules/tools/pom.xml @@ -26,17 +26,16 @@ 1.0.0-SNAPSHOT ../../pom.xml - 4.0.0 - org.wso2.mdm - wso2mdm-tools + org.wso2.iot + wso2cdmf-tools pom - 2.0.0-SNAPSHOT - WSO2 MDM Tools + 1.0.0-SNAPSHOT + WSO2 CDMF Tools http://maven.apache.org - mdm-android-agent-archetype + cdmf-devicetype-archetype