-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·147 lines (130 loc) · 6.34 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
<project name="OpenFaces Library" default="build" basedir=".">
<buildnumber file="build.number"/>
<property file="ofversion.properties"/>
<property name="src.dir" location="source"/>
<property name="target.dir" location="target"/>
<property name="classes.dir" location="${target.dir}/classes"/>
<property name="of-version" value="${ofversion}.${build.number}"/>
<property name="openfaces-jar.file" location="${target.dir}/openfaces-${of-version}.jar"/>
<property name="manifest.file" location="${target.dir}/manifest.mf"/>
<target name="init">
<tstamp/>
</target>
<target name="clean" description="Clean up">
<delete dir="${target.dir}"/>
</target>
<target name="compile" depends="init" description="Compile the source code">
<mkdir dir="${classes.dir}"/>
<javac includeantruntime="false" srcdir="${src.dir}" destdir="${classes.dir}" debug="true" source="1.6" target="1.6">
<classpath>
<fileset dir="${lib.dir}">
<include name="jsp-api-2.1.jar"/>
<include name="servlet-api.jar"/>
<include name="jstl-1.1.0.jar"/>
<include name="slf4j-api-1.5.8.jar"/>
<include name="slf4j-log4j12-1.5.8.jar"/>
<include name="log4j-1.2.14.jar"/>
<include name="javax.servlet-3.0.jar"/>
</fileset>
<fileset dir="${el.lib.dir}">
<include name="el-api-1.5.0.jar"/>
<include name="el-ri-1.5.0.jar"/>
</fileset>
<fileset dir="${jsf.ri.lib.dir}">
<include name="javax.faces-2.2.6.jar"/>
</fileset>
<fileset dir="${portlets.lib.dir}">
<include name="exoportal-stub.jar"/>
<include name="portlet-api-2.0.jar"/>
<include name="jboss/portletbridge-api-2.1.0.FINAL.jar"/>
<include name="jboss/portletbridge-impl-2.1.0.FINAL.jar"/>
<include name="jsf-portlet-1.2.jar"/>
</fileset>
<fileset dir="${openfaces.dependencies.lib.dir}">
<include name="jfreechart-1.0.13.jar"/>
<include name="jcommon-1.0.16.jar"/>
<include name="cssparser-0.9.5.jar"/>
<include name="sac.jar"/>
<include name="commons-collections-3.2.1.jar"/>
<include name="hibernate-commons-annotations.jar"/>
<include name="hibernate-validator.jar"/>
<include name="jboss-el.jar"/>
<include name="commons-fileupload-1.2.2.jar"/>
<include name="commons-io-2.1.jar"/>
</fileset>
<fileset dir="${apache.lib.dir}">
<include name="commons-collections-3.2.1.jar"/>
<include name="commons-beanutils-1.7.0.jar"/>
<include name="commons-logging-1.1.1.jar"/>
</fileset>
<fileset dir="${seam.lib.dir}">
<include name="hibernate-all.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="build" depends="clean" description="Generate the distribution">
<antcall target="-build-if-lib-set"/>
<antcall target="-build-if-lib-not-set"/>
</target>
<!-- *** Utility Targets *** -->
<target name="-build-if-lib-set" if="lib.dir"
description="generate the distribution">
<property name="el.lib.dir" location="${lib.dir}/el"/>
<property name="jsf.ri.lib.dir" location="${lib.dir}/mojarra"/>
<property name="portlets.lib.dir" location="${lib.dir}/portals"/>
<property name="openfaces.dependencies.lib.dir" location="${lib.dir}/openfaces-dependencies"/>
<property name="richfaces.lib.dir" location="${lib.dir}/richfaces"/>
<property name="myfaces.lib.dir" location="${lib.dir}/myfaces"/>
<property name="apache.lib.dir" location="${lib.dir}/apache"/>
<property name="seam.lib.dir" location="${lib.dir}/jboss-seam"/>
<antcall target="-build"/>
</target>
<target name="-build-if-lib-not-set" unless="lib.dir"
description="generate the distribution">
<property name="lib.dir" location="lib"/>
<property name="el.lib.dir" location="${lib.dir}/el"/>
<property name="jsf.ri.lib.dir" location="${lib.dir}/mojarra"/>
<property name="portlets.lib.dir" location="${lib.dir}/portals"/>
<property name="openfaces.dependencies.lib.dir" location="${lib.dir}/openfaces-dependencies"/>
<property name="richfaces.lib.dir" location="${lib.dir}/richfaces"/>
<property name="myfaces.lib.dir" location="${lib.dir}/myfaces"/>
<property name="apache.lib.dir" location="${lib.dir}/apache"/>
<property name="seam.lib.dir" location="${lib.dir}/jboss-seam"/>
<antcall target="-build" inheritall="true"/>
</target>
<target name="-build" depends="compile,-copy-resources,-prepare-manifest-and-version"
description="generate the distribution">
<jar jarfile="${openfaces-jar.file}" basedir="${classes.dir}" manifest="${manifest.file}"/>
<antcall target="-copy-target-jar"/>
<antcall target="-delete-classes-dir"/>
<delete file="${manifest.file}"/>
</target>
<target name="-delete-classes-dir" unless="retain.classes.dir">
<delete dir="${target.dir}/classes"/>
</target>
<target name="-prepare-manifest-and-version" depends="-copy-resources">
<property name="cvstimestamp" value="${TODAY}"/>
<property name="version.file" location="${classes.dir}/META-INF/openFacesVersion.txt"/>
<copy file="source/META-INF/openFacesVersion.txt" tofile="${version.file}" overwrite="true"/>
<manifest file="${manifest.file}">
<attribute name="Implementation-Title" value="OpenFaces"/>
<attribute name="Implementation-Vendor" value="TeamDev Ltd."/>
<attribute name="Implementation-Version" value="${of-version}"/>
<attribute name="Build-Timestamp" value="${cvstimestamp}"/>
</manifest>
<replace file="${version.file}" token="version" value="${of-version}"/>
<replace file="${version.file}" token="cvstimestamp" value="${cvstimestamp}"/>
</target>
<target name="-copy-target-jar" if="target-jar.file">
<copy file="${openfaces-jar.file}" tofile="${target-jar.file}"/>
</target>
<target name="-copy-resources">
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<replace file="${classes.dir}/META-INF/openfaces.tld" token="__OpenFacesVersion__" value="${ofversion}"/>
</target>
</project>