-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
129 lines (110 loc) · 4.96 KB
/
build.xml
File metadata and controls
129 lines (110 loc) · 4.96 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<project name="cffunc" default="buildExtension" basedir=".">
<description>Ant build file to build the cfunc extension</description>
<!-- Load properties -->
<property file="build.properties"/>
<!-- Set jars -->
<path id="railo.classpath">
<fileset dir="${railo.dir}/railo-java/libs"/>
<!--<fileset dir="${railo.install}"/>-->
<pathelement location="${railo.dir}/railo-java/railo-core/build/classes"/>
</path>
<target name="clean" description="Clears the build and dist directories.">
<echo>Deleting ${build.dir} and ${dist.dir}</echo>
<delete dir="${build.dir}" />
<delete dir="${jar.dir}" />
<delete file="${config.xml.file}" />
<delete dir="${dist.dir}"/>
</target>
<target name="init" depends="clean" description="Creates nessesary directories.">
<echo>Creating the build and dist directories.</echo>
<mkdir dir="${build.dir}/classes"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="compileRailo" depends="init" description="Compiles railo">
<ant dir="${railo.dir}/railo-java/railo-core/" target="compile" inheritall="false" />
</target>
<target name="compile" depends="init" description="Compiles the classes.">
<echo>Compiling source</echo>
<javac srcdir="${src.dir}" destdir="${build.dir}/classes" compiler="javac1.5" encoding="ISO-8859-1" fork="true" memorymaximumsize="512m">
<classpath>
<path refid="railo.classpath" />
</classpath>
</javac>
</target>
<target name="calculateVersion" description="calculates the version of the build">
<echo>Calculating Version</echo>
<buildnumber />
<property name="version" value="${major.and.minor}.${build.number}" />
</target>
<target name="package" depends="compile,calculateVersion,created" description="Creates the the cfunc.jar file.">
<echo>Packaging the coldfunctional.jar</echo>
<jar destfile="${jar.dir}/coldfunctional.jar">
<fileset dir="${build.dir}/classes" />
</jar>
<copy file="config.xml" tofile="${config.xml.file}" />
<replace file="${config.xml.file}" token="@@version@@" value="${version}" />
<replace file="${config.xml.file}" token="@@created@@" value="${created}" />
<copy file="Install.cfc" toDir="${extension.dir}" />
<copy toDir="${extension.dir}/cfc">
<fileset dir="cfc" />
</copy>
<copy file="coldfunctional.fld" toDir="${fld.dir}" />
<copy file="LICENSE" toFile="${extension.dir}/license.txt" />
</target>
<target name="created" description="sets the created property">
<tstamp>
<format property="created.raw" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<property name="created" value="{ts '${created.raw}'}" />
</target>
<target name="buildExtension" depends="package" description="Deploy cffunc to extension provider">
<echo message="Extension available at ${dist.dir}\extension.rep" />
<zip destfile="${dist.dir}\extension.zip" basedir="${extension.dir}" />
</target>
<target name="deployToTestExtensionProvider" depends="buildExtension" description="deploys extension to test extension provider">
<copy file="${dist.dir}\extension.zip" toDir="${extension.provider.dir}/extensions" />
</target>
<target name="deployDirectlyToSite" depends="buildExtension" description="deploys extension to test extension provider">
<!-- login -->
<exec executable="curl.exe">
<arg value="-X POST" />
<arg value="-b cookies.txt" />
<arg value="-c cookies.txt" />
<arg value="-F login_passwordserver=sysadmin" />
<arg value="-F lang=en" />
<arg value='"http://localhost:8080/railo-context/admin/server.cfm"' />
</exec>
<exec executable="curl.exe">
<arg value="-X POST" />
<arg value="-b cookies.txt" />
<arg value="-c cookies.txt" />
<arg value="-F login_passwordserver=sysadmin" />
<arg value="-F lang=en" />
<arg value='"http://localhost:8080/railo-context/admin/server.cfm"' />
</exec>
<!-- upload extension -->
<exec executable="curl.exe" outputproperty="curl.output">
<arg value="-X POST" />
<arg value="-c cookies.txt" />
<arg value="-b cookies.txt" />
<arg value="-F extFile=@${dist.dir}\extension.zip" />
<arg value='"http://localhost:8080/railo-context/admin/server.cfm?action=extension.applications&action2=upload"' />
</exec>
<!--- accept license agreement -->
<exec executable="curl.exe" outputproperty="curl.output">
<arg value="-X POST" />
<arg value="-c cookies.txt" />
<arg value="-b cookies.txt" />
<arg value="-F extFile=@${dist.dir}\extension.zip" />
<arg value='"http://localhost:8080/railo-context/admin/server.cfm?action=extension.applications&action2=upload"' />
</exec>
<echo message="${curl.output}" />
<!--mainAction="uploadExt"
extFile=file
post
server.cfm?action=extension.applications&action2=upload
multipart/form-data-->
</target>
<target name="publishFullDocumentation" description="deploys all documentation to litnak.com/coldfunctional">
</target>
</project>