Add sample src build

application-manager-new
charithag 9 years ago
parent 9ee4a09057
commit e642a2634e

@ -410,14 +410,13 @@
<tasks>
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps"/>
<!--Make samples directory for distribution-->
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/samples"/>
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/repository/resources/sketches"/>
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/repository/resources/scripts"/>
<!--Default sample-->
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/statistics"/>
<mkdir dir="target/wso2carbon-core-${carbon.kernel.version}/repository/components/patches"/>
@ -429,9 +428,14 @@
<fileset dir="src/repository/jaggeryapps"/>
</copy>
<!--Copy samples to distribution-->
<copy todir="target/wso2carbon-core-${carbon.kernel.version}/samples"
overwrite="true">
<fileset dir="src/samples"/>
<fileset dir="src/samples">
<exclude name="**/*.iml"/>
<exclude name="**/.DS_Store"/>
<exclude name="**/target/"/>
</fileset>
</copy>
<copy todir="target/wso2carbon-core-${carbon.kernel.version}/repository/resources/sketches"
@ -475,7 +479,7 @@
</goals>
</execution>
<!--Default sample-->
<!--Install default samples-->
<execution>
<id>install_samples</id>
<phase>package</phase>
@ -500,6 +504,7 @@
</copy>
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/arduino/build.xml" toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/arduino/build.xml.disable"/>
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/raspberrypi/build.xml" toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/raspberrypi/build.xml.disable"/>
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/sample_pom.xml" toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/pom.xml" overwrite="true"/>
</tasks>
</configuration>
<goals>

@ -4,6 +4,7 @@
<property name="sample_type" value="arduino"/>
<property name="data_source" value="ArduinoDM_DB"/>
<property name="package" value="org.wso2.carbon.device.mgt.iot.sample.arduino"/>
<target name="create-db" depends="clean">
<mkdir dir="${db.dir}"/>
@ -26,13 +27,19 @@
]]>
</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/${package}/service/impl-${target.version}.jar" toDir="${target.dropins.dir}" overwrite="yes"/>
<copy toDir="${target.unit.dir}/${sample_type}">
<fileset dir="units"/>
</copy>

@ -2,8 +2,10 @@
<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.dropins.dir" value="../../repository/components/dropins"/>
<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"/>
<property name="db.username" value="wso2carbon"/>
<property name="db.password" value="wso2carbon"/>
<property name="db.dir" value="database"/>

Loading…
Cancel
Save