forked from StephanMa/betterFORM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
162 lines (130 loc) · 8.75 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Copyright (c) 2014. betterFORM Project - http://www.betterform.de
~ Licensed under the terms of BSD License
-->
<!-- $Id: build.xml,v 1.90 2006/11/16 23:55:43 joernt Exp $ -->
<project id="betterform-project" name="betterForm Project" default="package" basedir=".">
<property name="core.dir" value="${basedir}/core"/>
<xmlproperty file="build.properties.xml"
semanticAttributes="true" keepRoot="false"/>
<property name="web.dir" value="${basedir}/web"/>
<property name="server.dir" value="${basedir}/tools/server"/>
<property name="target.dir" value="${basedir}/target"/>
<property name="src.target.dir" value="${basedir}/target"/>
<antversion property="antversion" atleast="${properties.antversion}"/>
<target name="check-ant-version" unless="antversion">
<fail>Apache Ant 1.8.2 or higher is required for this target. Please upgrade your Apache Ant version (${ant.version}) to minimum version 1.8.2 You can retreive the latest Ant here: http://ant.apache.org/bindownload.cgi</fail>
</target>
<!-- local Web properties -->
<!-- **************************************** HOUSEKEEPING **************************************** -->
<!-- **************************************** HOUSEKEEPING **************************************** -->
<!-- **************************************** HOUSEKEEPING **************************************** -->
<target name="clean" description="clean build target directory">
<echo/>
<echo message="************************************************************************************"/>
<echo message="cleaning up project target, to clean up core, and web call 'ant clean-all'"/>
<echo message="************************************************************************************"/>
<echo/>
<delete dir="${target.dir}"/>
</target>
<target name="clean-all" description="clean build target directory">
<echo/>
<echo message="************************************************************************************"/>
<echo message="cleaning up core and web "/>
<echo message="************************************************************************************"/>
<echo/>
<delete dir="${target.dir}"/>
<delete dir="${core.dir}/target"/>
<delete dir="${web.dir}/target"/>
<delete dir="${basedir}/XRX/target"/>
<delete dir="${basedir}/XRX/target-utils"/>
<delete dir="${basedir}/tools/ProjectAssistant/target"/>
<delete dir="${basedir}/tools/installer/target"/>
</target>
<!-- **************************************** BUILDING OPTIMIZED BETTERFORM WAR **************************************** -->
<!-- **************************************** BUILDING OPTIMIZED BETTERFORM WAR **************************************** -->
<!-- **************************************** BUILDING OPTIMIZED BETTERFORM WAR **************************************** -->
<target name="package" description="create betterform WAR file" depends="check-ant-version" if="antversion">
<echo>
__== create optimized betterform.war file in ${target.dir}==__
</echo>
<!-- Create optimized JavaScript package-->
<ant antfile="${basedir}/web/build-dojo.xml" inheritall="false" target="build-dojo"/>
<!-- Create WAR for Installer -->
<ant antfile="${basedir}/tools/installer/build-files/build-WAR.xml" target="create-war" usenativebasedir="true" inheritall="true">
<property name="installer.target" value="${target.dir}"/>
</ant>
</target>
<!-- **************************************** BUILDING BETTERFORM WEBSITE **************************************** -->
<!-- **************************************** BUILDING BETTERFORM WEBSITE **************************************** -->
<!-- **************************************** BUILDING BETTERFORM WEBSITE **************************************** -->
<target name="build-website" description="generates the betterFORM site" depends="check-ant-version" if="antversion">
<ant antfile="${basedir}/resource/build-site.xml" target="deploy" inheritall="false"/>
</target>
<!-- **************************************** GENERATE BETTERFORM REFERENCE FORMS **************************************** -->
<!-- **************************************** GENERATE BETTERFORM REFERENCE FORMS **************************************** -->
<!-- **************************************** GENERATE BETTERFORM REFERENCE FORMS **************************************** -->
<target name="build-references" description="builds and deploys reference forms to target" depends="check-ant-version" if="antversion">
<ant antfile="${basedir}/resource/build-reference.xml" target="deploy-forms" inheritall="false"/>
</target>
<!-- **************************************** TARGETS FOR MAVEN **************************************** -->
<!-- **************************************** TARGETS FOR MAVEN **************************************** -->
<!-- **************************************** TARGETS FOR MAVEN **************************************** -->
<target name="install-maven-dependencies" description="install all project dependencies into local maven repository" depends="check-ant-version" if="antversion">
<ant antfile="${basedir}/tools/maven/build.xml" target="install-maven-dependencies" dir="${basedir}/tools/maven" inheritall="false"/>
</target>
<target name="update-maven-poms" description="update core and web pom.xml" depends="check-ant-version" if="antversion">
<ant antfile="${basedir}/tools/maven/build.xml" target="update-project-pom" dir="${basedir}/tools/maven" inheritall="false"/>
<ant antfile="${basedir}/tools/maven/build.xml" target="update-core-pom" dir="${basedir}/tools/maven" inheritall="false"/>
<ant antfile="${basedir}/tools/maven/build.xml" target="update-web-pom" dir="${basedir}/tools/maven" inheritall="false"/>
</target>
<!-- TODO: review targets, neither of these works since xbl.xsl and src/main/components -->
<!--
<target name="transformToXFormsUsingComponent" depends="check-ant-version" if="antversion">
<xslt in="${basedir}/resource/src/main/xforms/demo/registration.xhtml"
out="${basedir}/registration.xhtml"
style="${basedir}/src/main/resources/xslt/component.xsl"
force="true">
<classpath refid="transform.class.path"/>
</xslt>
</target>
<target name="componentXSL">
<xslt in="${basedir}/resource/src/main/components/mapping.xml"
out="${basedir}/resource/src/main/resources/xslt/mappings.xsl"
style="${basedir}/src/main/components/mapping2xsl.xsl">
<classpath refid="transform.class.path"/>
</xslt>
</target>
<target name="xbl2xsl">
<xslt in="${basedir}/resource/src/main/components/binding.xml"
out="${basedir}/resource/src/main/resources/xslt/dummy.xsl"
style="${basedir}/src/main/components/xbl2xsl.xsl">
<classpath refid="transform.class.path"/>
</xslt>
</target>
<target name="testxblxsl">
<xslt in="tools/XFormsDumpToXHTML/BindingTest1.xml"
out="${basedir}/testoutput1.html"
force="true"
style="${basedir}/src/main/resources/xslt/xbl.xsl">
<classpath refid="transform.class.path"/>
</xslt>
<xslt in="tools/XFormsDumpToXHTML/EarlyBindingTest1.xml"
out="${basedir}/testoutput2.html"
force="true"
style="${basedir}/src/main/resources/xslt/early-binding.xsl">
<classpath refid="transform.class.path"/>
</xslt>
</target>
-->
<target name="install-bf-into-eXist-db" description="installs current betterFORM version in eXist" depends="check-ant-version, clean-all" if="antversion">
<ant antfile="${basedir}/XRX/build-XRX.xml" target="update-betterFORM" dir="${basedir}/XRX" inheritall="false"/>
</target>
<target name="install-bf-exploded-into-eXist-db" description="installs current betterFORM exploded version in eXist" depends="check-ant-version, clean-all" if="antversion">
<ant antfile="${basedir}/XRX/build-XRX.xml" target="update-betterFORM-exploded" dir="${basedir}/XRX" inheritall="false"/>
</target>
<target name="build-bf-dojo-release" description="create betterFORM / dojo release (needed if changes in js were made)" depends="check-ant-version, clean-all" if="antversion">
<ant antfile="${basedir}/web/build-dojo.xml" target="build-dojo" dir="${basedir}/web" inheritall="false"/>
</target>
</project>