Add iot-configs from samples

application-manager-new
charithag 9 years ago
parent 1dab745cfe
commit fea2d5756e

@ -9,16 +9,28 @@
<mkdir dir="${db.dir}"/>
<property name="dbURL" value="jdbc:h2:file:${basedir}/${db.dir}/${data_source};DB_CLOSE_ON_EXIT=FALSE"/>
<sql driver="org.h2.Driver" url="${dbURL}" userid="${db.username}" password="${db.password}" autocommit="true" onerror="continue">
<sql driver="org.h2.Driver" url="${dbURL}" userid="${db.username}" password="${db.password}" autocommit="true"
onerror="continue">
<classpath>
<pathelement location="${lib.dir}/h2-database-engine_1.2.140.wso2v3.jar"/>
</classpath>
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
</sql>
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<insert path="/IoTDeviceTypeConfigManager[1]">
<![CDATA[
<IotDeviceTypeConfig type="${sample_type}">
<DatasourceName>jdbc/${data_source}</DatasourceName>
</IotDeviceTypeConfig>
]]>
</insert>
</xmltask>
</target>
<target name="deploy" depends="create-db">
<copy file="database/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
@ -31,6 +43,9 @@
<delete file="${target.db.dir}/${data_source}.h2.db"/>
<delete dir="${target.sketch.dir}/${sample_type}"/>
<delete dir="${target.unit.dir}/${sample_type}"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<remove path="/IoTDeviceTypeConfigManager/IotDeviceTypeConfig[type='${sample_type}']"/>
</xmltask>
</target>
</project>

@ -15,10 +15,21 @@
</classpath>
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
</sql>
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<insert path="/IoTDeviceTypeConfigManager[1]">
<![CDATA[
<IotDeviceTypeConfig type="${sample_type}">
<DatasourceName>jdbc/${data_source}</DatasourceName>
</IotDeviceTypeConfig>
]]>
</insert>
</xmltask>
</target>
<target name="deploy" depends="create-db">
<copy file="database/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
@ -31,6 +42,9 @@
<delete file="${target.db.dir}/${data_source}.h2.db"/>
<delete dir="${target.sketch.dir}/${sample_type}"/>
<delete dir="${target.unit.dir}/${sample_type}"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<remove path="/IoTDeviceTypeConfigManager/IotDeviceTypeConfig[type='${sample_type}']"/>
</xmltask>
</target>
</project>

@ -1,5 +1,6 @@
<project>
<property name="lib.dir" value="../../repository/components/plugins"/>
<property name="iot.conf" value="../../repository/conf/iot/iot-config.xml"/>
<property name="target.db.dir" value="../../repository/database"/>
<property name="target.sketch.dir" value="../../repository/resources/sketches"/>
<property name="target.unit.dir" value="../../repository/deployment/server/jaggeryapps/iotserver/units"/>
@ -7,4 +8,11 @@
<property name="db.password" value="wso2carbon"/>
<property name="db.dir" value="database"/>
<property name="db.type" value="h2"/>
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
<classpath>
<pathelement location="../lib/xmltask.jar"/>
</classpath>
</taskdef>
</project>

@ -15,10 +15,21 @@
</classpath>
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
</sql>
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<insert path="/IoTDeviceTypeConfigManager[1]">
<![CDATA[
<IotDeviceTypeConfig type="${sample_type}">
<DatasourceName>jdbc/${data_source}</DatasourceName>
</IotDeviceTypeConfig>
]]>
</insert>
</xmltask>
</target>
<target name="deploy" depends="create-db">
<copy file="database/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>

@ -15,10 +15,22 @@
</classpath>
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
</sql>
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<insert path="/IoTDeviceTypeConfigManager[1]">
<![CDATA[
<IotDeviceTypeConfig type="${sample_type}">
<DatasourceName>jdbc/${data_source}</DatasourceName>
<ApiApplicationName>firealarm</ApiApplicationName>
</IotDeviceTypeConfig>
]]>
</insert>
</xmltask>
</target>
<target name="deploy" depends="create-db">
<copy file="database/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
@ -31,6 +43,9 @@
<delete file="${target.db.dir}/${data_source}.h2.db"/>
<delete dir="${target.sketch.dir}/${sample_type}"/>
<delete dir="${target.unit.dir}/${sample_type}"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<remove path="/IoTDeviceTypeConfigManager/IotDeviceTypeConfig[type='${sample_type}']"/>
</xmltask>
</target>
</project>

@ -15,10 +15,21 @@
</classpath>
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
</sql>
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<insert path="/IoTDeviceTypeConfigManager[1]">
<![CDATA[
<IotDeviceTypeConfig type="${sample_type}">
<DatasourceName>jdbc/${data_source}</DatasourceName>
</IotDeviceTypeConfig>
]]>
</insert>
</xmltask>
</target>
<target name="deploy" depends="create-db">
<copy file="database/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
@ -31,6 +42,9 @@
<delete file="${target.db.dir}/${data_source}.h2.db"/>
<delete dir="${target.sketch.dir}/${sample_type}"/>
<delete dir="${target.unit.dir}/${sample_type}"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<remove path="/IoTDeviceTypeConfigManager/IotDeviceTypeConfig[type='${sample_type}']"/>
</xmltask>
</target>
</project>

@ -14,10 +14,21 @@
</classpath>
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
</sql>
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<insert path="/IoTDeviceTypeConfigManager[1]">
<![CDATA[
<IotDeviceTypeConfig type="${sample_type}">
<DatasourceName>jdbc/${data_source}</DatasourceName>
</IotDeviceTypeConfig>
]]>
</insert>
</xmltask>
</target>
<target name="deploy" depends="create-db">
<copy file="${db.dir}/${data_source}.h2.db" toDir="${target.db.dir}" overwrite="yes"/>
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
@ -34,6 +45,9 @@
<delete dir="${target.sketch.dir}/${sample_type}"/>
<delete dir="${target.sketch.dir}/${sample_type}_wifi"/>
<delete dir="${target.unit.dir}/${sample_type}"/>
<xmltask source="${iot.conf}" dest="${iot.conf}" report="true">
<remove path="/IoTDeviceTypeConfigManager/IotDeviceTypeConfig[type='${sample_type}']"/>
</xmltask>
</target>
</project>
Loading…
Cancel
Save