Version 24.1 by David Avendasora on 2011/04/29 14:44

Hide last authors
Steve Peery 15.1 1 {{tip title="Pro Tip"}}
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 {{/tip}}
4
michaelsd 19.1 5 {{toc maxLevel="3"}}{{/toc}}
D Tim Cummings 17.1 6
David Avendasora 23.1 7 = Building =
Steve Peery 15.1 8
David Avendasora 23.1 9 {{note title="Requires WebObjects"}}
Steve Peery 15.1 10
David Avendasora 23.1 11 These build instructions require the WebObjects frameworks to already be installed in the normal location:
12 * Mac OS X: {{/System/Library/Framworks/}}
13 * Linux: {{/Library/Frameworks}}
Steve Peery 15.1 14
David Avendasora 23.1 15 Otherwise you will get compiler errors like this:
michaelsd 19.1 16 {noformat}
Steve Peery 15.1 17 [wocompile] /MyProjects/MyFramework/Sources/com/mycompany/myapp/myclass:10:
18 package com.webobjects.appserver does not exist
19 [wocompile] import com.webobjects.appserver.WOContext;
michaelsd 19.1 20 {noformat}
Steve Peery 15.1 21
22 {{/note}}
23
24 === Command Line / Terminal ===
25
michaelsd 19.1 26 * h5. Standard WebObjects Framework
D Tim Cummings 17.1 27 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.
Steve Peery 15.1 28
michaelsd 19.1 29 {{code value="none"}}
30
Steve Peery 15.1 31 cd /my/project/
32 ant build
33
34 {{/code}}
35
michaelsd 19.1 36 By default, the built framework will be put in a ##dist## directory in your project's root.
Steve Peery 15.1 37
michaelsd 19.1 38 * h5. Project Wonder Frameworks
39 This assumes that you have already downloaded the Wonder source code. Make a note of the location of the Wonder directory.
40 If you are building Project Wonder's frameworks you will use these commands instead:
Steve Peery 15.1 41
michaelsd 19.1 42 {{code value="none"}}
Steve Peery 15.1 43
44 cd /path/to/Wonder
45 ant frameworks
46
47 {{/code}}
48
michaelsd 19.1 49 By default, all the Wonder frameworks will be built to (##/Roots##) (in your home directory).
Steve Peery 15.1 50
David Avendasora 21.1 51 === Eclipse/WOLips ===
52
53 * h5. Standard WebObjects Framework
54 Right-Click on your project in Eclipse and select **WOLips Ant Tools > Install**
55 [[image:WOLipsAntInstall.png||border="1"]]
56 This will build and install the framework in the location defined in the WOLips preferences, overwriting any previously installed version of the framework.
57
58 * h5. Project Wonder Frameworks
59 **You can not build projects from Wonder this way.** You must either use the command line or Hudson/Jenkins methods
60
61 === Hudson/Jenkins ===
62
63 In general, it is recommended that you use Hudson/Jenkins to build your WebObjects frameworks and applications, but it is not required. You can build either from the Terminal as outlined below, or from within Eclipse/WOlips directly (except for Project Wonder's frameworks).
64
Steve Peery 15.1 65 = Customizing the Build =
66
67 By modifying the values in the build.properties and wolips.properties files or by passing in arguments to the Ant command, you can change where Ant will look for dependencies (binary frameworks, libraries, etc.) and where it will install the build products.
68
69 = Installing =
70
71 Assuming you already cloned and built Wonder from source using the method outlined above, you can use the following procedure pull the latest changes into your local repository.
72
73 ===== Install the frameworks =====
74
michaelsd 19.1 75 {{code value="none"}}
76 sudo ant frameworks.install
Steve Peery 15.1 77 {{/code}}
78
michaelsd 19.1 79 This copies the built frameworks from ##/Roots## to the runtime Frameworks directory:
Steve Peery 15.1 80
michaelsd 19.1 81 * Mac OS X: ##/Library/Framworks/##
82 * Linux: ##/Local/Library/Frameworks##
Steve Peery 15.1 83
84 You can combine the build and install steps by simply executing this Ant command:
85
michaelsd 19.1 86 {{code value="none"}}
87 sudo ant frameworks frameworks.install
Steve Peery 15.1 88 {{/code}}
89
90 === Upgrading ===
91
92 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.
93
michaelsd 19.1 94 1. h5. Navigate to the original Wonder source directory that you created above during initial source installation
Steve Peery 15.1 95
michaelsd 19.1 96 {{code value="none"}}
Steve Peery 15.1 97 cd /path/to/WonderSource
98 {{/code}}
99
michaelsd 19.1 100 1. h5. Pull the changes you do not have and merge them with your local repository
101
102 {{code value="none"}}
Steve Peery 15.1 103 git pull
104 {{/code}}
105
michaelsd 19.1 106 1. h5. Build the frameworks.
107
108 {{code value="none"}}
Steve Peery 15.1 109 ant frameworks
110 {{/code}}
111
michaelsd 19.1 112 1. h5. Navigate to the Roots directory that was automatically created by the initial Source installation procedure above
113
114 {{code value="none"}}
Steve Peery 15.1 115 cd ~/Roots/
116 {{/code}}
117
michaelsd 19.1 118 1. h5. Delete all installed frameworks whose names match the built frameworks in this Roots build folder
119
120 {{code value="none"}}
Steve Peery 15.1 121 for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done
122 {{/code}}