-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathsample.build.xml
55 lines (46 loc) · 2.23 KB
/
sample.build.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" encoding="UTF-8"?>
<project basedir="..\..\.." default="build" name="goodville-common">
<!--
Demonstrates the use of the and CFLintTask
-->
<property name="sourceRoot" value="c:/source/cfmx/extensions/components"/>
<property name="workfolder" location="temp"/>
<path id="classpath">
<fileset dir="target/appassembler/lib" includes="*.jar" />
</path>
<taskdef name="cflint" classname="com.cflint.ant.CFLintTask" classpathref="classpath"/>
<target name="UpToDateCheck">
<uptodate property="cflint.uptodate" targetfile="target/cflint.xml">
<srcfiles dir="${sourceRoot}" includes="**/*.cfm,**/*.cfc" />
</uptodate>
</target>
<target name="clean">
<delete file="target/cflint.xml" />
</target>
<target depends="UpToDateCheck,cflint" name="build" />
<target name="cflint" unless="cflint.uptodate" depends="UpToDateCheck">
<cflint xmlfile="target/cflint.xml" showProgress="true">
<fileset dir="${sourceRoot}" includes="**/*.cfm,**/*.cfc"/>
</cflint>
</target>
<target name="cflint-smart">
<mkdir dir="${workfolder}"/>
<!-- use a temporary copy of the mod cache, build failures midstream do not affect the checksum cache -->
<copy failonerror="false" file="${workfolder}/updatecache.properties" overwrite="true" tofile="${workfolder}/temp.updatecache.properties"/>
<cflint xmlfile="target/cflint.xml" showProgress="true">
<!-- identify source files changes since last execution of this task-->
<fileset dir="${sourceRoot}">
<include name="**/*.cfm"/>
<include name="**/*.cfc"/>
<!-- cache a checksum of each file, only include files in the fileset whose checksum has changed -->
<modified update="true" seldirs="false"
cache="propertyfile" algorithm="digest" comparator="equal">
<param name="cache.cachefile" value="${workfolder}/temp.updatecache.properties"/>
<param name="algorithm.algorithm" value="MD5"/>
</modified>
</fileset>
</cflint>
<!-- Note the cflint.xml output will contain a partial list of the total issues since it is running over a subset of the source-->
<move file="${workfolder}/temp.updatecache.properties" tofile="${workfolder}/updatecache.properties"/>
</target>
</project>