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

From version 36.1
edited by David Avendasora
on 2011/04/29 14:43
Change comment: There is no comment for this version
To version 39.1
edited by Steve Peery
on 2012/10/23 21:56
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Building and Installing a WO Framework with Ant
1 +Building and Installing a Framework with Ant
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.avendasora
1 +XWiki.speery
Content
... ... @@ -4,15 +4,31 @@
4 4  
5 5  {{toc maxLevel="3"}}{{/toc}}
6 6  
7 -= Building =
7 += Before You Build =
8 8  
9 -{{note title="Requires WebObjects"}}
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 -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}}
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.
14 14  
15 -Otherwise you will get compiler errors like this:
13 +Where Ant looks for this property is different for each method of building a Framework:
14 +
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.
28 +
29 +{{note title="Can"}}
30 +
31 +If Ant can't find the WebObjects frameworks, you will get compiler errors like this:
16 16  {noformat}
17 17  [wocompile] /MyProjects/MyFramework/Sources/com/mycompany/myapp/myclass:10:
18 18   package com.webobjects.appserver does not exist
... ... @@ -21,8 +21,26 @@
21 21  
22 22  {{/note}}
23 23  
40 += Building =
41 +
42 +=== WOJenkins ===
43 +
44 +Using Jenkins is the recommended way to build a Framework and WOJenkins makes the process almost as easy as building from within Eclipse/WOLips.
45 +
46 +=== Eclipse/WOLips ===
47 +
48 +* h5. Standard WebObjects Framework
49 +Right-Click on your project in Eclipse and select **WOLips Ant Tools > Install**
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.
52 +
53 +* h5. Project Wonder Frameworks
54 +**You can not build projects from Wonder this way.** You must either use the command line or Hudson/Jenkins methods
55 +
24 24  === Command Line / Terminal ===
25 25  
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)
59 +
26 26  * h5. Standard WebObjects Framework
27 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.
28 28  
... ... @@ -48,23 +48,9 @@
48 48  
49 49  By default, all the Wonder frameworks will be built to (##/Roots##) (in your home directory).
50 50  
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 -
65 65  = Customizing the Build =
66 66  
67 -By modifying the values in the build.properties and wolips.properties files, you can change where Ant will look for dependencies (binary frameworks, libraries, etc.) and where it will install the build products.
87 +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 68  
69 69  = Installing =
70 70  
... ... @@ -78,7 +78,7 @@
78 78  
79 79  This copies the built frameworks from ##/Roots## to the runtime Frameworks directory:
80 80  
81 -* Mac OS X: ##/Library/Framworks/##
101 +* Mac OS X: ##/Library/WebObjects/Versions/WebObjects543/Library/Frameworks/##
82 82  * Linux: ##/Local/Library/Frameworks##
83 83  
84 84  You can combine the build and install steps by simply executing this Ant command: