Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Sharing a J2EE web project with a team (CVS)
Sharing a J2EE web project with a team (CVS) [message #49292] Fri, 08 April 2005 15:48 Go to next message
Eclipse UserFriend
Originally posted by: jiivee.edu.taivalkoski.fi

Hi all CVS/Eclipse/WTP gurus out there!
***************************************

I have this problem. This is more of an CVS than Eclipse question, but I
thought that someone might have encountered a same kind of situation.

After creating a J2EE web project I put it in the CVS through Eclipse's
own CVS-client (Team -> Share...). The project file directory includes a
small file: .classpath, which seems to contain machine specific path
information (where JDK and Tomcat are and so on).

When one of my team members checks the same project out from CVS she
naturally has to tell Eclipse, where Tomcat and JDK are on HER machine
and thus she is making changes to the .classpath-file without even
knowing it (eclipse does the changes automagically). If she now commits
changes to the project, the changed .classpath file is put to CVS. Now,
if I do a cvs update afterwards, the .classpath on my computer is
replaced by the updated one from CVS and my project gets all messed up.

HOW TO put a file in CVS so that it is checked out with a given project
but no changes can be committed to that file? It would be nice that
..classpath would always come along with the rest of the project, but if
and more likely WHEN the user changes settings, the changed .classpath
would not be committed back to CVS. Or rather, CVS would not allow
committing changes to the file.

The .classpath would be committed to the CVS only once, when creating a
project.

I've gone around the problem so that i've removed the .classpath-file
from CVS after putting a fresh project in there. Now you always have to
add the .classpath -file manually to the project directory after
checkout from CVS. :(

Thanks for listening to my worries, hopefully you can help me out.

-Janne
Re: Sharing a J2EE web project with a team (CVS) [message #52688 is a reply to message #49292] Sat, 16 April 2005 03:24 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Janne V wrote:
> Hi all CVS/Eclipse/WTP gurus out there!
> ***************************************
>
> I have this problem. This is more of an CVS than Eclipse question, but I
> thought that someone might have encountered a same kind of situation.
>
> After creating a J2EE web project I put it in the CVS through Eclipse's
> own CVS-client (Team -> Share...). The project file directory includes a
> small file: .classpath, which seems to contain machine specific path
> information (where JDK and Tomcat are and so on).

It is possible to construct and configure a Project such that the
..classpath is "clean" - that is, so that it contains no absolute paths.
The JRE (JDK) definitions are machine- and workspace- specific (they
have to be), but as long as everyone uses the same name for the
Installed JRE(s) then that part works out fine (IOW, it doesn't matter
if I have JDK 1.4 in d:\java\jdk\1.4.1 and you have it in c:\jdk1_4_2,
as long as we both define it in our workspaces with the name "JDK 1.4")
For other stuff you can use Classpath Variables to allow
machine-specific locations of things like Tomcat, etc.

I suggest you look into the Help sections on Classpath Variables and
experiment a bit. I was able to convert a Project (.project, .classpath,
and .launch files) that I had originally set up for just my machine and
check it into CVS so that other developers could use it "out of the box"
and also make changes as needed (add a new JAR to the Project build
path, for example). Everyone just has to be aware and careful not to
introduce any absolute paths into any of the config.
If you find something specific that you can't seem to get right, feel
free to ask again and perhaps I or someone else can demonstrate how to
make it non-machine-specific.

HTH,
Eric
--------
I embrace my personality flaws, for without them I might not have any
personality at all.
Previous Topic:Setting default classpath folders
Next Topic:Cannot Install Eclipse
Goto Forum:
  


Current Time: Sun Oct 06 10:26:32 GMT 2024

Powered by FUDForum. Page generated in 0.07698 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top