I searched through the Apple build scripts to see how Apple build frameworks as jars when you set the BUNDLE_AS_JAR property to YES and found a shell script that does it.  All I needed to do was run

 /Developer/Makefiles/java_makefiles/CoaxBundleIntoJar.sh /Library/Frameworks/ERJavaMail.framework /Library/WebObjects/lib

and the script built ERJavaMail.framework into ERJavaMail.jar and put it in /Library/WebObjects/lib ready for use.

How easy was that!

D Tim Cummings
Triptera Pty Ltd



On 25/05/2006, at 20:51, D Tim Cummings wrote:

When setting up my project in xcode and selecting standalone war, there was an instruction that custom frameworks must be built as jars.  How do you do that?  For example, if I am looking at ERJavaMail.framework, I am guessing I need to take the ERJavaMail.jar from ERJavaMail.framework/Resources/Java/ as my starting point and put it in /Library/WebObjects/lib.  Then I have to add the Resources and WebServerResources directories into the ERJavaMail.jar.  However, that doesn't work because the additional jar files (activation, jakarta-oro, mail) in the ERJavaMail.framework/Resources/Java/ directory are not in the class path. I took them out of the framework and put them in /Library/WebObjects/lib but xcode decided not to add them to the war when it built it.  I then put them in my project's /Servlet Resources/WEB-INF/lib and that seemed to work but then I haven't really built the whole framework as a single jar.

Here are my shell commands showing what I did.

 cp -R /Library/Frameworks/ERJavaMail.framework /Library/WebObjects/lib
 mv /Library/WebObjects/lib/ERJavaMail.framework/Resources/Java/ERJavaMail.jar /Library/WebObjects/lib
 mv /Library/WebObjects/lib/ERJavaMail.framework/Resources/Java/activation-1.0.2.jar ~/MyProject/Servlet\ Resources/WEB-INF/lib
 mv /Library/WebObjects/lib/ERJavaMail.framework/Resources/Java/jakarta-oro-2.0.6.jar ~/MyProject/Servlet\ Resources/WEB-INF/lib
 mv /Library/WebObjects/lib/ERJavaMail.framework/Resources/Java/mail-1.3.jar ~/MyProject/Servlet\ Resources/WEB-INF/lib
 cd /Library/WebObjects/lib/ERJavaMail.framework
 jar uvf ../ERJavaMail.jar *
 cd ..
 rm -R ERJavaMail.framework



Thanks in advance for any help

Regards

D Tim Cummings
Triptera Pty Ltd
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to