Changes for page WOApplication
Last modified by Andrew Lindesay on 2011/07/17 09:52
From version 50.1
edited by Andrew Lindesay
on 2006/10/24 16:57
on 2006/10/24 16:57
Change comment:
There is no comment for this version
To version 52.1
edited by Paul Hoadley
on 2011/07/17 09:52
on 2011/07/17 09:52
Change comment:
Migrated to Confluence 4.0
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. apl1 +XWiki.paulh - Content
-
... ... @@ -1,45 +1,326 @@ 1 1 = WOApplication Task Manual = 2 2 3 -This has been transcribed by [[Andrew Lindesay>>http://www.lindesay.co.nz/]] from the old WOProject site. 3 +This has been transcribed by [[Andrew Lindesay>>url:http://www.lindesay.co.nz/||shape="rect"]] from the old WOProject site. 4 4 5 5 == Description == 6 6 7 - ##WOApplication##is an Ant task to build WebObjects applications from a set of files. It does not enforce any particular project structure and can be used to create applications without using the ProjectBuilder or XCode.7 +{{code language="none"}}WOApplication{{/code}} is an Ant task to build WebObjects applications from a set of files. It does not enforce any particular project structure and can be used to create applications without using the ProjectBuilder or XCode. 8 8 9 9 == Properties == 10 10 11 -WOApplication behavior depends on various properties in the wobuild.properties file that specify common locations of the frameworks used by the application. These properties can be initialized with the ant script woproperties.xml. Per default the woapplication task expects this file in $user.home/Library/wobuild.properties. If no file is found the woapplication task resolves the property WOBUILD //PROPERTIES from the java properties and the environment(in this order) to find the file.//11 +WOApplication behavior depends on various properties in the wobuild.properties file that specify common locations of the frameworks used by the application. These properties can be initialized with the ant script woproperties.xml. Per default the woapplication task expects this file in $user.home/Library/wobuild.properties. If no file is found the woapplication task resolves the property WOBUILD_PROPERTIES from the java properties and the environment(in this order) to find the file. 12 12 13 -|=Property from the wobuild.properties file|=Description|=Default 14 -|wo.wosystemroot|Usually this is a WebObjects installation directory, like "C:pple".|NEXT//ROOT environment variable, or root directory "/".// 15 -|wo.localroot|Usually this is a "Local" directory under the directory specified by "wo.woroot".|${{wo.woroot}}{{/wo.woroot}}/Local 16 -|wo.homeroot|Usually this is a user home directory.|${{user.home}}{{/user.home}} 13 +|=((( 14 +Property from the wobuild.properties file 15 +)))|=((( 16 +Description 17 +)))|=((( 18 +Default 19 +))) 20 +|((( 21 +wo.wosystemroot 22 +)))|((( 23 +Usually this is a WebObjects installation directory, like "C:\Apple". 24 +)))|((( 25 +NEXT_ROOT environment variable, or root directory "/". 26 +))) 27 +|((( 28 +wo.wolocalroot 29 +)))|((( 30 +Usually this is a "Local" directory under the directory specified by "wo.woroot". 31 +)))|((( 32 +${wo.woroot}/Local 33 +))) 34 +|((( 35 +wo.homeroot 36 +)))|((( 37 +Usually this is a user home directory. 38 +)))|((( 39 +${user.home} 40 +))) 17 17 18 18 == Parameters == 19 19 20 -|=Attribute|=Description|=Required 21 -|name|Name of the application (without .woa extension).|Yes 22 -|chmod|Optional value for the chmod command executed by the WOApplication task. The default is "gu+x". The chmod command is only executed on the first build of the application and only on "Unix" platforms. The default is "750".|No 23 -|destDir|Destination directory where the application woa should be created.|Yes 24 -|wsDestDir|Destination directory where WebServerResorces should be copied during split install (presense of this parameter will trigger split install). WebServerResources will be created under [[wsDestDir]]/WebObjects/AppName.woa/Contents/.|No 25 -|principalClass|Subclass of WOApplication to use.|Application 26 -|customInfoPListContent|String to append to the Info.plist.|No 27 -|stdFrameworks|If set to true, a set of standard frameworks will be associated with the deployed application (default is true). "Standard" frameworks are: JavaWebObjects, JavaWOExtensions, JavaEOAccess, JavaEOControl, JavaFoundation, JavaJDBCAdaptor, JavaXML.|No 28 -|jvmOptions|String for the JVM options in the classpath.|No 29 -|webXML|Generate web.xml|No 30 -|webXML//WOROOT//|Optional parameter for the web.xml|No 31 -|webXML//LOCALROOT//|Optional parameter for the web.xml|No 32 -|webXML//WOAINSTALLROOT//|Optional parameter for the web.xml|No 33 -|webXML//WOAppMode//|Optional parameter for the web.xml|No 34 -|webXML//WOtaglib//|Optional parameter for the web.xml|No 35 -|webXML//CustomContent//|Optional parameter for the web.xml|No 44 +|=((( 45 +Attribute 46 +)))|=((( 47 +Description 48 +)))|=((( 49 +Required 50 +))) 51 +|((( 52 +name 53 +)))|((( 54 +Name of the application (without .woa extension). 55 +)))|((( 56 +Yes 57 +))) 58 +|((( 59 +chmod 60 +)))|((( 61 +Optional value for the chmod command executed by the WOApplication task. The default is "gu+x". The chmod command is only executed on the first build of the application and only on "Unix" platforms. The default is "750". 62 +)))|((( 63 +No 64 +))) 65 +|((( 66 +destDir 67 +)))|((( 68 +Destination directory where the application woa should be created. 69 +)))|((( 70 +Yes 71 +))) 72 +|((( 73 +wsDestDir 74 +)))|((( 75 +Destination directory where WebServerResorces should be copied during split install (presense of this parameter will trigger split install). WebServerResources will be created under [[doc:wsDestDir]]/WebObjects/AppName.woa/Contents/. 76 +)))|((( 77 +No 78 +))) 79 +|((( 80 +principalClass 81 +)))|((( 82 +Subclass of WOApplication to use. 83 +)))|((( 84 +Application 85 +))) 86 +|((( 87 +customInfoPListContent 88 +)))|((( 89 +String to append to the Info.plist. 90 +)))|((( 91 +No 92 +))) 93 +|((( 94 +stdFrameworks 95 +)))|((( 96 +If set to true, a set of standard frameworks will be associated with the deployed application (default is true). "Standard" frameworks are: JavaWebObjects, JavaWOExtensions, JavaEOAccess, JavaEOControl, JavaFoundation, JavaJDBCAdaptor, JavaXML. 97 +)))|((( 98 +No 99 +))) 100 +|((( 101 +jvm 102 +)))|((( 103 +Path to the JVM binary. Defaults to 'java' 104 +)))|((( 105 +No 106 +))) 107 +|((( 108 +jvmOptions 109 +)))|((( 110 +String for the JVM options in the classpath. 111 +)))|((( 112 +No 113 +))) 114 +|((( 115 +jdb 116 +)))|((( 117 +Path to the JVM binary. Defaults to 'java' 118 +)))|((( 119 +No 120 +))) 121 +|((( 122 +jdbOptions 123 +)))|((( 124 +String for the jdb options in the classpath. 125 +)))|((( 126 +No 127 +))) 128 +|((( 129 +webXML 130 +)))|((( 131 +Generate web.xml 132 +)))|((( 133 +No 134 +))) 135 +|((( 136 +webXML_WOROOT 137 +)))|((( 138 +Optional parameter for the web.xml 139 +)))|((( 140 +No 141 +))) 142 +|((( 143 +webXML_LOCALROOT 144 +)))|((( 145 +Optional parameter for the web.xml 146 +)))|((( 147 +No 148 +))) 149 +|((( 150 +webXML_WOAINSTALLROOT 151 +)))|((( 152 +Optional parameter for the web.xml 153 +)))|((( 154 +No 155 +))) 156 +|((( 157 +webXML_WOAppMode 158 +)))|((( 159 +Optional parameter for the web.xml 160 +)))|((( 161 +No 162 +))) 163 +|((( 164 +webXML_WOtaglib 165 +)))|((( 166 +Optional parameter for the web.xml 167 +)))|((( 168 +No 169 +))) 170 +|((( 171 +webXML_CustomContent 172 +)))|((( 173 +Optional parameter for the web.xml 174 +)))|((( 175 +No 176 +))) 177 +|((( 178 +cfBundleVersion 179 +)))|((( 180 +CFBundleVersion for the Info.plist. Default is no version. 181 +)))|((( 182 +No 183 +))) 184 +|((( 185 +cfBundleShortVersion 186 +)))|((( 187 +CFBundleShortVersionString for the Info.plist. Default is no version. 188 +)))|((( 189 +No 190 +))) 191 +|((( 192 +cfBundleID 193 +)))|((( 194 +CFBundleIndetifier for the Info.plist. Defaults to 'com.myapp'. 195 +)))|((( 196 +No 197 +))) 198 +|((( 199 +javaVersion 200 +)))|((( 201 +JVMVersion for the Info.plist. Used for selecting JVM compatibility. Defaults to '1.5+'. 202 +)))|((( 203 +No 204 +))) 205 +|((( 206 +frameworksBaseURL 207 +)))|((( 208 +This denotes the directory containing the framework webserver resources bundles (MyFramework.framework, ERExtensions.framework, etc.). 209 +This is typically useful for a embedded split install whereby all webserver resource frameworks (all = localroot and systemroot) are embedded in the webserver split install application bundle. The advantage of doing this is of course is clean upgrades with current versions of framework resources being used independently of what is installed on the deployment server. 210 +Defaults to '/WebObjects/Frameworks'. 211 +The URL is relative to the webserver document root. 212 +For example: frameworksBaseURL="/WebObjects/${project.name}.woa/Frameworks" 213 +)))|((( 214 +No 215 +))) 216 +|((( 217 +startupScriptName 218 +)))|((( 219 +..... 220 +)))|((( 221 +No 222 +))) 36 36 37 37 == Nested Elements == 38 38 39 39 === classes === 40 40 41 -The nested ##classes##element specifies a [[FileSet>>http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html]]. All files included in this fileset will end up in the##Contents/Resources/Java/**.jar**##****228 +The nested {{code language="none"}}classes{{/code}} element specifies a [[FileSet>>url:http://ant.apache.org/manual/Types/fileset.html||shape="rect"]]. All files included in this fileset will end up in the {{code language="none"}}Contents/Resources/Java/*.jar{{/code}} file of the application. 42 42 43 43 === resources === 44 44 45 -The nested ##resources## element specifies a [[FileSet>>http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html]]. All files included in this fileset will end up in the ##Contents/Resources## directory of the application. For the discussion of resource localization issues follow this link. 232 +The nested {{code language="none"}}resources{{/code}} element specifies a [[FileSet>>url:http://ant.apache.org/manual/Types/fileset.html||shape="rect"]]. All files included in this fileset will end up in the {{code language="none"}}Contents/Resources{{/code}} directory of the application. For the discussion of resource localization issues follow [[this link>>doc:WOProject-Localization]]. 233 + 234 +=== wsresources === 235 + 236 +The nested {{code language="none"}}wsresources{{/code}} element specifies a [[FileSet>>url:http://ant.apache.org/manual/Types/fileset.html||shape="rect"]]. All files included in this fileset will end up in the {{code language="none"}}Contents/WebServerResources{{/code}} directory of the application. For the discussion of resource localization issues follow [[this link>>doc:WOProject-Localization]]. 237 + 238 +=== frameworks === 239 + 240 +The nested {{code language="none"}}frameworks{{/code}} is a [[FrameworkSet>>doc:WOProject-FrameworkSet]] structure that specifies the names of the WebObjects Frameworks that this application is dependant upon. The jar files from these frameworks will be referenced in varios platform-specific depoyment files (such as CLASSPATH.TXT), and specified in the web.xml classpath if an application is deployed as a servlet. When building a FileSet, path should match up to the "*.framework" directory (no need to match individual JAR files). 241 + 242 +To embed frameworks set embed to true. 243 + 244 +{{note title="Nov13/08 email from Kieran Kelleher" bgColor="#FFFFCE"}} 245 +Q: //Kieran Kelleher// 246 + With regards the woapplication task and nested elements, what does the eclipse="true" attribute of the 'frameworks' nested element do? 247 + {{code language="none"}}<frameworks dir="ProjectLocal" embed="${embed.ProjectLocal}" eclipse="true" />{{/code}} 248 + 249 +A: //Mike Schrag// 250 + eclipse="true" makes the <frameworks> tag parse your .classpath file to determine framework dependencies. 251 +{{/note}} 252 + 253 +=== lib === 254 + 255 +The nested lib element specifies a [[FileSet>>url:http://ant.apache.org/manual/Types/fileset.html||shape="rect"]]. This should be a fileset of jar libraries required by your application. All files in this fileset will end up in the {{code language="none"}}Resources/Java{{/code}} folder of the application, and will be included on the classpath for this application. 256 + 257 +To embed jars set embed to true. 258 + 259 +=== otherclasspath === 260 + 261 +This nested element is used to add an arbitrary directory or file path to the runtime classpath. For example on Mac OS X, the directory at APPROOT/Resources/SSLKeyStore/ can be added to the runtime classpath by doing something like this: 262 + 263 +{{code}} 264 + 265 +<woapplication> 266 + [...] 267 + <otherclasspath dir="." embed="true"> 268 + <include name="Resources/SSLKeyStore" /> 269 + </otherclasspath> 270 +</woapplication> 271 + 272 +{{/code}} 273 + 274 +== Examples == 275 + 276 +Create an application "MyApp" with a set of standard frameworks: 277 + 278 +{{noformat}} 279 + 280 +<taskdef name="woapplication" classname="org.objectstyle.woproject.ant.WOApplication"> 281 + <classpath refid="classpath"/> 282 +</taskdef> 283 + 284 +<woapplication name="MyApp" destDir="${dist}/WebObjects/Applications"> 285 + <classes dir="${build}/common"> 286 + <exclude name="*.properties"/> 287 + </classes> 288 + <classes dir="${build}/business"> 289 + <exclude name="*.properties"/> 290 + </classes> 291 + <resources dir="src/resources"> 292 + <include name="*.eomodeld/**"/> 293 + <include name="*.wo/**"/> 294 + </resources> 295 + <wsresources dir="src/frameworks/WSResources"> 296 + <include name="Images/**"/> 297 + </wsresources> 298 +</woapplication> 299 + 300 +{{/noformat}} 301 + 302 +Create an application "MyApp" with no implicit standard frameworks and a set of custom frameworks located under HOMEROOT (defined from the value of {{code language="none"}}wo.homeroot{{/code}} property): 303 + 304 +{{noformat}} 305 + 306 +<woapplication name="MyApp" stdFrameworks="false" destDir="${dist}/WebObjects/Applications"> 307 + ... 308 + <frameworks dir="../Frameworks"> 309 + <include name="**/*.framework"/> 310 + </frameworks> 311 +</woapplication> 312 + 313 +{{/noformat}} 314 + 315 +Create an application "MyApp" with embedded frameworks: 316 + 317 +{{noformat}} 318 + 319 +<woapplication name="MyApp" destDir="${dist}/WebObjects/Applications"> 320 + ... 321 + <frameworks dir="../Frameworks"embed="true"> 322 + <include name="**/*.framework"/> 323 + </frameworks> 324 +</woapplication> 325 + 326 +{{/noformat}}