This may sound very easy, but it is not so if your directory structure
in CVS looks like the following and you want to mirror the same in your
IDE's package explorer.
webappname
...
webappname/WEB-INF/web.xml
webappname/WEB-INF/build.xml
...
webappname/WEB-INF/src - Java source files
webappname/WEB-INF/src/...
...
webappname/WEB-INF/classes - output directory for class files.
...
Without manually changing myEclipse project meta files, it is not quite
easy to get it right. Here are the steps that would help you save a lot
of time without manual modifications.
- Create a regular web project in myEclipse and give it a name, say "myproject".
- The important step is giving names for the folders in this window.
# "Source folder" - src, by default, do not change it.
# "Web root folder" - webappname, in other words, CVS module name
# "Context root URL" - webappname, in other words, CVS module name
- Finish creating the application
- When the application shows up on "Package Explorer" (left pane), right click
on webappname folder to delete it - This step is required to overwrite default
web.xml created by myEclipse under WEB-INF directory.
- Right click on the project name "myproject" to select "import" to configure
CVS repository location to check out your code.
- Now right click on "myproject" to open properties window.
- Select "Java build Path" on the left pane, and then select "Source" tab on the
right pane.
- Select the current source folder "src" to remove it.
- Click on "Add folder" button to traverse CVS module to choose
"webappname/WEB-INF/src" as the source directory.
- After choosing source folder, check the bottom of the current window to make
sure the output directory is "myproject/webappname/WEB-INF/classes.