On 10/23/06, Patrick Robinson <pg..t.edu> wrote:
> I assume the normal way to handle external jar files in a WO project
> is to wrap them in a WO framework? Is that correct? It seems to
> work fine if these WO frameworks are then installed in the normal
> place (e.g. /Library/Frameworks on MacOSX). If I do this, then
> UNIXClassPath.txt is generated correctly (using LOCALROOT/Library/
> Frameworks as the location for the framework).
I don't know what the normal way is. When I've just needed a few jar
files for a single project, I have created a lib folder in my project,
put the jars in there, added them to the WOLips classpath using the
Add Jars button, and then modified the build.xml so it looks like
this:
<lib dir="./lib">
<include name="Add .jar's that should be copied in the woa."/>
<include name="*.jar"/>
<exclude name="**/*.woa/**"/>
</lib>
For jars that I share between many projects, I create a Framework.
> It may not be a very big deal, but I did notice that if the
> referenced WO framework lives in {User Home}/Library/Frameworks, then
> the generated UNIXClassPath.txt does not include it.
I know that in the WO Classpath Container there is a section for
frameworks in {User Home}. If that's not working, you may need to
check your ~/wobuild.properties. I've never used it, so I don't know
if it actually works or not.
> But how do you handle jars from the WebObjects Extensions directory?
> How do you tell Eclipse that's where they are, so the compiler finds
> them? I tried adding them to the Java Build Path as external jars,
> and that seems to work
The jars from the WebObjects Extensions directory should get added to
your runtime path automatically. I've only ever used JDBC jars in my
Extensions dir, so I had not previously noticed that they don't seem
to get added to the build path. Not sure how the WOLips folks intend
for this to happen by default with the build path.
> (although I don't particularly like how
> they're all listed at the "project root" level in the Package
> Explorer view... can anything be done to organize them?). Is this
> the typical way to deal with these?
Eclipse puts all jars on your build path at the root of the project in
the Package Explorer view. You can either use the filter option of the
Package Explorer view to change this (small downward triangle at the
far right of the toolbar) or use a Framework, which nests them under
the WO Classpath Container. You could probably write your own
classpath container as well, but that seems like serious overkill.
HTH,
Logan
This archive was generated by hypermail 2.0.0 : Mon Oct 23 2006 - 13:24:52 EDT