Last active
August 29, 2015 14:14
-
-
Save vegaasen/3286165c9b2313f8af01 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <project name="validate-cli" default="install"> | |
| <property file="../parent-build.properties"/> | |
| <property file="build.properties"/> | |
| <property name="src.dir" location="src/main/java"/> | |
| <property name="build.dir" location="target"/> | |
| <property name="build.lib.dir" location="${build.dir}/lib"/> | |
| <property name="test.report.dir" location="${build.dir}/report"/> | |
| <path id="src.classpath"> | |
| <fileset dir="${lib.dir}/required"> | |
| <include name="**/*.jar"/> | |
| </fileset> | |
| <file file="${jar.validate-lib}"/> | |
| </path> | |
| <target name="clean"> | |
| <delete dir="${build.dir}"/> | |
| </target> | |
| <target name="create-folders"> | |
| <mkdir dir="${build.dir}"/> | |
| <mkdir dir="${build.lib.dir}"/> | |
| </target> | |
| <target name="compile" depends="clean, create-folders"> | |
| <javac source="${java.jdk.version}" target="${java.jdk.version}" debug="${build.debug}" srcdir="${src.dir}" | |
| destdir="${build.dir}" encoding="${encoding.default}" includeantruntime="${ant.includeantruntime}"> | |
| <classpath> | |
| <path refid="src.classpath"/> | |
| </classpath> | |
| </javac> | |
| <copy todir="${build.lib.dir}" flatten="true"> | |
| <path refid="src.classpath"/> | |
| </copy> | |
| <pathconvert property="mf.classpath" pathsep=" "> | |
| <path refid="src.classpath" /> | |
| <flattenmapper /> | |
| </pathconvert> | |
| <tstamp/> | |
| <manifest file="MANIFEST.MF"> | |
| <attribute name="Code-Url" value="${application.url}"/> | |
| <attribute name="Built-By" value="${user.name}"/> | |
| <attribute name="Built-Date" value="${TODAY}"/> | |
| <attribute name="Built-Version" value="${application.version}"/> | |
| <attribute name="Main-Class" value="no.difi.vefa.cli.App"/> | |
| <attribute name="Class-Path" value="${mf.classpath}" /> | |
| </manifest> | |
| <jar destfile="${build.dir}/${out.jar}" basedir="${build.dir}" includes="**/*.*" manifest="MANIFEST.MF"/> | |
| </target> | |
| <target name="install" depends="compile"> | |
| <description>Install the build</description> | |
| </target> | |
| </project> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Important! The libaries must be prefixed with the correct folder :-)