-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
78 lines (62 loc) · 2.69 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" encoding="UTF-8"?>
<project name="CfJavaScript-CfStyleSheet" default="updateExtension">
<include file="version.xml"/>
<!-- project properties -->
<property file="project.properties"/>
<tstamp prefix="stamp">
<format property="TODAY_UK" pattern="yyyyMMMMdhhmm" locale="en,UK"/>
</tstamp>
<tstamp prefix="created">
<format property="TODAY" pattern="yyyy-MMMM-d" locale="en,UK"/>
<format property="TSTAMP" pattern="HH:mm" locale="en,UK"/>
</tstamp>
<target name="updateExtension" depends="buildExtension,deployLib,deployTags,restartRailo"/>
<target name="restartRailo">
<echo message="restart railo"/>
<get src="http://${server.name}:${server.port}/reload.cfm" dest="output/output.html" ignoreerrors="true" />
</target>
<target name="deployLib">
<echo message="Deploying new lib"/>
<copy todir="${context_path}/library/tag/" overwrite="true">
<fileset dir="${project.extPath}/tags" includes="*cfc"/>
</copy>
</target>
<target name="deployTags">
<echo message="Deploying tags"/>
<copy todir="${context_path}/lib" overwrite="true">
<fileset dir="${project.extPath}/lib" includes="*jar"/>
</copy>
</target>
<target name="buildExtension" depends="replaceConfigVars">
<zip destfile="${basedir}/ext/CfJavaScript-CfStyleSheet.zip" basedir="${project.extPath}"/>
</target>
<target name="replaceConfigVars" depends="copyLibs">
<copy file="${basedir}/config.template.xml" tofile="${project.extPath}/config.xml" overwrite="true" />
<replace file="${project.extPath}/config.xml" token="{version}" value="1.${stamp.DSTAMP}${stamp.TSTAMP}" />
<replace file="${project.extPath}/config.xml" token="{created}" value="${created.TODAY} ${created.TSTAMP}" />
</target>
<target name="copyLibs" depends="createJar">
<copy todir="${project.extPath}/lib/" overwrite="true">
<fileset dir="${basedir}/lib/"/>
</copy>
</target>
<target name="createJar" depends="deleteArchives">
<path id="master-classpath">
<fileset dir="${basedir}/lib/">
<include name="*.jar"/>
</fileset>
</path>
<javac srcdir="${basedir}/src" destdir="${basedir}/bin">
<classpath refid="master-classpath"/>
</javac>
<jar basedir="${basedir}/bin" destfile="${project.extPath}/lib/YuiCompGatewayExtension.jar" />
</target>
<target name="deleteArchives">
<delete dir="${project.extPath}/lib/" includes="*.jar" />
<delete dir="${basedir}/bin/" includes="*.class" />
<delete dir="${basedir}/ext/" includes="*.zip"/>
<delete dir="output/" includes="*.html"/>
<delete file="${project.extPath}/config.xml" />
<mkdir dir="${project.extPath}/lib/" />
</target>
</project>