SOLVED: Re: need to add dir to classpath
SOLVED: Re: need to add dir to classpath
- Subject: SOLVED: Re: need to add dir to classpath
- From: Patrick Robinson <email@hidden>
- Date: Thu, 14 Jan 2010 17:49:20 -0500
Here's how I ended up solving this:
I created Resources/Keystores/, and put the .keystore file there.
The problem is how to get this directory into the app's classpath at
runtime, both when running from Eclipse, and when deployed.
To run this in Eclipse:
Edit the Run Configuration, select the Classpath tab, click User
Entries, click the Advanced button, select Add Folders, navigate to
the project's Resources/Keystores, and select it.
To build for deployment:
Edit build.xml. Add an <otherclasspath> nested element at the end of
the <woapplication> element, thusly:
<woapplication>
[...]
<otherclasspath dir="." embed="true">
<include name="Resources/Keystores" />
</otherclasspath>
</woapplication>
That will cause ant to add the following at the top of
MacOSClassPath.txt (and all the other platform classpath files):
APPROOT/Resources/Keystores/
When the app is deployed, Resources/Keystores/ will be in the classpath.
Thanks for all the helpful suggestions!
- Patrick
On Jan 13, 2010, at 5:24 PM, Patrick Robinson wrote:
It looks to me like the <otherclasspath ... /> nested element of
<woapplication /> might be persuaded to add the right thing to the
various *ClassPath.txt files, but I haven't stumbled across the
right incantation, yet.
<otherclasspath dir="Resources/Keystore" /> causes the following to
be added to the top of (e.g.) MacOSClassPath.txt:
HOMEROOT/workspace/MyProject/Resources/Keystores/
But I think what we want there is (as Kieran suggested earlier):
APPROOT/Resources/Keystores/
Is that doable?
- Patrick
On Jan 13, 2010, at 11:56 AM, Mike Schrag wrote:
This actually isn't a directory dep .. it's really "Adding a non-
Java jar resource" or something like that, but yeah, probably
someone should put this info somewhere.
On Jan 13, 2010, at 11:55 AM, Ray Kiddy wrote:
On Jan 13, 2010, at 8:41 AM, Patrick Robinson wrote:
Ah! That works in Eclipse (it causes the .keystore file to be
copied to build/app.woa/Contents/Resources/Java/), but it
doesn't work for deployment. Do I need to add something to
build.xml to make it do the same thing there?
Looking at the front page of the WOLips wiki, I see we have:
http://wiki.objectstyle.org/confluence/display/WOL/Add+a+Jar
+Dependency
http://wiki.objectstyle.org/confluence/display/WOL/Add+a
+Framework+Dependency
I cannot find any others. Does there need to be another page on
"Add a Directory Dependency"? Is this written up anywhere on the
wiki already? Should some of these pages be consolidated?
cheers - ray
On Jan 13, 2010, at 11:11 AM, Mike Schrag wrote:
you need to put it in your source folder and add the file
extension to the classes.include.patternset ...
On Jan 13, 2010, at 11:01 AM, Elizabeth Lynch wrote:
Hi Patrick
How about right-clicking it and trying WOLips Tools->Include
as Resource?
Liz
On 13 Jan 2010, at 14:30, Patrick Robinson wrote:
No, that didn't work... it just gets ignored. Thanks for the
suggestion, though; it sounded promising! I thought it might
result in the file's being put into Contents/Resources/Java/,
which *is* in the classpath.
- Patrick
On Jan 13, 2010, at 6:17 AM, David Avendasora wrote:
Hi Patrick,
This is just a stab-in-the-dark, but can't you just drop it
into the Sources directory?
Dave
On Jan 12, 2010, at 11:20 PM, Patrick Robinson wrote:
I need to use a java library that expects to find my java
keystore file (which would normally be specified by the
javax.net.ssl.keyStore system property) in a directory on
the classpath.
How do I do that? Is there a way to create a dir (perhaps
under Resources), and tell the build system to include it
in the classpath?
- Patrick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden