Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
51 lines (40 loc) · 1.73 KB
/
Copy pathbuild.xml
File metadata and controls
51 lines (40 loc) · 1.73 KB
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
<project default="compile">
<!-- Define a set of paths (file names) to pass to checkstyle - all .java files under `src` and its subdirectories (recursively)-->
<path id="sourceFiles">
<fileset dir="src" casesensitive="yes">
<include name="**/*.java"/>
</fileset>
</path>
<!-- Define a property, which is like a variable for the build file, -->
<!-- with the classpath for all compilation & execution targets. -->
<property name="classpath" value="bin" />
<!-- Compile all java files under `src`, and export .class files into `bin` -->
<target name="compile">
<mkdir dir="bin"/>
<javac classpath="${classpath}" srcdir="src" destdir="bin" includeantruntime="false"/>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target name="run" depends="compile" >
<java classname="src.ExpressionsTest" classpath="${classpath}" fork="true"/>
</target>
<!-- Run checkstyle on all our source files -->
<!-- Create a temporary file listing all source files -->
<target name="create-filelist">
<pathconvert property="filelist" refid="sourceFiles" pathsep=" " />
<echo file="filelist.txt" append="false">${filelist}</echo>
</target>
<!-- Run checkstyle on all our source files -->
<target name="check" depends="create-filelist">
<java jar="checkstyle-8.44-all.jar" fork="true">
<arg line="-c biuoop.xml" />
<arg line="@filelist.txt" />
</java>
</target>
<!-- Clean up temporary filelist -->
<target name="clean-filelist">
<delete file="filelist.txt"/>
</target>
<target name="check-and-clean" depends="check, clean-filelist"/>
</project>