|
|
@ -9,16 +9,28 @@
|
|
|
|
<mkdir dir="${db.dir}"/>
|
|
|
|
<mkdir dir="${db.dir}"/>
|
|
|
|
<property name="dbURL" value="jdbc:h2:file:${basedir}/${db.dir}/${data_source};DB_CLOSE_ON_EXIT=FALSE"/>
|
|
|
|
<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>
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${lib.dir}/h2-database-engine_1.2.140.wso2v3.jar"/>
|
|
|
|
<pathelement location="${lib.dir}/h2-database-engine_1.2.140.wso2v3.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</classpath>
|
|
|
|
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
|
|
|
|
<fileset file="dbscripts/${db.type}_${sample_type}.sql"/>
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="deploy" depends="create-db">
|
|
|
|
<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}">
|
|
|
|
<copy toDir="${target.sketch.dir}/${sample_type}">
|
|
|
|
<fileset dir="sketch"/>
|
|
|
|
<fileset dir="sketch"/>
|
|
|
|
</copy>
|
|
|
|
</copy>
|
|
|
@ -31,6 +43,9 @@
|
|
|
|
<delete file="${target.db.dir}/${data_source}.h2.db"/>
|
|
|
|
<delete file="${target.db.dir}/${data_source}.h2.db"/>
|
|
|
|
<delete dir="${target.sketch.dir}/${sample_type}"/>
|
|
|
|
<delete dir="${target.sketch.dir}/${sample_type}"/>
|
|
|
|
<delete dir="${target.unit.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>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
</project>
|
|
|
|
</project>
|