Last modified by Pascal Robert on 2012/07/21 20:39

From version 65.1
edited by Pascal Robert
on 2012/07/21 20:39
Change comment: Migrated to Confluence 5.3
To version 64.1
edited by Pascal Robert
on 2012/07/21 20:39
Change comment: Migrated to Confluence 4.0

Summary

Details

Page properties
Parent
... ... @@ -1,1 +1,0 @@
1 -Deprecated info
Tags
... ... @@ -1,1 +1,0 @@
1 -favourite
ant_tasks.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -37.0 KB
Content
app_bundle_layout.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -63.2 KB
Content
build_artifacts.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -17.6 KB
Content
custom_app_name.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -40.8 KB
Content
modern_project_layout.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -25.3 KB
Content
running_the_script.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -46.9 KB
Content
split_embedded_build.xml
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -13.7 KB
Content
... ... @@ -1,294 +1,0 @@
1 -<project name="Workbench" default="build" basedir=".">
2 - <!-- KK: WARNING: The embedded webserver bundle may not be generated correctly with WOLips versions
3 - earlier than 4118 -->
4 - <!-- KK: This build script is based on standard WOLips script that comes with WOApplication template
5 - Changes and additions are commented. Use diff tool to compare this to standard WOLips build.xml if u like -->
6 -
7 - <!-- main targets -->
8 - <!-- add optional targets to depends list if needed -->
9 - <!-- KK: additional depends targets added: record.build.info, ws.split.embed -->
10 - <target name="build" depends="setProps,init.build,build.woapp,ws.split.embed,ssdd,war"/>
11 -
12 - <target name="compileAndBuild" depends="setProps,init.build,compile,build.woapp,ws.split.embed,ssdd,war" />
13 -
14 - <target name="install" depends="setProps,init.install,build.woapp,ws.split.embed,ssdd,war"/>
15 -
16 - <target name="clean" depends="setProps">
17 - <delete dir="dist"/>
18 - </target>
19 -
20 - <!-- property determination -->
21 - <target name="setProps">
22 - <property file="${user.home}${file.separator}build.properties"/>
23 - <property file="build.properties"/>
24 - <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties"/>
25 - <condition property="wo.properties.check.failed">
26 - <not>
27 - <and>
28 - <isset property="wo.wosystemroot"/>
29 - <isset property="wo.wolocalroot"/>
30 - </and>
31 - </not>
32 - </condition>
33 - <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed"/>
34 - <property name="install.dir" value="${wo.wolocalroot}/Library/WebObjects/Applications"/>
35 -
36 - <!-- KK: the next property supports webserver split install bundle installation location -->
37 - <property name="wsinstall.dir" value="${wo.wolocalroot}/Library/WebServer/Documents"/>
38 -
39 - <!-- KK: Defaults property 'build.app.name' to be 'project.name' if not already defined explicitly -->
40 - <condition property="build.app.name" value="${build.app.name}" else="${project.name}">
41 - <and>
42 - <isset property="build.app.name"/>
43 - </and>
44 - </condition>
45 -
46 - <!-- KK: This next line logs all ant properties to console - useful for troubleshooting build failures -->
47 - <echoproperties />
48 - </target>
49 -
50 - <!-- basic initializations -->
51 - <target name="init.install">
52 - <tstamp/>
53 - <property name="dest.dir" value="${install.dir}"/>
54 - <!-- KK: Sets the webserver document root as destination -->
55 - <property name="wsdest.dir" value="${wsinstall.dir}"/>
56 - </target>
57 -
58 - <target name="init.build">
59 - <tstamp/>
60 - <property name="dest.dir" value="dist"/>
61 - <!-- KK: Since the bundle names are the same for app and ws split bundle, put ws bundle in sub-dir -->
62 - <property name="wsdest.dir" value="dist/ws_root"/>
63 - </target>
64 -
65 - <!-- This copies webserver resources from app.woa's embedded frameworks into split install bundle -->
66 - <target name="ws.split.embed"
67 - depends="setProps,build.woapp"
68 - description="Adds embedded framework webserver resources to the split install bundle by copying from deployment build bundle">
69 - <copy todir="${wsdest.dir}/WebObjects/${build.app.name}.woa"
70 - verbose="true">
71 - <fileset dir="${dest.dir}/${build.app.name}.woa/Contents/Library">
72 - <include name="Frameworks/*.framework/WebServerResources/**"/>
73 - </fileset>
74 - </copy>
75 - <!-- create a tar archive of the webserver bundle -->
76 - <tar destfile="${wsdest.dir}/WebObjects/${build.app.name}-webserver-bundle.tar.gz"
77 - compression="gzip"
78 - basedir="${wsdest.dir}/WebObjects"
79 - longfile="gnu"
80 - includes="${build.app.name}.woa/**">
81 - </tar>
82 - </target>
83 -
84 - <!-- woproject tasks -->
85 - <target name="build.woapp" depends="setProps,init.build,compile">
86 -
87 - <taskdef name="woapplication" classname="org.objectstyle.woproject.ant.WOApplication">
88 - </taskdef>
89 -
90 - <!-- add webXML="true" in build.properties file to generate a web.xml file -->
91 - <!-- KK: added wsDestDir and frameworksBaseURL properties here -->
92 - <!-- using build.app.name instead of project name -->
93 - <!-- KK: About frameworksBaseURL: This is not documented, but basically it adds this info as a
94 - launch argument inside the application executable script resulting in ALL webserver
95 - resource URLs pointing to our embedded webserver resource frameworks.
96 - Consequently, we MUST embed ALL frameworks including Apple's frameworks, not
97 - just the 3rd party ones in wo.localroot if we are to use this feature -->
98 - <woapplication name="${build.app.name}" stdFrameworks="false"
99 - destDir="${dest.dir}"
100 - customInfoPListContent="${customInfoPListContent}"
101 - principalClass="${principalClass}"
102 - webXML="${webXML}"
103 - webXML_CustomContent="${webXML_CustomContent}"
104 - wsDestDir="${wsdest.dir}"
105 - frameworksBaseURL="/WebObjects/${build.app.name}.woa/Frameworks">
106 - <classes dir="${classes.dir}">
107 - <patternset>
108 - <includesfile name="woproject/classes.include.patternset"/>
109 - <excludesfile name="woproject/classes.exclude.patternset"/>
110 - </patternset>
111 - </classes>
112 - <wsresources dir=".">
113 - <patternset>
114 - <includesfile name="woproject/wsresources.include.patternset"/>
115 - <excludesfile name="woproject/wsresources.exclude.patternset"/>
116 - </patternset>
117 - </wsresources>
118 - <resources dir=".">
119 - <patternset>
120 - <includesfile name="woproject/resources.include.patternset"/>
121 - <excludesfile name="woproject/resources.exclude.patternset"/>
122 - </patternset>
123 - </resources>
124 - <!-- KK: Changed embed to true -->
125 - <frameworks root="${wo.wolocalroot}" embed="true">
126 - <patternset>
127 - <includesfile name="woproject/ant.frameworks.wo.wolocalroot"/>
128 - </patternset>
129 - </frameworks>
130 - <!-- KK: Changed embed to true -->
131 - <frameworks root="${wo.wosystemroot}" embed="true">
132 - <patternset>
133 - <includesfile name="woproject/ant.frameworks.wo.wosystemroot"/>
134 - </patternset>
135 - </frameworks>
136 - <!-- KK: Changed embed to true -->
137 - <frameworks root="${user.home}" embed="true">
138 - <patternset>
139 - <includesfile name="woproject/ant.frameworks.user.home"/>
140 - </patternset>
141 - </frameworks>
142 - <otherclasspath root="${wo.wosystemroot}">
143 - <patternset>
144 - <includesfile name="woproject/ant.classpaths.wo.wosystemroot"/>
145 - </patternset>
146 - </otherclasspath>
147 - <lib dir="Libraries">
148 - <include name="*.jar"/>
149 - <exclude name="**/*.woa/**"/>
150 - </lib>
151 - </woapplication>
152 -
153 - <!-- create a tar archive of the application bundle -->
154 - <tar destfile="${dest.dir}/${build.app.name}-app-bundle.tar.gz"
155 - compression="gzip"
156 - basedir="${dest.dir}"
157 - longfile="gnu"
158 - includes="${build.app.name}.woa/**">
159 - </tar>
160 - </target>
161 -
162 - <!-- optional targets -->
163 -
164 - <!-- war target-->
165 - <!-- To use this target remove the if="${never}" statement and create the LICENSE in your project
166 - and create the web.xml file with the woapplication task.-->
167 - <target name="war" if="${never}" depends="ssdd">
168 - <war destfile="${dest.dir}/${project.name}.war" webxml="${dest.dir}/${project.name}/WEB-INF/web.xml" basedir="${dest.dir}/${project.name}">
169 - <lib dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/WebServerResources/Java/">
170 - <include name="JavaWOJSPServlet_client.jar"/>
171 - </lib>
172 - </war>
173 - <copy todir="/tmp/${project.name}.dst/Library/WebObjects/Applications/">
174 - <fileset dir="${dest.dir}">
175 - <include name="${project.name}.woa/**"/>
176 - </fileset>
177 - </copy>
178 - </target>
179 -
180 - <!-- ssdd target-->
181 - <!-- To use this target
182 - 1) remove the if="${never}" statement
183 - 2) change embed=true in the woapp target above
184 - 3) create the LICENSE in your project directory
185 - 4) add JavaWOJSPServlet in your WOFrameworks build path
186 - 5) Edit the build.properties file
187 - 6) set webXML = true
188 - -->
189 - <target name="ssdd" if="${never}" depends="build.woapp">
190 - <mkdir dir="${dest.dir}/${project.name}/WEB-INF/classes"/>
191 - <mkdir dir="${dest.dir}/${project.name}/WEB-INF/tlds"/>
192 - <copy todir="${dest.dir}/${project.name}/WEB-INF/">
193 - <fileset dir="${dest.dir}/${project.name}.woa/Contents/">
194 - <include name="web.xml"/>
195 - </fileset>
196 - </copy>
197 - <copy todir="${dest.dir}/${project.name}/WEB-INF/">
198 - <fileset dir=".">
199 - <include name="LICENSE"/>
200 - </fileset>
201 - </copy>
202 - <copy todir="${dest.dir}/${project.name}/WEB-INF/">
203 - <fileset dir="${dest.dir}">
204 - <include name="${project.name}.woa/**"/>
205 - </fileset>
206 - </copy>
207 - <!-- copy the frameworks to the WEBINFROOT/Library directory -->
208 - <copy todir="${dest.dir}/${project.name}/WEB-INF/">
209 - <fileset dir="${dest.dir}/${project.name}.woa/Contents">
210 - <include name="Library/**"/>
211 - </fileset>
212 - </copy>
213 - <copy todir="${dest.dir}/${project.name}/WEB-INF/">
214 - <fileset dir="${dest.dir}/${project.name}.woa">
215 - <include name="Resources/**"/>
216 - </fileset>
217 - </copy>
218 - <copy todir="${dest.dir}/${project.name}/WEB-INF/lib/">
219 - <fileset dir="${dest.dir}/${project.name}/WEB-INF">
220 - <include name="**/Resources/**/*.jar"/>
221 - </fileset>
222 - <mapper type="flatten"/>
223 - </copy>
224 -
225 - <!-- Get the necessary Frameworks from the webobjects system root instead of the project wrapper -->
226 - <copy todir="${dest.dir}/${project.name}/WEB-INF/lib"
227 - file="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/WebServerResources/Java/JavaWOJSPServlet_client.jar" />
228 -
229 - <copy todir="${dest.dir}/${project.name}/WEB-INF/tlds">
230 - <fileset dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/Resources/">
231 - <include name="WOtaglib_1_0.tld"/>
232 - </fileset>
233 - </copy>
234 - <!-- the WebObject Extensions -->
235 - <copy todir="${dest.dir}/${project.name}/WEB-INF/lib">
236 - <fileset dir="/Library/WebObjects/Extensions/">
237 - <include name="*.jar"/>
238 - <exclude name="servlet.jar"/>
239 - </fileset>
240 - <mapper type="flatten"/>
241 - </copy>
242 -
243 -
244 - <!-- fix the Macos*ClassPath.txt files -->
245 -
246 - <replaceregexp file="${dest.dir}/${project.name}/WEB-INF/${project.name}.woa/Contents/MacOS/MacOSClassPath.txt"
247 - match="APPROOT/Resources/Java/${project.name.lowercase}.jar"
248 - replace="APPROOT/${project.name}.woa/Contents/Resources/Java/${project.name.lowercase}.jar" byline="true" />
249 -
250 - <replaceregexp file="${dest.dir}/${project.name}/WEB-INF/${project.name}.woa/Contents/MacOS/MacOSXServerClassPath.txt"
251 - match="APPROOT/Resources/Java/${project.name.lowercase}.jar"
252 - replace="APPROOT/${project.name}.woa/Contents/Resources/Java/${project.name.lowercase}.jar" byline="true" />
253 -
254 - <!-- fix the web.xml file: the app itself needs project.name/Contents -->
255 -
256 - <replaceregexp file="${dest.dir}/${project.name}/WEB-INF/web.xml" match="WEBINFROOT/Resources/Java/${project.name.lowercase}.jar"
257 - replace="WEBINFROOT/${project.name}.woa/Contents/Resources/Java/${project.name.lowercase}.jar" byline="true" />
258 -
259 - <!-- fix the web.xml file to remove the extra Frameworks/ directory level for the frameworks -->
260 -
261 - <replaceregexp file="${dest.dir}/${project.name}/WEB-INF/web.xml" match="WEBINFROOT/Frameworks//"
262 - replace="WEBINFROOT/" byline="true" />
263 -
264 - </target>
265 -
266 - <!-- copy strings files -->
267 - <target name="copy.strings">
268 - <copy todir="${dest.dir}/${project.name}.woa/Contents/Resources">
269 - <fileset dir="." casesensitive="yes">
270 - <include name="*.strings"/>
271 - <include name="**/*.strings"/>
272 - </fileset>
273 - <mapper type="flatten"/>
274 - </copy>
275 - </target>
276 -
277 - <target name = "compile" depends = "setProps,init.build" >
278 - <mkdir dir = "bin"/>
279 - <javac srcdir = "Sources" destdir = "bin">
280 - <classpath>
281 - <fileset dir="${wo.dir.user.home.library.frameworks}" includesfile = "woproject/ant.frameworks.user.home">
282 - <include name = "**/*.jar"/>
283 - </fileset>
284 - <fileset dir="${wo.wolocalroot}" includesfile = "woproject/ant.frameworks.wo.wolocalroot">
285 - <include name = "**/*.jar"/>
286 - </fileset>
287 - <fileset dir="${wo.wosystemroot}" includesfile = "woproject/ant.frameworks.wo.wosystemroot">
288 - <include name = "**/*.jar"/>
289 - </fileset>
290 - </classpath>
291 - </javac>
292 - </target>
293 -</project>
294 -
webserver_bundle_layout.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -37.2 KB
Content