|Web Project does not include dependent jars of workspace Java projects [message #186177]
||Sun, 14 January 2007 19:03
Originally posted by: peterkt2000.yahoo.com|
I have a dynamic web app that depends on
Project A (a simple Java project) in my workspace. This project in turn
depends on other JARs in its build path and other workspace Java projects
that in turn depend on other JARs in their build paths.
Within Eclipse, I have the Java projects defined as J2EE Module
Dependencies in for WAR. Eclipse is correctly building and
publishing these projects as JARs in my WAR's lib folder. However, the
JARs the Java projects depend on are not getting published; hence, I get
class not found exceptions.
Do I need to simply add every JAR of every dependent workspace project as
J2EE Module Dependencies in my dynamic web app? Is there a better way? Can
Eclipse work this out for me if I indicate the top-level project
dependency? Exporting the JARs in the build path of my POJO projects does
I am using the Tomcat 4.x runtime with Eclipse 3.2.
There are many ways to deal with this that work (at least one for each
of the many classloaders that are involved!), but I want to stay as close
possible to what my final J2EE deployment structure will be.
To summarize, if a Web Project depends on a Java project in my workspace,
it seems that if I add the Java project as a J2EE Module Dependency,
Eclipse should automatically recognize and publish the JARs the Java
project depends on.
Powered by FUDForum
. Page generated in 0.10436 seconds