diff --git a/modules/analytics/distribution/src/assembly/bin.xml b/modules/analytics/distribution/src/assembly/bin.xml index f43229c9..9370e5f5 100644 --- a/modules/analytics/distribution/src/assembly/bin.xml +++ b/modules/analytics/distribution/src/assembly/bin.xml @@ -745,14 +745,14 @@ true 644 - + diff --git a/modules/analytics/distribution/src/assembly/filter.properties b/modules/analytics/distribution/src/assembly/filter.properties index 732714a7..3a658fef 100644 --- a/modules/analytics/distribution/src/assembly/filter.properties +++ b/modules/analytics/distribution/src/assembly/filter.properties @@ -1,7 +1,7 @@ product.name=WSO2 IoT - Analytics -product.version=1.0.0-ALPHA +product.version=1.0.0 product.key=wso2iot-analytics -carbon.product.version=4.4.3 +carbon.product.version=4.4.10 default.server.role=IoTServer cep.server.role=ComplexEventProcessor das.server.role=DataAnalyticsServer diff --git a/modules/analytics/p2-profile-gen/pom.xml b/modules/analytics/p2-profile-gen/pom.xml index a1f87246..73a3b49b 100644 --- a/modules/analytics/p2-profile-gen/pom.xml +++ b/modules/analytics/p2-profile-gen/pom.xml @@ -363,7 +363,7 @@ - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.adapter.feature:${carbon.device.mgt.plugin.version} + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.adapter.feature:${carbon.device.mgt.plugin.version} @@ -762,10 +762,10 @@ - + org.wso2.carbon.identity.jwt.client.extension.feature.group @@ -781,6 +781,7 @@ org.wso2.carbon.analytics.gadget.template.feature.group ${carbon.analytics.common.version} + diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index 248cff55..6c94225b 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -28,11 +28,101 @@ 4.0.0 - wso2iot-distribution-parent + wso2iot pom WSO2 IoT - Distribution Parent WSO2 IoT Distribution Module - - + + + + org.codehaus.mojo + maven-buildnumber-plugin + 0.9.4 + + {0,date,dd MMM yyyy} + + timestamp + + false + false + + + + validate + + create + + + + + + org.apache.maven.plugins + maven-dependency-plugin + false + + + 2-unpack-wso2carbon + package + + unpack + + + + + org.wso2.iot + wso2iot-core + ${product.iot.version} + zip + true + target + + + org.wso2.iot + wso2iot-analytics + ${product.iot.analytics.version} + zip + true + target + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + 1-pre-dist + package + + + attached + + + false + + ${basedir}/src/assembly/dist.xml + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + ${carbon.identity.framework.version} + UTF-8 + + diff --git a/modules/distribution/src/assembly/dist.xml b/modules/distribution/src/assembly/dist.xml new file mode 100644 index 00000000..33945c0a --- /dev/null +++ b/modules/distribution/src/assembly/dist.xml @@ -0,0 +1,50 @@ + + + wso2iot + + zip + + + false + + + + target/wso2iot-core-${product.iot.version}/ + wso2iot-${product.iot.version}/core + + */** + + + + target/wso2iot-analytics-${product.iot.version} + wso2iot-${product.iot.version}/analytics + + */** + + + + src/resources/bin + wso2iot-${product.iot.version}/bin + + */** + + 755 + + + diff --git a/modules/distribution/src/resources/bin/start-all.sh b/modules/distribution/src/resources/bin/start-all.sh new file mode 100644 index 00000000..6bf60277 --- /dev/null +++ b/modules/distribution/src/resources/bin/start-all.sh @@ -0,0 +1,46 @@ +#!/bin/sh +#start-all.sh +# ---------------------------------------------------------------------------- +# Copyright 2005-2012 WSO2, Inc. http://www.wso2.org +# +# 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. + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do +ls=`ls -ld "$PRG"` +link=`expr "$ls" : '.*-> \(.*\)$'` +if expr "$link" : '.*/.*' > /dev/null; then +PRG="$link" +else +PRG=`dirname "$PRG"`/"$link" +fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` + +# Only set CARBON_HOME if not already set +[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` + +sh "$CARBON_HOME/core/bin/wso2server.sh" $* & +sh "$CARBON_HOME/analytics/bin/wso2server.sh" $* & + +trap "sh $CARBON_HOME/bin/stop-all.sh; exit;" SIGINT SIGTERM + +while : +do +sleep 60 +done + diff --git a/modules/distribution/src/resources/bin/stop-all.sh b/modules/distribution/src/resources/bin/stop-all.sh new file mode 100644 index 00000000..79037dc2 --- /dev/null +++ b/modules/distribution/src/resources/bin/stop-all.sh @@ -0,0 +1,39 @@ +#!/bin/sh +#stop-all.sh +# ---------------------------------------------------------------------------- +# Copyright 2016 WSO2, Inc. http://www.wso2.org +# +# 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. + + +PRG="$0" + +while [ -h "$PRG" ]; do +ls=`ls -ld "$PRG"` +link=`expr "$ls" : '.*-> \(.*\)$'` +if expr "$link" : '.*/.*' > /dev/null; then +PRG="$link" +else +PRG=`dirname "$PRG"`/"$link" +fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` + +# Only set CARBON_HOME if not already set +[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` + +sh "$CARBON_HOME/core/bin/wso2server.sh" stop +sh "$CARBON_HOME/analytics/bin/wso2server.sh" stop +exit diff --git a/pom.xml b/pom.xml index 97f75dd0..63002202 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ modules/core modules/analytics + modules/distribution