Changes for page Building and Installing a Framework with Ant
Last modified by Pascal Robert on 2013/12/18 02:55
From version 29.1
edited by David Avendasora
on 2011/04/25 17:37
on 2011/04/25 17:37
Change comment:
There is no comment for this version
To version 37.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 (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Building and Installing a WOFramework with Ant1 +Building and Installing a Framework with Ant - Content
-
... ... @@ -1,20 +1,58 @@ 1 -= Building = 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}} 2 2 3 -{{ notetitle="Requires WebObjects"}}5 +{{toc maxLevel="3"}}{{/toc}} 4 4 5 -These build instructions require the WebObjects frameworks to already be installed in the normal location: 6 -* Mac OS X: {{/System/Library/Framworks/}} 7 -* Linux: {{/Library/Frameworks}} 7 += Before You Build = 8 8 9 -Otherwise you will get compiler errors like this: 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 + 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 + 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: 10 10 {noformat} 11 -[wocompile] / Wonder/WonderGit/WonderSource/Frameworks/Core/JavaWOExtensions/Sources/com/webobjects/woextensions/JSAlertPanel.java:10:12 - package com.webobjects.appserver does not exist 33 +[wocompile] /MyProjects/MyFramework/Sources/com/mycompany/myapp/myclass:10: 34 + package com.webobjects.appserver does not exist 13 13 [wocompile] import com.webobjects.appserver.WOContext; 14 14 {noformat} 15 15 16 16 {{/note}} 17 17 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 + 18 18 === Command Line / Terminal === 19 19 20 20 * h5. Standard WebObjects Framework ... ... @@ -29,8 +29,9 @@ 29 29 30 30 By default, the built framework will be put in a ##dist## directory in your project's root. 31 31 32 -* h5. **Project Wonder Frameworks 33 -If you are building Project Wonder's frameworks you will use these commands instead:** 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: 34 34 35 35 {{code value="none"}} 36 36 ... ... @@ -39,22 +39,16 @@ 39 39 40 40 {{/code}} 41 41 42 -By default, all the Wonder frameworks will be built to (##/Roots##) directory in your home directory.81 +By default, all the Wonder frameworks will be built to (##/Roots##) (in your home directory). 43 43 44 -= ==Eclipse/WOLips===83 += Customizing the Build = 45 45 46 - ===Hudson/Jenkins===85 +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. 47 47 48 -In general, it isrecommendedthat 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 directly.87 += Installing = 49 49 50 -{{tip title="Pro Tip"}} 51 -If you use Hudson/Jenkins to build your WebObjects applications, then you do not need to actually build or install the Project Wonder frameworks on your development machine, just having the individual Wonder source code projects open in your eclipse workspace is sufficient. Your Hudson/Jenkins server will need the built frameworks installed. See the [Hudson/Jenkins Page|WO:Installing and Using the Hudson build server] for more information. 52 -{{/tip}} 89 +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. 53 53 54 -=== Installing === 55 - 56 -Assuming you already cloned and installed Wonder from source using the method outlined above, you can use the following procedure pull the latest changes into your local repository. 57 - 58 58 ===== Install the frameworks ===== 59 59 60 60 {{code value="none"}}