|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<!-- ====================================================================== --> |
| 4 | +<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. --> |
| 5 | +<!-- ====================================================================== --> |
| 6 | + |
| 7 | +<project name="proxy-client" default="package" basedir="."> |
| 8 | + |
| 9 | + |
| 10 | + <!-- ====================================================================== --> |
| 11 | + <!-- Build environment properties --> |
| 12 | + <!-- ====================================================================== --> |
| 13 | + |
| 14 | + <property file="maven-build.properties"/> |
| 15 | + <property environment="env"/> |
| 16 | + <property name="maven.build.finalName" value="proxy-client-1.0"/> |
| 17 | + <property name="maven.build.dir" value="target"/> |
| 18 | + <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/> |
| 19 | + <property name="maven.build.srcDir.0" value="src/main/java"/> |
| 20 | + <property name="maven.build.resourceDir.0" value="src/main/resources"/> |
| 21 | + <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/> |
| 22 | + |
| 23 | + <property name="maven.settings.offline" value="false"/> |
| 24 | + <property name="maven.settings.interactiveMode" value="true"/> |
| 25 | + |
| 26 | + <!-- ====================================================================== --> |
| 27 | + <!-- Defining classpaths --> |
| 28 | + <!-- ====================================================================== --> |
| 29 | + |
| 30 | + <path id="build.classpath"> |
| 31 | + <pathelement location="${env.ORACLE_HOME}/coherence/lib/coherence.jar"/> |
| 32 | + </path> |
| 33 | + |
| 34 | + |
| 35 | + <!-- ====================================================================== --> |
| 36 | + <!-- Cleaning up target --> |
| 37 | + <!-- ====================================================================== --> |
| 38 | + |
| 39 | + <target name="clean" description="Clean the output directory"> |
| 40 | + <delete dir="${maven.build.dir}"/> |
| 41 | + </target> |
| 42 | + |
| 43 | + <!-- ====================================================================== --> |
| 44 | + <!-- Compilation target --> |
| 45 | + <!-- ====================================================================== --> |
| 46 | + |
| 47 | + <target name="compile" depends="get-deps" description="Compile the code"> |
| 48 | + <mkdir dir="${maven.build.outputDir}"/> |
| 49 | + <javac destdir="${maven.build.outputDir}" |
| 50 | + nowarn="false" |
| 51 | + debug="true" |
| 52 | + optimize="false" |
| 53 | + deprecation="true" |
| 54 | + target="1.8" |
| 55 | + verbose="false" |
| 56 | + fork="false" |
| 57 | + source="1.8"> |
| 58 | + <src> |
| 59 | + <pathelement location="${maven.build.srcDir.0}"/> |
| 60 | + </src> |
| 61 | + <classpath refid="build.classpath"/> |
| 62 | + </javac> |
| 63 | + <copy todir="${maven.build.outputDir}"> |
| 64 | + <fileset dir="${maven.build.resourceDir.0}"/> |
| 65 | + </copy> |
| 66 | + </target> |
| 67 | + |
| 68 | + |
| 69 | + <!-- ====================================================================== --> |
| 70 | + <!-- Package target --> |
| 71 | + <!-- ====================================================================== --> |
| 72 | + |
| 73 | + <target name="package" depends="compile" description="Package the application"> |
| 74 | + <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" |
| 75 | + compress="true" |
| 76 | + index="false" |
| 77 | + basedir="${maven.build.outputDir}" |
| 78 | + excludes="**/package.html"/> |
| 79 | + </target> |
| 80 | + |
| 81 | + <!-- ====================================================================== --> |
| 82 | + <!-- A dummy target for the package named after the type it creates --> |
| 83 | + <!-- ====================================================================== --> |
| 84 | + |
| 85 | + <target name="jar" depends="package" description="Builds the jar for the application"/> |
| 86 | + |
| 87 | + <!-- ====================================================================== --> |
| 88 | + <!-- Download dependencies target --> |
| 89 | + <!-- ====================================================================== --> |
| 90 | + |
| 91 | + <target name="get-deps" |
| 92 | + description="Download all dependencies" |
| 93 | + unless="maven.mode.offline"> |
| 94 | + |
| 95 | + </target> |
| 96 | + |
| 97 | + <!-- ====================================================================== --> |
| 98 | + <!-- Help target --> |
| 99 | + <!-- ====================================================================== --> |
| 100 | + |
| 101 | + <target name="help"> |
| 102 | + <echo message="Please run: $ant -projecthelp"/> |
| 103 | + </target> |
| 104 | + |
| 105 | +</project> |
0 commit comments