Changes for page Building and Installing a Framework with Ant
Last modified by Pascal Robert on 2013/12/18 02:55
From version 26.1
edited by David Avendasora
on 2011/04/25 17:20
on 2011/04/25 17:20
Change comment:
There is no comment for this version
To 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
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Building a WO Framework with Ant 1 +Building and Installing a WO Framework with Ant - Content
-
... ... @@ -1,0 +1,107 @@ 1 += Building = 2 + 3 +{{note title="Requires WebObjects"}} 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}} 8 + 9 +Otherwise you will get compiler errors like this: 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 13 +[wocompile] import com.webobjects.appserver.WOContext; 14 +{noformat} 15 + 16 +{{/note}} 17 + 18 +=== Command Line / Terminal === 19 + 20 +* h5. Standard WebObjects Framework 21 +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. 22 + 23 +{{code value="none"}} 24 + 25 +cd /my/project/ 26 +ant build 27 + 28 +{{/code}} 29 + 30 +By default, the built framework will be put in a ##dist## directory in your project's root. 31 + 32 +* h5. **Project Wonder Frameworks 33 +If you are building Project Wonder's frameworks you will use these commands instead:** 34 + 35 +{{code value="none"}} 36 + 37 +cd /path/to/Wonder 38 +ant frameworks 39 + 40 +{{/code}} 41 + 42 +By default, all the Wonder frameworks will be built to (##/Roots##) directory in your home directory. 43 + 44 +=== Eclipse/WOLips === 45 + 46 +=== Hudson/Jenkins === 47 + 48 +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 directly. 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}} 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 +===== Install the frameworks ===== 59 + 60 +{{code value="none"}} 61 +sudo ant frameworks.install 62 +{{/code}} 63 + 64 +This copies the built frameworks from ##/Roots## to the runtime Frameworks directory: 65 + 66 +* Mac OS X: ##/Library/Framworks/## 67 +* Linux: ##/Local/Library/Frameworks## 68 + 69 +You can combine the build and install steps by simply executing this Ant command: 70 + 71 +{{code value="none"}} 72 +sudo ant frameworks frameworks.install 73 +{{/code}} 74 + 75 +=== Upgrading === 76 + 77 +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. 78 + 79 +1. h5. Navigate to the original Wonder source directory that you created above during initial source installation 80 + 81 +{{code value="none"}} 82 +cd /path/to/WonderSource 83 +{{/code}} 84 + 85 +1. h5. Pull the changes you do not have and merge them with your local repository 86 + 87 +{{code value="none"}} 88 +git pull 89 +{{/code}} 90 + 91 +1. h5. Build the frameworks. 92 + 93 +{{code value="none"}} 94 +ant frameworks 95 +{{/code}} 96 + 97 +1. h5. Navigate to the Roots directory that was automatically created by the initial Source installation procedure above 98 + 99 +{{code value="none"}} 100 +cd ~/Roots/ 101 +{{/code}} 102 + 103 +1. h5. Delete all installed frameworks whose names match the built frameworks in this Roots build folder 104 + 105 +{{code value="none"}} 106 +for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done 107 +{{/code}}