- This topic has 2 replies, 2 voices, and was last updated 21 years ago by johnsw.
-
AuthorPosts
-
johnswMemberEclipse 2.1.1 + MyEclipse 2.6.1 on Win2K
I have two web projects both sharing a common set of packages.
The code for these is maintained primarily in Project 1. Project 2 has the build path set to include Project 1 (using the Projects tab of Java Build Path prefs).
However when I build Project 2, NONE of the classes from Project 1 are placed into the WEB-INF/classes directory belonging to Project 2.
Any idea what gives?
John
ps For more background: both projects are controlled by CVS, and I have found that including the common code (from project 1) in project 2 (directly from cvs) causes me admin headaches when I make changes in project 1 that need to be “updated” into project 2 – if I forget, then I get unexpected errors. I’m hoping that by “linking” Project 1 to project 2, project 2 sees the latest version of the common packages from project 1.
support-michaelKeymasterWhat you need is MyEclipse dependent project support which is a planned feature. Until then there are 2 approaches we recomend. The 1st is to set the output folder of Project-1 to be Project2/<webroot>/WEB-INF/classes or if to use a simple Ant script to synchronize Project-1 with Project2.
One last thing to watch for if you use either of these techniques is that the default Eclipse build settings will scrub (delete all) the contents of a project’s output folder. You can disable this feature using the preference “Scrub output folders on full build” found at Windows>Preferences>Java>Compiler>Build Path
Michael
MyEclipse Support
johnswMemberThanks for the response.
Actually, I found another way of achieving what I wanted. I created a new source folder (in project 2) that is linked to the “common” src folder in project 1.
This way project 1 is used to maintain the common code, and project 2 always has the latest version of the common code which is automatically built into project 2’s WEB-INF/classes.
John
-
AuthorPosts