Last modified by Pascal Robert on 2010/09/19 10:26

From version 14.1
edited by Pascal Robert
on 2010/09/19 10:26
Change comment: There is no comment for this version
To version 15.1
edited by Pascal Robert
on 2010/09/19 10:26
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,8 +1,5 @@
1 1  {{warning}}
2 -
3 -
4 4  First, a word of warning: DO NOT PUT YOUR JARS INTO /Library/WebObjects/Extensions/ !. You're heading for deployment and classpath problems if you do that.
5 -
6 6  {{/warning}}
7 7  
8 8  == Third Party Jars with Eclipse/WOLips ==
... ... @@ -13,7 +13,7 @@
13 13  
14 14  === Solution ===
15 15  
16 -Check out the [[tutorial>>http://wiki.objectstyle.org/confluence/display/WOL/Add+a+Jar+Dependency]] on how to do it with WOLips.
13 +Check out the [[tutorial>>url:http://wiki.objectstyle.org/confluence/display/WOL/Add+a+Jar+Dependency||shape="rect"]] on how to do it with WOLips.
17 17  
18 18  == Third Party Jars with Xcode ==
19 19  
... ... @@ -21,7 +21,7 @@
21 21  
22 22  You're using Xcode, and you'd like to use one or more third party JAR files in your project.
23 23  
24 -As of WO 5.2, one reasonable solution would be to just toss all the JAR files that you need into /Library/WebObjects/Extensions/ (see What's New in WebObjects 5.2 in the section on Launch Architecture: [[http://developer.apple.com/documentation/WebObjects/WhatsNew5.2/]] ). The problem with this solution is that it creates a bit of a management headache. You don't necessarily know which projects are using which JAR files, and you might have trouble if different projects were to need different versions of the same third party JARs.
21 +As of WO 5.2, one reasonable solution would be to just toss all the JAR files that you need into /Library/WebObjects/Extensions/ (see What's New in WebObjects 5.2 in the section on Launch Architecture: [[http:~~/~~/developer.apple.com/documentation/WebObjects/WhatsNew5.2/>>url:http://developer.apple.com/documentation/WebObjects/WhatsNew5.2/||shape="rect"]] ). The problem with this solution is that it creates a bit of a management headache. You don't necessarily know which projects are using which JAR files, and you might have trouble if different projects were to need different versions of the same third party JARs.
25 25  
26 26  For example, we have a project that uses the Batik SVG Toolkit. We needed classes from many of the jar files that are included with batik-1.5.1. But what happens when another project comes along that needs a different (e.g. a newer) version of Batik? We'd have to either make sure the old project works with the newer batik, or restrict ourselves to the old batik code for the new project.
27 27  
... ... @@ -37,13 +37,13 @@
37 37  
38 38  (3) Add the desired JAR files to this group. For my batik example, I selected all the .jar files in my batik-1.5.1/lib directory. Check Copy items into destination group's folder (if needed), and select the aggregate target (i.e. the one with the same name as your project).
39 39  
40 -(4) We want to add a new build phase to the aggregate target. Open the Targets group (under Groups & Files) and double-click on the aggregate target. It's essential that this new build phase be added to the aggregate target rather than the Application Server target
37 +(4) We want to add a new build phase to the aggregate target. Open the Targets group (under Groups & Files) and double-click on the aggregate target. It's essential that this new build phase be added to the aggregate target rather than the Application Server target!
41 41  
42 42  (5) We want to add the new build phase at or near the end of the list of Build Phases. So right-click (or control-click) on the last build phase, select New Build Phase, then New Copy Files Build Phase. You can also drag the new build phase to a new position after you create it.
43 43  
44 44  (6) Change the Where: popup for your new build phase to Java Resources.
45 45  
46 -(7) Back in the main project window, select all the JAR files that you added to your new Resources > Java group, and drag them into the Files: area for your new Copy Files build phase (in the aggregate Target panel).
43 +(7) Back in the main project window, select all the JAR files that you added to your new Resources -> Java group, and drag them into the Files: area for your new Copy Files build phase (in the aggregate Target panel).
47 47  
48 48  (8) Build and install your WO framework:
49 49  
... ... @@ -54,8 +54,8 @@
54 54  {{/code}}
55 55  
56 56  That's all there is to it. Inside your installed framework, you'll find all your .jar files located in the Resources/Java directory
57 -(e.g. /Library/Frameworks/batik-1.5.1.framework/Versions/A/Resources/Java),
58 -regardless of what you named the group in your project.
54 + (e.g. /Library/Frameworks/batik-1.5.1.framework/Versions/A/Resources/Java),
55 + regardless of what you named the group in your project.
59 59  
60 60  Many thanks to Chuck Hill for the key ingredients of this solution.
61 61