- This topic has 2 replies, 2 voices, and was last updated 20 years ago by Scott Anderson.
-
AuthorPosts
-
mlarkin2005MemberI have two projects, call them ‘A’ and ‘B’, in my workspace. Project ‘A’ is a regular Java project that contains some utility classes and common classes used by project ‘B’ (and other projects that are unrelated to the problem).
In Eclipse, it’s easy to get this working by including a reference in the build path for project ‘B’ so that it includes project ‘A’. No problems here.
However, project ‘B’ happens to be a web application built using MyEclipse – when I deploy to the app server, the generated WAR does not contain the classes and/or JAR from project ‘A’, leading to NoClassDefFound errors when running the application.
Is there a way to tell MyEclipseIDE’s packager that it should bundle the external resources from other projects?
PS – I’ve already tried to export project ‘A’ to a JAR and include this JAR as an external JAR in project ‘B’s build path – Deployment still fails to include the JAR file I’ve specified, leading to the same problems.
PPS – Is there a simple way to just generate a WAR file from a web project and just place it in the FS somewhere? When I try to export JARs or ZIPs, it includes all of the workspace structure (eg folders named ‘WebRoot’ etc) and thus results in an unusable WAR. It seems as if the deployer is doing this, but is there a way to generate it separately via File->Export or something similar?
Any thoughts?
mlarkin2005MemberOne more thing – I’ve tried with JBOSS 3.2.6 and 4.0.0, and Tomcat 5.0.28. All have the same problem.
Scott AndersonParticipantCan you have a look at our Web Development tutorial in the Documentation section? The direct link is here:
http://www.myeclipseide.com/images/tutorials/quickstarts/webprojects/I think Section 10 will answer your questions.
-
AuthorPosts