Wiki source code of WOFramework
Last modified by Andrew Lindesay on 2007/02/27 03:01
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
6.1 | 1 | = WOFramework Task Manual = |
2 | |||
![]() |
20.1 | 3 | This has been transcribed by [[Andrew Lindesay>>url:http://www.lindesay.co.nz||shape="rect"]] from the old WOProject site. |
![]() |
6.1 | 4 | |
5 | == Description == | ||
6 | |||
![]() |
20.1 | 7 | {{code language="none"}}WOFramework{{/code}} is an Ant task to build WebObjects (5.1 or higher) frameworks from a set of files. It does not enforce any particular project structure and can be used to create frameworks without using the ProjectBuilder or X-Code tool. |
![]() |
6.1 | 8 | |
9 | == Parameters == | ||
10 | |||
![]() |
20.1 | 11 | |=((( |
12 | Attribute | ||
13 | )))|=((( | ||
14 | Description | ||
15 | )))|=((( | ||
16 | Required | ||
17 | ))) | ||
18 | |((( | ||
19 | name | ||
20 | )))|((( | ||
21 | Name of the framework (without {{code language="none"}}.framework{{/code}} extension). | ||
22 | )))|((( | ||
23 | Yes | ||
24 | ))) | ||
25 | |((( | ||
26 | destDir | ||
27 | )))|((( | ||
28 | Destination directory where the framework should be created. | ||
29 | )))|((( | ||
30 | Yes | ||
31 | ))) | ||
32 | |((( | ||
33 | wsDestDir | ||
34 | )))|((( | ||
35 | Destination directory where WebServerResorces should be copied during split install (presense of this parameter will trigger split install). WebServerResources will be created under ~{{{code language="none"}}wsDestDir}/WebObjects/Frameworks/FrameworkName.framework/{{/code}}. | ||
36 | )))|((( | ||
37 | No | ||
38 | ))) | ||
39 | |((( | ||
40 | principalClass | ||
41 | )))|((( | ||
42 | The value of the NSPrincipal class in the Info.plist to use. | ||
43 | )))|((( | ||
44 | No | ||
45 | ))) | ||
46 | |((( | ||
47 | customInfoPListContent | ||
48 | )))|((( | ||
49 | String to append to the Info.plist. | ||
50 | )))|((( | ||
51 | No | ||
52 | ))) | ||
53 | |((( | ||
54 | eoAdaptorClassName | ||
55 | )))|((( | ||
56 | EOAdaptorClassName. Only useful for EOAdaptor frameworks. | ||
57 | )))|((( | ||
58 | No | ||
59 | ))) | ||
60 | |((( | ||
61 | version | ||
62 | )))|((( | ||
63 | Version for the Info.plist | ||
64 | )))|((( | ||
65 | No | ||
66 | ))) | ||
![]() |
6.1 | 67 | |
68 | == Nested Elements == | ||
69 | |||
70 | === classes === | ||
71 | |||
![]() |
20.1 | 72 | The nested classes element specifies a [[FileSet>>url:http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html||shape="rect"]]. All files included in this fileset will end up in the {{code language="none"}}Resources/Java/*.jar{{/code}} file of the framework. |
![]() |
15.1 | 73 | |
74 | === resources === | ||
75 | |||
![]() |
22.1 | 76 | The nested {{code language="none"}}resources{{/code}} element specifies a [[FileSet>>url:http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html||shape="rect"]]. All files included in this fileset will end up in the {{code language="none"}}Resources{{/code}} directory of the framework. For the discussion of resource localization issues follow [[this link>>doc:WOL.Home.WOProject-Ant.WOFramework.WOProject-Localization.WebHome]]. |
![]() |
15.1 | 77 | |
78 | === wsresources === | ||
79 | |||
![]() |
22.1 | 80 | The nested {{code language="none"}}wsresources{{/code}} element specifies a [[FileSet>>url:http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html||shape="rect"]]. All files included in this fileset will end up in the {{code language="none"}}WebServerResources{{/code}} directory of the framework. For the discussion of resource localization issues follow [[this link>>doc:WOL.Home.WOProject-Ant.WOFramework.WOProject-Localization.WebHome]]. |
![]() |
15.1 | 81 | |
82 | === lib === | ||
83 | |||
![]() |
20.1 | 84 | The nested {{code language="none"}}lib{{/code}} element specifies a [[FileSet>>url:http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html||shape="rect"]]. This should be a fileset of jar libraries required by your framework. All files in this fileset will end up in the {{code language="none"}}Resources/Java{{/code}} folder of the framework, and will be included on the classpath for this framework. |
![]() |
15.1 | 85 | |
86 | == Examples == | ||
87 | |||
88 | {{noformat}} | ||
89 | |||
90 | <taskdef name="woframework" classname="org.objectstyle.woproject.ant.WOFramework"> | ||
91 | <classpath refid="classpath"/> | ||
92 | </taskdef> | ||
93 | <woframework name="MyFramework" destDir="${dist}/Frameworks"> | ||
94 | <classes dir="${build}/common"> | ||
95 | <exclude name="*.properties"/> | ||
96 | </classes> | ||
97 | <classes dir="${build}/business"> | ||
98 | <exclude name="*.properties"/> | ||
99 | </classes> | ||
100 | <resources dir="src/resources"> | ||
101 | <include name="*.eomodeld/**"/> | ||
102 | <include name="*.wo/**"/> | ||
103 | </resources> | ||
104 | <wsresources dir="src/frameworks/WSResources"> | ||
105 | <include name="Images/**"/> | ||
106 | </wsresources> | ||
107 | <lib dir="lib"> | ||
108 | <include name="**/*.jar"/> | ||
109 | </lib> | ||
110 | </woframework> | ||
111 | |||
112 | {{/noformat}} | ||
113 | |||
114 | Note that it can be useful to build a framework with only libraries - what you get is a framework that is just a wrapper around one or more existing jar files. For example this enables you to create a framework of a set of third party jar files that your other WOFrameworks and WOApplications can include. | ||
115 | |||
116 | {{noformat}} | ||
117 | |||
118 | <taskdef name="woframework" classname="org.objectstyle.woproject.ant.WOFramework"> | ||
119 | <classpath refid="classpath"/> | ||
120 | </taskdef> | ||
121 | <woframework name="JavaMail" destDir="${dist}/Frameworks"> | ||
122 | <lib dir="lib"> | ||
123 | <include name="activation.jar"/> | ||
124 | <include name="mail.jar"/> | ||
125 | </lib> | ||
126 | </woframework> | ||
127 | |||
128 | {{/noformat}} |