-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathall.xml
67 lines (63 loc) · 2.61 KB
/
all.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- $ ant -f all.xml -Dall=package -->
<!-- $ ant -f all.xml checkstyle pmd -->
<project name="swing-all" default="all" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
<property environment="env" />
<condition property="jdk9orlater">
<javaversion atleast="9" />
</condition>
<target name="all">
<subant target="${all}">
<fileset dir="examples" casesensitive="yes">
<filename name=".*/*" negate="true" />
<filename name="*~/*" negate="true" />
<filename name="*/build.xml" />
</fileset>
</subant>
</target>
<condition property="have.pmd">
<available file="${env.PMD_HOME}" />
</condition>
<target name="pmd" if="have.pmd">
<path id="pmd.classpath">
<fileset dir="${env.PMD_HOME}/lib" includes="*.jar" />
</path>
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath" />
<pmd cacheLocation="${env.TEMP}/pmd/pmd.cache" encoding="UTF-8">
<ruleset>${basedir}/ruleset.xml</ruleset>
<formatter type="xml" toFile="report_pmd.xml" />
<formatter type="text" toConsole="true" />
<fileset dir="${basedir}/examples">
<exclude name="**/build/**" />
<exclude name="**/target/**" />
<exclude name="**/module-info.java" unless:set="jdk9orlater" />
<include name="**/*.java" />
</fileset>
</pmd>
</target>
<condition property="have.checkstyle">
<available file="${env.CHECKSTYLE_HOME}" />
</condition>
<target name="checkstyle" if="have.checkstyle">
<path id="checkstyle.classpath">
<fileset dir="${env.CHECKSTYLE_HOME}">
<include name="*-all.jar" if:set="jdk9orlater" />
<exclude name="checkstyle-9.3-all.jar" if:set="jdk9orlater" />
<include name="checkstyle-9.3-all.jar" unless:set="jdk9orlater" />
</fileset>
</path>
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpathref="checkstyle.classpath" />
<property name="checkstyle.config" location="${basedir}/checks.xml" unless:set="checkstyle.config" />
<echo message="checkstyle.config: ${checkstyle.config}" />
<checkstyle config="${checkstyle.config}" failOnViolation="false">
<formatter type="plain" />
<formatter type="xml" toFile="${basedir}/checkstyle-result.xml" />
<fileset dir="${basedir}/examples">
<exclude name="**/build/**" />
<exclude name="**/target/**" />
<exclude name="**/module-info.java" unless:set="jdk9orlater" />
<include name="**/*.java" />
</fileset>
</checkstyle>
</target>
</project>