Update build scripts for samples

application-manager-new
charithag 9 years ago
parent 81507dc231
commit d1db123a3f

@ -4,6 +4,7 @@
<property name="sample_type" value="android_sense"/>
<property name="data_source" value="AndroidSenseDM_DB"/>
<property name="package" value="org.wso2.carbon.device.mgt.iot.sample.android.sense"/>
<target name="create-db" depends="clean">
<mkdir dir="${db.dir}"/>
@ -27,13 +28,20 @@
]]>
</insert>
</xmltask>
</target>
<target name="build">
<exec dir="src" executable="sh">
<arg line="-c 'mvn clean install'" />
</exec>
</target>
<target name="deploy" depends="create-db">
<target name="deploy" depends="create-db,build">
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
<copy file="src/${package}.service.impl/target/${sample_type}.war" toDir="${target.webapp.dir}" overwrite="yes"/>
<copy file="src/${package}.plugin.impl/target/${package}.plugin.impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

@ -39,7 +39,8 @@
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
<copy file="src/${package}.service.impl/target/${package}/service/impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy file="src/${package}.service.impl/target/${sample_type}.war" toDir="${target.webapp.dir}" overwrite="yes"/>
<copy file="src/${package}.plugin.impl/target/${package}.plugin.impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

@ -3,6 +3,7 @@
<property name="iot.conf" value="../../repository/conf/iot/iot-config.xml"/>
<property name="target.db.dir" value="../../repository/database"/>
<property name="target.dropins.dir" value="../../repository/components/dropins"/>
<property name="target.webapp.dir" value="../../repository/deployment/server/webapps"/>
<property name="target.sketch.dir" value="../../repository/resources/sketches"/>
<property name="target.unit.dir" value="../../repository/deployment/server/jaggeryapps/iotserver/units"/>
<property name="target.version" value="1.0.0-SNAPSHOT"/>

@ -4,6 +4,7 @@
<property name="sample_type" value="digital_display"/>
<property name="data_source" value="DigitalDisplayDM_DB"/>
<property name="package" value="org.wso2.carbon.device.mgt.iot.sample.digitaldisplay"/>
<target name="create-db" depends="clean">
<mkdir dir="${db.dir}"/>
@ -26,13 +27,20 @@
]]>
</insert>
</xmltask>
</target>
<target name="build">
<exec dir="src" executable="sh">
<arg line="-c 'mvn clean install'" />
</exec>
</target>
<target name="deploy" depends="create-db">
<target name="deploy" depends="create-db,build">
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
<copy file="src/${package}.service.impl/target/${sample_type}.war" toDir="${target.webapp.dir}" overwrite="yes"/>
<copy file="src/${package}.plugin.impl/target/${package}.plugin.impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

@ -4,6 +4,7 @@
<property name="sample_type" value="firealarm"/>
<property name="data_source" value="FireAlarmDM_DB"/>
<property name="package" value="org.wso2.carbon.device.mgt.iot.sample.firealarm"/>
<target name="create-db" depends="clean">
<mkdir dir="${db.dir}"/>
@ -27,13 +28,20 @@
]]>
</insert>
</xmltask>
</target>
<target name="build">
<exec dir="src" executable="sh">
<arg line="-c 'mvn clean install'" />
</exec>
</target>
<target name="deploy" depends="create-db">
<target name="deploy" depends="create-db,build">
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
<copy file="src/${package}.service.impl/target/${sample_type}.war" toDir="${target.webapp.dir}" overwrite="yes"/>
<copy file="src/${package}.plugin.impl/target/${package}.plugin.impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

@ -4,6 +4,7 @@
<property name="sample_type" value="raspberrypi"/>
<property name="data_source" value="RaspberrypiDM_DB"/>
<property name="package" value="org.wso2.carbon.device.mgt.iot.sample.raspberrypi"/>
<target name="create-db" depends="clean">
<mkdir dir="${db.dir}"/>
@ -26,13 +27,20 @@
]]>
</insert>
</xmltask>
</target>
<target name="build">
<exec dir="src" executable="sh">
<arg line="-c 'mvn clean install'" />
</exec>
</target>
<target name="deploy" depends="create-db">
<target name="deploy" depends="create-db,build">
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
<copy file="src/${package}.service.impl/target/${sample_type}.war" toDir="${target.webapp.dir}" overwrite="yes"/>
<copy file="src/${package}.plugin.impl/target/${package}.plugin.impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

@ -4,6 +4,7 @@
<property name="sample_type" value="sensebot"/>
<property name="data_source" value="SensebotDM_DB.h2.db"/>
<property name="package" value="org.wso2.carbon.device.mgt.iot.sample.sensebot"/>
<target name="create-db" depends="clean">
<property name="dbURL" value="jdbc:h2:file:${basedir}/${db.dir}/${data_source};DB_CLOSE_ON_EXIT=FALSE"/>
@ -25,16 +26,23 @@
]]>
</insert>
</xmltask>
</target>
<target name="build">
<exec dir="src" executable="sh">
<arg line="-c 'mvn clean install'" />
</exec>
</target>
<target name="deploy" depends="create-db">
<target name="deploy" depends="create-db,build">
<copy toDir="${target.sketch.dir}/${sample_type}">
<fileset dir="sketch"/>
</copy>
<copy toDir="${target.sketch.dir}/${sample_type}_wifi">
<fileset dir="sketch_wifi"/>
</copy>
<copy file="src/${package}.service.impl/target/${sample_type}.war" toDir="${target.webapp.dir}" overwrite="yes"/>
<copy file="src/${package}.plugin.impl/target/${package}.plugin.impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

Loading…
Cancel
Save