-
Notifications
You must be signed in to change notification settings - Fork 0
/
Solidity_CPD.xml
executable file
·55 lines (48 loc) · 1.7 KB
/
Solidity_CPD.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
<?xml version="1.0"?>
<project name="XXX Application Build with CPD" default="run"
basedir="../">
<description>
Ant build sample for running
- CPD,
</description>
<!-- Change the paths to your individual installation directories -->
<property name="cpd.home.dir" location="${basedir}/tools/cpd/" />
<property name="lib.dir" location="${basedir}/map/lib" />
<property name="src.dir" location="${basedir}/map/app/" />
<property name="bin.dir" location="${basedir}/bin" />
<property name="htm.dir" location="${basedir}/html" />
<property name="report.dir" location="${basedir}/report" />
<property name="report.cpd.dir" location="${report.dir}/cpd" />
<!-- Task of clean -->
<target name="clean" description="Delete all result to start with a clean build.">
<delete dir="${report.cpd.dir}" />
<delete dir="${report.temp.dir}" />
<delete dir="${bin.dir}" />
</target>
<!-- Task of prepare report -->
<target name="prepare.report.dir" description="Prepares the reports folder">
<mkdir dir="${report.cpd.dir}" />
</target>
<!-- -->
<path id="cpd.classpath">
<pathelement location="${build}" />
<fileset dir="${cpd.home.dir}/lib/">
<include name="*.jar" />
</fileset>
</path>
<!-- Task of CPD -->
<target name="cpd">
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask"
classpathref="cpd.classpath" />
<cpd minimumTokenCount="100" format="xml" language="java"
ignoreIdentifiers="true" ignoreLiterals="true"
outputFile="${report.cpd.dir}/cpd_report.xml">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</cpd>
</target>
<!-- -->
<target name="run" description="Run the build" depends="clean,prepare.report.dir,cpd">
</target>
</project>