archetype-resources.build.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camunda-archetype-cockpit-plugin
Show all versions of camunda-archetype-cockpit-plugin
Plugin for Camunda Cockpit, contains REST-Backend, MyBatis database query, HTML and JavaScript frontend
#set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) <?xml version="1.0" encoding="UTF-8"?> <project name="${artifactId}" default="deploy.jboss"> <property file="build.properties" /> <property file="${symbol_dollar}{user.home}/.camunda/build.properties" /> <property name="target.dir" value="target" /> <condition property="mvn.executable" value="mvn.bat" else="mvn"> <os family="windows"/> </condition> <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'" /> <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'"> <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." /> <copy file="${symbol_dollar}{target.dir}/${symbol_dollar}{ant.project.name}.jar" todir="${symbol_dollar}{deploy.tomcat.dir}/camunda/WEB-INF/lib" /> <touch file="${deploy.tomcat.dir}/camunda/WEB-INF/web.xml"/> </target> <target name="package.mvn"> <exec executable="${symbol_dollar}{mvn.executable}" dir="." failonerror="true"> <env key="MAVEN_OPTS" value="-Xmx1024m -Xms512m -DskipTests=true -Dmaven.test.skip=true" /> <arg line="clean package" /> </exec> </target> <target name="install.cockpit.plugin"> <fail unless="deploy.jboss.dir" message="No deployment folder has been configured. Please copy the file '${symbol_dollar}{basedir}/build.properties.example' to '${symbol_dollar}{basedir}/build.properties' or '${symbol_dollar}{user.home}/.camunda/build.properties' and change it according to your environment." /> <path id="cockpit.file.id"> <fileset dir="${symbol_dollar}{deploy.jboss.dir}"> <include name="camunda-webapp-*.war"/> </fileset> </path> <property name="cockpit.file" refid="cockpit.file.id"/> <war destfile="${symbol_dollar}{cockpit.file}" update="true"> <zipfileset file="${symbol_dollar}{target.dir}/${symbol_dollar}{ant.project.name}.jar" fullpath="WEB-INF/lib/${symbol_dollar}{ant.project.name}.jar" /> </war> </target> <target name="undeploy.jboss" description="Deletes the cockpit plugin from the deployment directory defined in '${symbol_dollar}{basedir}/build.properties' or '${symbol_dollar}{user.home}/.camunda/build.properties'"> <path id="cockpit.file.id"> <fileset dir="${symbol_dollar}{deploy.jboss.dir}"> <include name="camunda-webapp-*.war"/> </fileset> </path> <property name="cockpit.file" refid="cockpit.file.id"/> <basename property="cockpit.filename" file="${symbol_dollar}{cockpit.file}"/> <move file="${symbol_dollar}{cockpit.file}" todir="${symbol_dollar}{java.io.tmpdir}"/> <zip destfile="${symbol_dollar}{cockpit.file}"> <zipfileset src="${symbol_dollar}{java.io.tmpdir}/${symbol_dollar}{cockpit.filename}"> <exclude name="WEB-INF/lib/${symbol_dollar}{ant.project.name}.jar"/> </zipfileset> </zip> </target> <target name="undeploy.tomcat" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'"> <delete file="${symbol_dollar}{deploy.tomcat.dir}/camunda/WEB-INF/lib/${symbol_dollar}{ant.project.name}.jar" /> </target> </project>