I have a problem providing some third party librarys (JAR-files) I am using when deploying my dynamic web application with Tomcat 6 and Eclipse.
Please note that I -do know- how to do this in a setup, where the web application project -directly- depends on those JARs.
However, in my setup, I have two Eclipse projects:
- core is a class library and depends on, lets say,
a.jar
.
- web is the web application and depends on core.
In the project settings of web, in the Deployment Assembly category, I have added core, so Eclipse (or Tomcat - I'm not quite sure who the responsible actor here is) is putting core.jar
into the libs
directory of my web application.
The problem is: When I try out the web application, a NoClassDefFoundError
is thrown when core accesses classes from a.jar
. What am I supposed to do about this? I don't think that putting a.jar
into the Deployment Assembly settings page of my web application is the right solution, since it should be of no relevance to the web project, what the core project depends on.
Basically, I am looking for a way to configure Eclipse (Tomcat?) to 'embed' the dependencies of core into core.jar
. The problem about this is, that core.jar
is generated automatically, when I deploy my web project.
Help is very appreciated.
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…