« Return to Thread: additional classpath for tomcat5x not working

Re: additional classpath for tomcat5x not working

by Adrian Cole :: Rate this Message:

Reply to Author | View in Thread

This is a bug I ran across recently.  If you don't mind, open a Jira on it and I'll fix it.

http://jira.codehaus.org/secure/CreateIssue!default.jspa

Cheers,
-Adrian

On Thu, Feb 5, 2009 at 9:22 AM, Paul Hammes <Paul.Hammes@...> wrote:
Hi all,

we have an application which is divided into serveral projects. One project containing all resources for the client (js, css, ...) is packaged as a war and will be deployed to tomcat5x in another project. This second project can only be packaged as jar due to deployment issues of another team in our company.
As I read in the documentation of the cargo plugin an additional classpath can be specified within a <location> as a dependency. This has no effect at runtime even the tomcat lists this path in the JspRuntimeContext at startup. A NoClassDefFoundError is thrown when instantiating a class out of the specified location. The jars listed in JspRuntimeContext are working correctly.
You can find my pom file below.
I tried to specify the dependency to the second project as a jar but this is a cycle dependency.

I hope you can help me.

Kind regards

Paul



<plugin>
 <groupId>org.codehaus.cargo</groupId>
 <artifactId>cargo-maven2-plugin</artifactId>
 <version>1.0-beta-2</version>
 <configuration>
   <configuration>
     <type>existing</type>
     <home>${basedir}/target/tomcat</home>
     <properties>
       <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=5555,server=y,suspend=n]]>
       </cargo.jvmargs>
     </properties>
     <deployables>
       <deployable>
         <artifactId>webresources</artifactId>
         <groupId>${project.groupId}</groupId>
         <type>war</type>
         <properties>
           <context>myproject</context>
         </properties>
       </deployable>
     </deployables>
   </configuration>
   <container>
     <containerId>tomcat5x</containerId>
     <home>${basedir}/target/tomcat</home>
     <dependencies>
       <dependency>
         <location>target/main/classes</location>
       </dependency>
     </dependencies>
   </container>
 </configuration>
</plugin>
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



 « Return to Thread: additional classpath for tomcat5x not working