Changes for page Building and Installing a Framework with Ant
Last modified by Pascal Robert on 2013/12/18 02:55
From version 43.1
edited by Steve Peery
on 2012/10/23 23:20
on 2012/10/23 23:20
Change comment:
There is no comment for this version
To version 35.1
edited by David Avendasora
on 2011/04/29 14:43
on 2011/04/29 14:43
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Building and Installing a Framework with Ant 1 +Building and Installing a WO Framework with Ant - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. speery1 +XWiki.avendasora - Content
-
... ... @@ -4,31 +4,15 @@ 4 4 5 5 {{toc maxLevel="3"}}{{/toc}} 6 6 7 -= B efore YouBuild =7 += Building = 8 8 9 - Whenbuilding a Framework project, Ant needsto be able to find WebObjects. WebObjects itself is a set of Frameworks just like the one you arebuilding. They can be installedanywhere using [[these instructions>>WO:Installing WebObjects5.4 on Snow Leopard]].9 +{{note title="Requires WebObjects"}} 10 10 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. 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}} 12 12 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: 15 +Otherwise you will get compiler errors like this: 32 32 {noformat} 33 33 [wocompile] /MyProjects/MyFramework/Sources/com/mycompany/myapp/myclass:10: 34 34 package com.webobjects.appserver does not exist ... ... @@ -37,38 +37,8 @@ 37 37 38 38 {{/note}} 39 39 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 -{{note title="BUILD FAILED"}} 54 - 55 -If Ant can't write to the WebObjects frameworks directory, you will get an error like this: 56 -{noformat} 57 -Directory /Library/WebObjects/Versions/WebObjects543/Library/Frameworks/YourFramework.framework 58 -creation was not successful for an unknown reason. 59 -{noformat} 60 -Give write access to the directory with this command in Terminal: 61 -sudo chmod 757 /Library/WebObjects/Versions/WebObjects543/Library/Frameworks/ 62 - 63 -{{/note}} 64 - 65 -* h5. Project Wonder Frameworks 66 -**You can not build projects from Wonder this way.** You must either use the command line or Hudson/Jenkins methods 67 - 68 68 === Command Line / Terminal === 69 69 70 -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) 71 - 72 72 * h5. Standard WebObjects Framework 73 73 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. 74 74 ... ... @@ -94,9 +94,23 @@ 94 94 95 95 By default, all the Wonder frameworks will be built to (##/Roots##) (in your home directory). 96 96 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 + 97 97 = Customizing the Build = 98 98 99 -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.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. 100 100 101 101 = Installing = 102 102 ... ... @@ -110,7 +110,7 @@ 110 110 111 111 This copies the built frameworks from ##/Roots## to the runtime Frameworks directory: 112 112 113 -* Mac OS X: ##/Library/Fram eworks/##or ##/Library/WebObjects/Versions/WebObjects543/Library/Frameworks/##81 +* Mac OS X: ##/Library/Framworks/## 114 114 * Linux: ##/Local/Library/Frameworks## 115 115 116 116 You can combine the build and install steps by simply executing this Ant command: