Changes for page Building and Installing a Framework with Ant
Last modified by Markus Ruggiero on 2025/10/24 16:16
From version 51.1
edited by Markus Ruggiero
on 2025/10/24 16:16
on 2025/10/24 16:16
Change comment:
There is no comment for this version
To version 38.1
edited by David Avendasora
on 2011/07/07 10:44
on 2011/07/07 10:44
Change comment:
There is no comment for this version
Summary
-
Page properties (4 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -documentation.Home.Building a WebObjects Project.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ruggiero1 +XWiki.avendasora - Tags
-
... ... @@ -1,1 +1,0 @@ 1 -build - Content
-
... ... @@ -2,78 +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"}}{{/toc}} 5 5 6 - 7 -{{toc maxLevel="3"/}} 8 - 9 9 = Before You Build = 10 10 11 -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]]. 12 12 13 -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. 14 14 15 15 Where Ant looks for this property is different for each method of building a Framework: 16 16 17 -1. ((( 18 -====== 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. 19 19 20 -1. Completely managed for you by WOJenkins 21 -1. Manually overridden as defined in Manual Jenkins Jobs below. 22 -))) 23 -1. ((( 24 -====== Manual Jenkins Jobs ====== 29 +{{note title="Can"}} 25 25 26 -1. Properties specified in the //Targets// line of an Invoke Ant build task using 27 - 28 -{{code language="none"}} 29 --D<property>=<value> 30 -{{/code}} 31 - 32 -1. Properties specified in the //Properties// line of an Invoke Ant build task using (the equivalent of 33 - 34 -{{code language="none"}}-propertyfile <name>{{/code}}) 35 -))) 36 -1. ((( 37 -====== Eclipse/WOLips ====== 38 - 39 -1. Properties specified for the Eclipse Workspace under Eclipse -> Preferences -> WOLips - > **System Frameworks** 40 -1. The 41 - 42 -{{code language="none"}}build.properties{{/code}} file in the same directory as the build.xml file as specified by 43 - 44 -{{code language="none"}}<property file="build.properties" />{{/code}} task in the build.xml file. 45 -))) 46 -1. ((( 47 -====== Command Line ====== 48 - 49 -1. Properties specified in the Ant command: 50 - 51 -{{code language="none"}} 52 --D<property>=<value> 53 -{{/code}} 54 - 55 -1. A properties file specified in the Ant command: 56 - 57 -{{code language="none"}} 58 --propertyfile <name> 59 -{{/code}} 60 - 61 -1. The 62 - 63 -{{code language="none"}}build.properties{{/code}} file in the same directory as the build.xml file as specified by 64 - 65 -{{code language="none"}}<property file="build.properties" />{{/code}} task in the build.xml file. 66 -))) 67 - 68 -{{note title="Can't Find WebObjects"}} 69 69 If Ant can't find the WebObjects frameworks, you will get compiler errors like this: 70 - 71 -{{code}} 32 +{noformat} 72 72 [wocompile] /MyProjects/MyFramework/Sources/com/mycompany/myapp/myclass:10: 73 73 package com.webobjects.appserver does not exist 74 74 [wocompile] import com.webobjects.appserver.WOContext; 36 +{noformat} 75 75 76 -{{/code}} 77 77 {{/note}} 78 78 79 79 = Building = ... ... @@ -84,68 +84,40 @@ 84 84 85 85 === Eclipse/WOLips === 86 86 87 -* ((( 88 -===== Standard WebObjects Framework ===== 89 - 48 +* h5. Standard WebObjects Framework 90 90 Right-Click on your project in Eclipse and select **WOLips Ant Tools > Install** 91 -[[image: attach:WOLipsAntInstall.png]]50 +[[image:WOLipsAntInstall.png||border="1"]] 92 92 This will build and install the framework in the location defined in the WOLips preferences, overwriting any previously installed version of the framework. 93 93 94 -{{note title="BUILD FAILED"}} 95 -If Ant can't write to the WebObjects frameworks directory, you will get an error like this: 96 - 97 -{{code}} 98 -Directory /Library/WebObjects/Versions/WebObjects543/Library/Frameworks/YourFramework.framework 99 -creation was not successful for an unknown reason. 100 -{{/code}} 101 - 102 -Give write access to the directory with these commands in Terminal: 103 - sudo chmod 757 /Library/WebObjects/Versions/WebObjects543/Library/Frameworks/ 104 - sudo chmod 757 /Library/WebObjects/Versions/WebObjects543/Library/WebObjects/Applications 105 -{{/note}} 106 -))) 107 - 108 -* ((( 109 -===== Project Wonder Frameworks ===== 110 - 53 +* h5. Project Wonder Frameworks 111 111 **You can not build projects from Wonder this way.** You must either use the command line or Hudson/Jenkins methods 112 -))) 113 113 114 114 === Command Line / Terminal === 115 115 116 -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) 117 - 118 -* ((( 119 -===== Standard WebObjects Framework ===== 120 - 58 +* h5. Standard WebObjects Framework 121 121 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. 122 122 123 -{{code 0="none"}} 61 +{{code value="none"}} 62 + 124 124 cd /my/project/ 125 125 ant build 126 126 127 127 {{/code}} 128 128 129 -By default, the built framework will be put in a {{code language="none"}}dist{{/code}} directory in your project's root. 130 -))) 68 +By default, the built framework will be put in a ##dist## directory in your project's root. 131 131 132 -* ((( 133 -===== Project Wonder Frameworks ===== 70 +* h5. Project Wonder Frameworks 71 +This assumes that you have already downloaded the Wonder source code. Make a note of the location of the Wonder directory. 72 +If you are building Project Wonder's frameworks you will use these commands instead: 134 134 135 - First download the Wonder source code(see [[doc:WEB.Home.Getting Started.Getting the Wonder SourceCode.WebHome]]). Make anote of the locationof theWonder directory.74 +{{code value="none"}} 136 136 137 -The Wonder build script will use properties defined in ~~/Library/Application Support/WOLips/wolips.properties. This is a good place to set {{code language="none"}}wo.system.frameworks{{/code}} property. 138 - 139 -To build Project Wonder's frameworks use these commands. 140 - 141 -{{code 0="none"}} 142 142 cd /path/to/Wonder 143 143 ant frameworks 144 144 145 145 {{/code}} 146 146 147 -By default, all the Wonder frameworks will be built to ({{code language="none"}}~/Roots{{/code}}) (in your home directory). To build elsewhere, set the {{code language="none"}}wo.external.root{{/code}} property. 148 -))) 81 +By default, all the Wonder frameworks will be built to (##/Roots##) (in your home directory). 149 149 150 150 = Customizing the Build = 151 151 ... ... @@ -157,21 +157,19 @@ 157 157 158 158 ===== Install the frameworks ===== 159 159 160 -{{code 0="none"}}161 -sudo ant -Duser.home=$HOMEframeworks.install93 +{{code value="none"}} 94 +sudo ant frameworks.install 162 162 {{/code}} 163 163 164 -This copies the built frameworks from {{code language="none"}}~/Roots{{/code}}to the runtime Frameworks directory:97 +This copies the built frameworks from ##/Roots## to the runtime Frameworks directory: 165 165 166 -* Mac OS X: {{code language="none"}}/Library/Frameworks/{{/code}} or {{code language="none"}}/Library/WebObjects/Versions/WebObjects543/Library/Frameworks/{{/code}}167 -* Linux: {{code language="none"}}/Local/Library/Frameworks{{/code}}99 +* Mac OS X: ##/Library/Framworks/## 100 +* Linux: ##/Local/Library/Frameworks## 168 168 169 -Setting the {{code language="none"}}user.home{{/code}} property is necessary. Otherwise {{code language="none"}}ant{{/code}} will think {{code language="none"}}user.home{{/code}} is {{code language="none"}}/var/root{{/code}} and {{code language="none"}}frameworks.install{{/code}} would look for built frameworks in {{code language="none"}}/var/root/Roots{{/code}} and would miss any custom locations set for {{code language="none"}}wo.local.frameworks{{/code}} that are set in your {{code language="none"}}wolips.properties{{/code}} file. 170 - 171 171 You can combine the build and install steps by simply executing this Ant command: 172 172 173 -{{code 0="none"}}174 -sudo ant -Duser.home=$HOMEframeworks frameworks.install104 +{{code value="none"}} 105 +sudo ant frameworks frameworks.install 175 175 {{/code}} 176 176 177 177 === Upgrading === ... ... @@ -178,38 +178,32 @@ 178 178 179 179 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. 180 180 181 -1. ((( 182 -===== Navigate to the original Wonder source directory that you created above during initial source installation ===== 112 +1. h5. Navigate to the original Wonder source directory that you created above during initial source installation 183 183 184 -{{code 0="none"}}114 +{{code value="none"}} 185 185 cd /path/to/WonderSource 186 186 {{/code}} 187 -))) 188 -1. ((( 189 -===== Pull the changes you do not have and merge them with your local repository ===== 190 190 191 -{{code 0="none"}} 118 +1. h5. Pull the changes you do not have and merge them with your local repository 119 + 120 +{{code value="none"}} 192 192 git pull 193 193 {{/code}} 194 -))) 195 -1. ((( 196 -===== Build the frameworks. ===== 197 197 198 -{{code 0="none"}} 124 +1. h5. Build the frameworks. 125 + 126 +{{code value="none"}} 199 199 ant frameworks 200 200 {{/code}} 201 -))) 202 -1. ((( 203 -===== Navigate to the Roots directory that was automatically created by the initial Source installation procedure above ===== 204 204 205 -{{code 0="none"}} 130 +1. h5. Navigate to the Roots directory that was automatically created by the initial Source installation procedure above 131 + 132 +{{code value="none"}} 206 206 cd ~/Roots/ 207 207 {{/code}} 208 -))) 209 -1. ((( 210 -===== Delete all installed frameworks whose names match the built frameworks in this Roots build folder ===== 211 211 212 -{{code 0="none"}} 136 +1. h5. Delete all installed frameworks whose names match the built frameworks in this Roots build folder 137 + 138 +{{code value="none"}} 213 213 for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done 214 214 {{/code}} 215 -)))
- WOLipsAntInstall.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -18.2 KB - Content