Created
August 25, 2012 19:29
-
-
Save nialdarbey/3469826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="hello" default="deploy"> | |
<taskdef resource="org/mule/mulePackagingTasks.properties" /> | |
<property name="dir.java" value="src" /> | |
<property name="dir.conf" value="conf" /> | |
<property name="dir.build" value="target" /> | |
<property name="dir.classes" value="${dir.build}/classes" /> | |
<property name="app.name" value="nialdarbey" /> | |
<property name="app.jar" value="${dir.build}/${app.name}.jar" /> | |
<property name="app.file" value="${app.name}.zip" /> | |
<property environment="env" /> | |
<target name="clean" description="Clean the output directory (start from scratch)."> | |
<delete dir="${dir.build}" /> | |
</target> | |
<target name="set-paths"> | |
<property name="dir.mule.home" value="/Users/nialdarbey/Downloads/mule3.3/dev01" /> | |
</target> | |
<target name="init" depends="set-paths"> | |
<!-- Create the build directory if it doesn't exist --> | |
<mkdir dir="${dir.classes}" /> | |
<!-- Configure Mule classpath (mirrors wrapper.conf settings) --> | |
<path id="classpath.mule"> | |
<pathelement location="${dir.mule.home}/conf" /> | |
<fileset dir="${dir.mule.home}/lib/user"> | |
<include name="**/*.jar" /> | |
</fileset> | |
<fileset dir="${dir.mule.home}/lib/mule"> | |
<include name="**/*.jar" /> | |
</fileset> | |
<fileset dir="${dir.mule.home}/lib/opt"> | |
<include name="**/*.jar" /> | |
</fileset> | |
<fileset dir="${dir.mule.home}/lib"> | |
<include name="**/*.jar" /> | |
</fileset> | |
</path> | |
</target> | |
<target name="compile" depends="init" description="Compile the application."> | |
<javac srcdir="${dir.java}" destdir="${dir.classes}" debug="true" source="1.5" target="1.5"> | |
<classpath refid="classpath.mule" /> | |
</javac> | |
</target> | |
<target name="jar" depends="compile" description="build the application jar"> | |
<jar jarfile="${app.jar}" basedir="${dir.classes}" /> | |
</target> | |
<target name="package" depends="jar" description="Package the application"> | |
<mulePackage applicationFile="${app.file}"> | |
<config dir="src/main/app" /> | |
<lib dir="${dir.build}" includes="${app.jar}" /> | |
<classes dir="${dir.classes}" /> | |
</mulePackage> | |
</target> | |
<target name="deploy" depends="package"> | |
<cloudHubDeploy username="myUsername" password="myPassword" domain="${app.name}" applicationFile="${app.file}" /> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment