Permalink
Find file Copy path
2f06789 Aug 26, 2016
1 contributor

Users who have contributed to this file

96 lines (75 sloc) 2.88 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License (MIT)
Copyright (c) 2012 Johannes Schnatterer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!DOCTYPE project>
<project name="AntTestReporting" basedir="." default="jar">
<!-- general -->
<property name="DEBUG" value="true" />
<property name="VERBOSE" value="true" />
<property name="TARGET" value="1.6" />
<!-- folder -->
<property name="build.dir" value="bin" />
<property name="src" value="src" />
<property name="lib" value="lib" />
<!-- classpath -->
<path id="classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- targets -->
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="compile" depends="clean">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/build" />
<!-- Create the time stamp -->
<tstamp>
<format property="lastUpdated" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<javac target="${TARGET}" debug="${DEBUG}" verbose="${VERBOSE}" classpathref="classpath" optimize="true" destdir="${build.dir}">
<src path="${src}" />
</javac>
<fileset id="srcFiles" dir="${src}">
<exclude name="**/*.java"/>
<exclude name="**/*.html"/>
<include name="**/*.*" />
</fileset>
<copy todir="${build.dir}">
<fileset refid="srcFiles"/>
</copy>
</target>
<!-- <target name="jar" depends="compile, test"> -->
<target name="jar" depends="compile">
<jar jarfile="${build.dir}/build/${ant.project.name}.jar" basedir="${build.dir}">
<manifest>
<attribute name="Build-Time" value="${lastUpdated}" />
<attribute name="Main-Class" value="com.some.pckge.SomeClass"/>
</manifest>
</jar>
<!-- Remove contents of build dir after packaging -->
<!-- <delete>
<fileset dir="${build.dir}">
<include name="**/*.*" />
</fileset>
</delete> -->
</target>
</project>