How to use Eclipse with existing CVS projects?

M

Mark Boon

Recently I've started to use Eclipse as my Java IDE and like it a lot.
However, it still mystifies me how it actually works together with my
CVS repository.

In my repository I have a structure like the following:

source/
company1/
project1/
project2/
company2/
project3/

Each project has a large number of files and sub-directories in them.
I make a project in Eclipse for say project1, choose project1/source
and project1/classes as my repsective source-folder and output folder.

Now I do 'Share Project' and I need to give a CVS module. If I put in
"source/company1/project1" then Eclipse puts it straight in the
top-level directory, ignoring the fact that I set my source-folder to
"source". And it then generates millions or build-errors because the
package doesn't match the directory structure.

I've tried lots of other things, too many to list here, but the only
way I got it to kind of work is using WinCVS to checkout my files in
the proper directory (workspace/project1/source/company1/project1/...)
structure. Eclipse then seems to be able to update and commit changes,
but synchronization doesn't have a clue what's going on and gives
errors in the 'Incoming' mode, only saying "An error occured while
synchronizing with remote contents". Also, when I 'update' my project,
it not only retrieves source for project1, but project2 and 3 as well,
which is very annoying.

I've tried to find documentation on how to use CVS with Eclipse, but
so far found nothing that would help me with this problem.

So I would be very grateful if someone could give me a pointer to some
good documentation on how to combine Eclipse with an existing
repository. Or even better, maybe someone can explain me how to use
Eclipse in such a way with the given repository without having to fall
back on external CVS tools.

Mark Boon
 
L

Larry Coon

Mark said:
I've tried to find documentation on how to use CVS with Eclipse, but
so far found nothing that would help me with this problem.

Three comments:

1. You're off-topic here, so the help you get will be limited.
But if you go to eclipse.org you can find out how to access
on-topic newsgroups.

2. I'm an expert in neither Eclipse nor CVS, but I just go to
the CVS perspective, CVS Repositories view, navigate to
what I want to check out, right click, and select "Check out
as project."

3. The book Eclipse in Action has a chapter on using Eclipse
with CVS.

<http://www.amazon.com/exec/obidos/tg/detail/-/1930110960>
 
K

Kai Grossjohann

From the repository explorer, there is a "Checkout as..." context menu
option. If you choose that, then you can specify the target directory
inside your project.

So for example I created an Eclipse project foo and checked out the
CVS stuff into the subdir foo/TheProjectName. Now I can add subdirs
of foo/TheProjectName to the source path and all kinds of things. (I
think I had to remove the default source folder from the source path,
though. I don't remember exactly.)

Kai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top