Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
129 lines (111 sloc) 3.92 KB
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="java-mateview" default="test" basedir=".">
<property name="build.dir" location="bin" />
<property name="src.dir" location="src" />
<property name="test.dir" location="test" />
<property name="lib.dir" location="lib" />
<property name="resources.dir" location="resources" />
<property name="build.prod.dir" location="${build.dir}" />
<property name="build.test.dir" location="${build.dir}/test" />
<property name="test.report.dir" location="${build.dir}/test-reports" />
<property name="build.compiler" value="javac1.6"/>
<condition property="platform" value="osx32">
<and>
<os family="mac" />
<os family="unix" />
<os arch="i386" />
</and>
</condition>
<condition property="platform" value="osx64">
<and>
<os family="mac" />
<os family="unix" />
<os arch="x86_64" />
</and>
</condition>
<condition property="platform" value="linux32">
<and>
<os family="unix" />
<os arch="i386" />
</and>
</condition>
<condition property="platform" value="linux64">
<and>
<os family="unix" />
<os arch="amd64" />
</and>
</condition>
<condition property="platform" value="win32">
<os family="windows" />
</condition>
<path id="project.classpath">
<pathelement location="${build.prod.dir}" />
<pathelement location="${build.test.dir}" />
<fileset dir="${lib.dir}/">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/javamateview">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/jface_jars">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/swt_jars/${platform}">
<include name="*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="debug" description="--> description">
<echo message="using platform: [${platform}]" />
<!-- get the source compile classpath in a printable form -->
<pathconvert pathsep="${line.separator}| |-- " property="echo.path" refid="project.classpath" />
<echo message="|-- compile classpath"/>
<echo message="| |"/>
<echo message="| |-- ${echo.path}"/>
</target>
<target name="prepare" depends="clean,debug">
<mkdir dir="${build.prod.dir}" />
<mkdir dir="${build.test.dir}" />
<copy todir="${build.prod.dir}">
<fileset dir="${resources.dir}">
<include name="*" />
</fileset>
</copy>
</target>
<target name="jar" depends="compile">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="project.classpath" />
<jarjar destfile="lib/javamateview/jar/java-mateview.jar" basedir="${build.prod.dir}">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Class-Path" value=". lib vendor" />
</manifest>
<!-- also pack up all the system independent runtime deps -->
<!--<zipgroupfileset dir="${lib.dir}" includes="*.jar"/>-->
</jarjar>
</target>
<target name="compile" depends="prepare">
<javac target="1.5" srcdir="${src.dir}" destdir="${build.prod.dir}" debug="true">
<classpath refid="project.classpath" />
</javac>
</target>
<target name="compile-tests" depends="compile">
<javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="true">
<classpath refid="project.classpath" />
</javac>
</target>
<target name="test" depends="compile-tests">
<delete dir="${test.report.dir}" />
<mkdir dir="${test.report.dir}" />
<junit errorproperty="test.failed" failureproperty="test.failed">
<classpath refid="project.classpath" />
<formatter type="brief" usefile="false" />
<formatter type="xml" usefile="true" />
<batchtest todir="${test.report.dir}">
<fileset dir="${build.test.dir}" includes="**/*Test.class" />
</batchtest>
</junit>
<fail message="one or more tests failed!" if="test.failed" />
</target>
</project>
Something went wrong with that request. Please try again.