On Aug 11, 2009, at 12:21 PM, vaughn_m wrote:
When I tried the previous way I get class not found exceptions that
relate to
the classes in the targeted directory. I realize the repository is
the best
way to go however, I am deploying web apps that have several jars
(20 or so)
that need to be shared by several web apps. I have not had a chance
but if
there is a tool that can assist in creating the repository for each
jar set,
that would be tremendously helpful. I will give it a whirl again
and let
you know my final outcome.
Vaughn,
In order for your SharedLib classes to be visible to your application,
the SharedLib module, whether Geronimo's or your own, must be declared
as a dependency for your web app. If you don't do this, you'll get
ClassNotFoundExceptions.
It's not clear from your responses that you are declaring these
dependencies in your geronimo deployment plans for your web apps.
Given your original SharedLib plan, a deployment plan like the
following should make your applib classes available to your application.
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2
">
<sys:environment>
<sys:moduleId>
<sys:groupId>com.company.app</sys:groupId>
<sys:artifactId>applib</sys:artifactId>
<sys:version>2.2.07</sys:version>
<sys:type>car</sys:type>
</sys:moduleId>
<sys:dependencies>
<sys:dependency>
<sys:groupId>com.company.app</sys:groupId>
<sys:artifactId>applib</sys:artifactId>
<sys:version>2.2.07</sys:version>
<sys:type>car</sys:type>
</sys:dependency>
</sys:dependencies>
<sys:hidden-classes/>
<sys:non-overridable-classes/>
</sys:environment>
<context-root>/Foo</context-root>
</web-app>
--kevan