File: build.xml

package info (click to toggle)
ucrpf1host 0.0.20181108-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 372 kB
  • sloc: java: 2,227; xml: 138; makefile: 11; sh: 1
file content (73 lines) | stat: -rw-r--r-- 2,449 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="utf-8"?>

<project name="linne-otoinimerge" default="package" basedir=".">
        <property name="src.dir" value="."/>
        <property name="build.dir" value="classes"/>
        <property name="jar.dir" value="."/>

        <path id="maincp">
	  <pathelement path="/usr/share/java/junit.jar" />
	  <pathelement path="/usr/share/java/RXTXcomm.jar" />
	</path>

	<target name="build">
	  <mkdir dir="${build.dir}"/>
	  <javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="true">
	    <compilerarg value="-Xlint:deprecation" />
	    <compilerarg value="-Xlint:unchecked" />
	    
	    <classpath refid="maincp">
	    </classpath>

	  </javac>
	  <native2ascii encoding="UTF-8" src="${src.dir}/properties" dest="${build.dir}"
			includes="ucrpf1host_zh_TW.properties.txt" ext="" />
	</target>

	<target name="test" depends="build">
	  <junit printsummary="yes">
	    <formatter type="plain" usefile="false" />
	    <test name="com.ucrobotics.yliu.ucrpf1host.test.TestReceivedData" />
	    <test name="com.ucrobotics.yliu.ucrpf1host.test.TestCommandData" />
	    <test name="com.ucrobotics.yliu.ucrpf1host.test.TestPointPanel" />
	    <classpath refid="maincp">
	    </classpath>
	    <classpath>
	      <pathelement path="${build.dir}"/>
	    </classpath>
	  </junit>
	</target>
	<target name="test-withnet" depends="test">
	  <junit printsummary="yes">
	    <formatter type="plain" usefile="false" />
	    <classpath refid="maincp">
	    </classpath>
	    <classpath>
	      <pathelement path="${build.dir}"/>
	    </classpath>
	  </junit>
	</target>
	<target name="package" depends="build">
	  <jar destfile="ucrpf1host.jar" level="9"
	       excludes="ucrpf1host.jar">
	    <fileset dir="${build.dir}"/>
	    <fileset dir="properties"/>
	    <fileset dir="${src.dir}" includes="images/*"/>
	    <manifest>
	      <attribute name="Manifest-Version" value="1.0" />
	      <attribute name="Main-Class" value="com.ucrobotics.yliu.ucrpf1host.Main" />
	      <attribute name="Class-Path" value="${jar.classpath} /usr/share/java/junit.jar /usr/share/java/RXTXcomm.jar" />
	    </manifest>
	  </jar>
	</target>
	<target name="clean">
		<delete failonerror="false" includeemptydirs="true">
			<fileset file="*.class" />
			<fileset dir="com/ucrobotics/yliu">
			  <include name="**/*.class" />
			</fileset>
			<fileset file="ucrpf1host.jar" />
		</delete>
		<delete dir="${build.dir}"/>
	</target>
</project>