-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·115 lines (75 loc) · 4.69 KB
/
build.xml
File metadata and controls
executable file
·115 lines (75 loc) · 4.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="CFConcurrent" basedir="." default="distMinimal">
<!--
Jenkins / Hudson Tips:
If you stick with the defaults configured in "init", use the following as a guide for populating the Jenkins job configuration for this project
1) "Test Report XMLs" configuration will be something like
DirectoryNameOfYourProject/test/testresults/xml/**/*.xml
2) "Archive the artifacts" configuration will be something like
DirectoryNameOfYourProject/deploy/*.zip
-->
<target name="init">
<!-- //////// DIRECTORY AND CFC PATH SETUP (used in all targets) -->
<!-- what's the directory name of your application? this value will be used throughout this build file; if you don't want that, just replace the references to ${application.name} with your desired values -->
<property name="application.name" value="CFConcurrent" />
<!-- what's the name of the directory where your tests live? Note: this is just the name of the directory, not the full path-->
<property name="test.dir.name" value="tests" />
<!-- where do your tests live, relative to this build file? test.dir.location will be a full path to a directory -->
<property name="test.dir.location" location="${test.dir.name}" />
<!-- what is the cfc dot-notation path to that directory, as ColdFusion sees it? -->
<property name="test.cfcpath" value="${application.name}.${test.dir.name}" />
<!-- //////// MXUNIT ANT TASK SETUP (used in runtests and junitreport targets) -->
<!-- what server and port should your tests run against? -->
<property name="test.server" value="localhost" />
<property name="test.serverport" value="80" />
<!-- what "runner" URL should the tests hit. In this example, you'd be hitting http://localhost:80/DirectoryNameOfYourProject/test/HttpAntRunner.cfc Simply copy mxunit/samples/HttpAntRunner.cfc into your test directory! -->
<property name="test.runner" value="/${application.name}/${test.dir.name}/HttpAntRunner.cfc" />
<!-- this is where the xml and html will live for the report generator and Jenkins -->
<property name="test.output" location="${test.dir.name}/testresults" />
<property name="test.output.xml" location="${test.output}/xml" />
<property name="test.junitoutput" location="${test.output}/html" />
<!-- //////// ZIP-FILE SETUP (used by "dist" target) -->
<!-- where the zip file for deployment will live -->
<property name="dist.dir" location="deploy" />
<!-- what to call it -->
<property name="dist.zip" value="${application.name}.zip" />
<!-- zip for embedding into other apps; includes only the CFCs you need for using CFConcurrent -->
<property name="dist.min.zip" value="${application.name}-min.zip" />
<!-- what to start the "path" in the zip with -->
<property name="dist.prefixInZip" value="${application.name}" />
<!-- //////// JAR FILES WE NEED FOR EXTERNAL TASKS -->
<!-- where does the mxunit ant jar file live? it's easiest to copy it out of the mxunit install and put it into your app
You can also put any other ant-related jars in this directory; for example, if you want to use svnant, you'll need to put those jars here
-->
<path id="project.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef name="mxunittask" classname="org.mxunit.ant.MXUnitAntTask" classpathref="project.classpath" />
<!-- dump the properties -->
<echoproperties prefix="test" />
<echoproperties prefix="dist" />
</target>
<target name="clean" depends="init">
<mkdir dir="${test.output.xml}" />
<mkdir dir="${test.junitoutput}" />
<mkdir dir="${dist.dir}" />
</target>
<target name="runTests" depends="init">
<mkdir dir="${test.output.xml}" />
<mxunittask server="${test.server}" port="${test.serverport}" defaultrunner="${test.runner}" outputdir="${test.output.xml}" verbose="true" failureproperty="tests.bombed" errorproperty="tests.bombed">
<directory path="${test.dir.location}" recurse="true" packageName="${test.cfcpath}" componentPath="${test.cfcpath}" />
</mxunittask>
</target>
<target name="dist" depends="init" description="Builds the zip file for deployment">
<zip destfile="${dist.dir}/${dist.zip}">
<zipfileset dir="." excludes="${test.dir.name}/, deploy/, lib/, .project, build.xml, settings.xml, .settings/, .gitignore, .git" prefix="${dist.prefixInZip}" casesensitive="false" />
</zip>
</target>
<target name="distMinimal" depends="init" description="Builds the zip file for deployment">
<zip destfile="${dist.dir}/${dist.min.zip}">
<zipfileset dir="." includes="*.cfc, javaloader/" excludes="Application.cfc" prefix="${dist.prefixInZip}" casesensitive="false" />
</zip>
</target>
</project>