Last modified by Pascal Robert on 2013/12/18 02:55

From version 16.1
edited by Steve Peery
on 2012/10/23 23:30
Change comment: There is no comment for this version
To version 19.1
edited by michaelsd
on 2012/07/01 11:35
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.speery
1 +XWiki.michaelsd
Content
... ... @@ -2,84 +2,39 @@
2 2  If you use Hudson/Jenkins to build your WebObjects Frameworks and Applications, then you do not need to build or install either the Project Wonder frameworks or even your own Frameworks on your development machine, just having yours and the individual Wonder source code projects (ERJars, ERExtensions, AJAX, etc) open in your eclipse workspace is sufficient.
3 3  {{/tip}}
4 4  
5 -{{toc maxLevel="3"/}}
5 +{{toc maxLevel="3"}}{{/toc}}
6 6  
7 7  = Before You Build =
8 8  
9 -When building a Framework project, Ant needs to be able to find WebObjects. WebObjects itself is a set of Frameworks just like the one you are building. They can be installed anywhere using [[these instructions>>doc:WO.Installing WebObjects 5\.4 on Snow Leopard]].
9 +When building a Framework project, Ant needs to be able to find WebObjects. WebObjects itself is a set of Frameworks just like the one you are building. They can be installed anywhere using [[these instructions>>WO:Installing WebObjects 5.4 on Snow Leopard]].
10 10  
11 -Where Ant will look for WebObjects is specified by the {{code language="none"}}wo.system.frameworks{{/code}} build property. This property can be set in a number of locations, or even passed as a command-line property to Ant.
11 +Where Ant will look for WebObjects is specified by the ##wo.system.frameworks## build property. This property can be set in a number of locations, or even passed as a command-line property to Ant.
12 12  
13 13  Where Ant looks for this property is different for each method of building a Framework:
14 14  
15 -1. (((
16 -====== WOJenkins Jobs ======
15 +1. h6. WOJenkins Jobs
16 +11. Completely managed for you by WOJenkins
17 +11. Manually overridden as defined in Manual Jenkins Jobs below.
18 +1. h6. Manual Jenkins Jobs
19 +11. Properties specified in the //Targets// line of an Invoke Ant build task using **##-D<property>=<value>##**
20 +11. Properties specified in the //Properties// line of an Invoke Ant build task using (the equivalent of **##-propertyfile <name>##**)
21 +1. h6. Eclipse/WOLips
22 +11. Properties specified for the Eclipse Workspace under Eclipse -> Preferences -> WOLips - > **System Frameworks**
23 +11. The ##build.properties## file in the same directory as the build.xml file as specified by **##<property file="build.properties" />##** task in the build.xml file.
24 +1. h6. Command Line
25 +11. Properties specified in the Ant command: **##-D<property>=<value>##**
26 +11. A properties file specified in the Ant command: **##-propertyfile <name>##**
27 +11. The ##build.properties## file in the same directory as the build.xml file as specified by **##<property file="build.properties" />##** task in the build.xml file.
17 17  
18 -1. Completely managed for you by WOJenkins
19 -1. Manually overridden as defined in Manual Jenkins Jobs below.
20 -)))
21 -1. (((
22 -====== Manual Jenkins Jobs ======
29 +{{note title="Can"}}
23 23  
24 -1. Properties specified in the //Targets// line of an Invoke Ant build task using
25 -
26 -{{code language="none"}}
27 --D<property>=<value>
28 -{{/code}}
29 -1. Properties specified in the //Properties// line of an Invoke Ant build task using (the equivalent of
30 -
31 -{{code language="none"}}
32 --propertyfile <name>
33 -{{/code}})
34 -)))
35 -1. (((
36 -====== Eclipse/WOLips ======
37 -
38 -1. Properties specified for the Eclipse Workspace under Eclipse -> Preferences -> WOLips - > **System Frameworks**
39 -1. The
40 -
41 -{{code language="none"}}
42 -build.properties
43 -{{/code}} file in the same directory as the build.xml file as specified by
44 -
45 -{{code language="none"}}
46 -<property file="build.properties" />
47 -{{/code}} task in the build.xml file.
48 -)))
49 -1. (((
50 -====== Command Line ======
51 -
52 -1. Properties specified in the Ant command:
53 -
54 -{{code language="none"}}
55 --D<property>=<value>
56 -{{/code}}
57 -1. A properties file specified in the Ant command:
58 -
59 -{{code language="none"}}
60 --propertyfile <name>
61 -{{/code}}
62 -1. The
63 -
64 -{{code language="none"}}
65 -build.properties
66 -{{/code}} file in the same directory as the build.xml file as specified by
67 -
68 -{{code language="none"}}
69 -<property file="build.properties" />
70 -{{/code}} task in the build.xml file.
71 -)))
72 -
73 -{{note title="Can't Find WebObjects"}}
74 74  If Ant can't find the WebObjects frameworks, you will get compiler errors like this:
75 -
76 -{{noformat}}
77 -
32 +{noformat}
78 78  [wocompile] /MyProjects/MyFramework/Sources/com/mycompany/myapp/myclass:10:
79 79   package com.webobjects.appserver does not exist
80 80  [wocompile] import com.webobjects.appserver.WOContext;
36 +{noformat}
81 81  
82 -{{/noformat}}
83 83  {{/note}}
84 84  
85 85  = Building =
... ... @@ -90,73 +90,42 @@
90 90  
91 91  === Eclipse/WOLips ===
92 92  
93 -* (((
94 -===== Standard WebObjects Framework =====
95 -
48 +* h5. Standard WebObjects Framework
96 96  Right-Click on your project in Eclipse and select **WOLips Ant Tools > Install**
97 - [[image:attach:WOLipsAntInstall.png]]
98 -This will build and install the framework in the location defined in the WOLips preferences, overwriting any previously installed version of the framework.
50 +[[image:WOLipsAntInstall.png||border="1"]]
51 +This will build and install the framework in the location defined in the WOLips preferences, overwriting any previously installed version of the framework.
99 99  
100 -{{note title="BUILD FAILED"}}
101 -If Ant can't write to the WebObjects frameworks directory, you will get an error like this:
102 -
103 -{{noformat}}
104 -
105 -Directory /Library/WebObjects/Versions/WebObjects543/Library/Frameworks/YourFramework.framework
106 -creation was not successful for an unknown reason.
107 -
108 -{{/noformat}}
109 -
110 -Give write access to the directory with these commands in Terminal:
111 - sudo chmod 757 /Library/WebObjects/Versions/WebObjects543/Library/Frameworks/
112 - sudo chmod 757 /Library/WebObjects/Versions/WebObjects543/Library/WebObjects/Applications
113 -{{/note}}
114 -)))
115 -
116 -* (((
117 -===== Project Wonder Frameworks =====
118 -
53 +* h5. Project Wonder Frameworks
119 119  **You can not build projects from Wonder this way.** You must either use the command line or Hudson/Jenkins methods
120 -)))
121 121  
122 122  === Command Line / Terminal ===
123 123  
124 -You have to install woproject.jar first and make it available for ant before the following instructions will work. (see [[doc:WEB.Building a WebObjects Project||anchor="Overview"]] first)
58 +You have to install woproject.jar first and make it available for ant before the following instructions will work. (see [[Building a WebObjects Project||anchor="Overview"]] first)
125 125  
126 -* (((
127 -===== Standard WebObjects Framework =====
60 +* h5. Standard WebObjects Framework
61 +You can build a standard WebObjects Framework project by calling Ant and passing it the Project directory, and the name of the build target contained in the build.xml file at your project's root.
128 128  
129 -You can build a standard WebObjects Framework project by calling Ant and passing it the Project directory, and the name of the build target contained in the build.xml file at your project's root.
63 +{{code value="none"}}
130 130  
131 -{{code 0="none"}}
132 132  cd /my/project/
133 133  ant build
134 -{{/code}} By default, the built framework will be put in a
135 135  
136 -{{code language="none"}}
137 -dist
138 138  {{/code}}
139 139  
140 - directory in your project's root.
141 -)))
70 +By default, the built framework will be put in a ##dist## directory in your project's root.
142 142  
143 -* (((
144 -===== Project Wonder Frameworks =====
145 -
72 +* h5. Project Wonder Frameworks
146 146  This assumes that you have already downloaded the Wonder source code. Make a note of the location of the Wonder directory.
147 - If you are building Project Wonder's frameworks you will use these commands instead:
74 +If you are building Project Wonder's frameworks you will use these commands instead:
148 148  
149 -{{code 0="none"}}
76 +{{code value="none"}}
77 +
150 150  cd /path/to/Wonder
151 151  ant frameworks
152 -{{/code}} By default, all the Wonder frameworks will be built to (
153 153  
154 -{{code language="none"}}
155 -~/Roots
156 156  {{/code}}
157 157  
158 -) (in your home directory).
159 -)))
83 +By default, all the Wonder frameworks will be built to (##/Roots##) (in your home directory).
160 160  
161 161  = Customizing the Build =
162 162  
... ... @@ -168,18 +168,18 @@
168 168  
169 169  ===== Install the frameworks =====
170 170  
171 -{{code 0="none"}}
95 +{{code value="none"}}
172 172  sudo ant frameworks.install
173 173  {{/code}}
174 174  
175 -This copies the built frameworks from {{code language="none"}}~/Roots{{/code}} to the runtime Frameworks directory:
99 +This copies the built frameworks from ##/Roots## to the runtime Frameworks directory:
176 176  
177 -* Mac OS X: {{code language="none"}}/Library/Frameworks/{{/code}} or {{code language="none"}}/Library/WebObjects/Versions/WebObjects543/Library/Frameworks/{{/code}}
178 -* Linux: {{code language="none"}}/Local/Library/Frameworks{{/code}}
101 +* Mac OS X: ##/Library/Framworks/##
102 +* Linux: ##/Local/Library/Frameworks##
179 179  
180 180  You can combine the build and install steps by simply executing this Ant command:
181 181  
182 -{{code 0="none"}}
106 +{{code value="none"}}
183 183  sudo ant frameworks frameworks.install
184 184  {{/code}}
185 185  
... ... @@ -187,38 +187,32 @@
187 187  
188 188  This will clean out the existing versions of the frameworks. This isn't strictly necessary, you could just re-install over the top of the old frameworks, but deleting then manually copying over the new ones will clean up any old frameworks that are no longer included in the standard build.
189 189  
190 -1. (((
191 -===== Navigate to the original Wonder source directory that you created above during initial source installation =====
114 +1. h5. Navigate to the original Wonder source directory that you created above during initial source installation
192 192  
193 -{{code 0="none"}}
116 +{{code value="none"}}
194 194  cd /path/to/WonderSource
195 195  {{/code}}
196 -)))
197 -1. (((
198 -===== Pull the changes you do not have and merge them with your local repository =====
199 199  
200 -{{code 0="none"}}
120 +1. h5. Pull the changes you do not have and merge them with your local repository
121 +
122 +{{code value="none"}}
201 201  git pull
202 202  {{/code}}
203 -)))
204 -1. (((
205 -===== Build the frameworks. =====
206 206  
207 -{{code 0="none"}}
126 +1. h5. Build the frameworks.
127 +
128 +{{code value="none"}}
208 208  ant frameworks
209 209  {{/code}}
210 -)))
211 -1. (((
212 -===== Navigate to the Roots directory that was automatically created by the initial Source installation procedure above =====
213 213  
214 -{{code 0="none"}}
132 +1. h5. Navigate to the Roots directory that was automatically created by the initial Source installation procedure above
133 +
134 +{{code value="none"}}
215 215  cd ~/Roots/
216 216  {{/code}}
217 -)))
218 -1. (((
219 -===== Delete all installed frameworks whose names match the built frameworks in this Roots build folder =====
220 220  
221 -{{code 0="none"}}
138 +1. h5. Delete all installed frameworks whose names match the built frameworks in this Roots build folder
139 +
140 +{{code value="none"}}
222 222  for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done
223 223  {{/code}}
224 -)))