blob: f2dbc55e524d62c117a8ee7800b1796dd0c4fd9d [file] [log] [blame]
Rob Daugherty38f72072018-03-14 02:07:32 -04001<?xml version="1.0" encoding="UTF-8"?>
2<project name="urnMap-plugin" default="deploy.jboss">
3
4 <property file="build.properties" />
5 <property file="${user.home}/.camunda/build.properties" />
6 <property name="target.dir" value="target" />
7
8 <condition property="mvn.executable" value="mvn.bat" else="mvn">
9 <os family="windows"/>
10 </condition>
11
12 <target name="deploy.jboss" depends="package.mvn, install.cockpit.plugin" description="Copies the cockit plugin to the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'" />
13
14 <target name="deploy.tomcat" depends="package.mvn" description="Copies the cockpit plugin to the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
15 <fail unless="deploy.tomcat.dir" message="No deployment folder has been configured. Please copy the file '${basedir}/build.properties.example' to '${basedir}/build.properties' or '${user.home}/.camunda/build.properties' and change it according to your environment." />
16 <copy file="${target.dir}/${ant.project.name}.jar" todir="${deploy.tomcat.dir}/camunda/WEB-INF/lib" />
17 <touch file="${deploy.tomcat.dir}/camunda/WEB-INF/web.xml"/>
18 </target>
19
20 <target name="package.mvn">
21 <exec executable="${mvn.executable}" dir="." failonerror="true">
22 <env key="MAVEN_OPTS" value="-Xmx1024m -Xms512m -DskipTests=true -Dmaven.test.skip=true" />
23 <arg line="clean package" />
24 </exec>
25 </target>
26
27 <target name="install.cockpit.plugin">
28 <fail unless="deploy.jboss.dir" message="No deployment folder has been configured. Please copy the file '${basedir}/build.properties.example' to '${basedir}/build.properties' or '${user.home}/.camunda/build.properties' and change it according to your environment." />
29 <path id="cockpit.file.id">
30 <fileset dir="${deploy.jboss.dir}">
31 <include name="camunda-webapp-*.war"/>
32 </fileset>
33 </path>
34 <property name="cockpit.file" refid="cockpit.file.id"/>
35 <war destfile="${cockpit.file}" update="true">
36 <zipfileset file="${target.dir}/${ant.project.name}.jar" fullpath="WEB-INF/lib/${ant.project.name}.jar" />
37 </war>
38 </target>
39
40 <target name="undeploy.jboss" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
41 <path id="cockpit.file.id">
42 <fileset dir="${deploy.jboss.dir}">
43 <include name="camunda-webapp-*.war"/>
44 </fileset>
45 </path>
46 <property name="cockpit.file" refid="cockpit.file.id"/>
47 <basename property="cockpit.filename" file="${cockpit.file}"/>
48 <move file="${cockpit.file}" todir="${java.io.tmpdir}"/>
49 <zip destfile="${cockpit.file}">
50 <zipfileset src="${java.io.tmpdir}/${cockpit.filename}">
51 <exclude name="WEB-INF/lib/${ant.project.name}.jar"/>
52 </zipfileset>
53 </zip>
54 </target>
55
56 <target name="undeploy.tomcat" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
57 <delete file="${deploy.tomcat.dir}/camunda/WEB-INF/lib/${ant.project.name}.jar" />
58 </target>
59
60</project>