I am new to Git and it is hard for me to understand this.
We are using JBoss Application Server 5.1 in Eclipse. Some users have downloaded the JBoss Tools Eclipse plugin so that they can add the Runtime JBoss 5.1 server as "JBoss AS 5.1" to the Eclipse workspace. This causes the classpath line to look like this:
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 5.1 Runtime"/>
Other people do not see the value of downloading and installing the JBoss Tools plugin, so they just use the built-in JBoss Eclipse server adapter, which is only suitable for JBoss v.50. They have a pathpath class that looks like this:
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runtimeTarget/JBoss v5.0"/>
I do not want to add .classpath to my .gitignore file because:
- Files are already transferred to their original state, and deleting them is a very painful process that I tried and did not understand in the past.
- I want people who set up new workspaces to be able to import projects from Git and move on to them right away.
So far, we just tried each, modifying our .classpath files in our working directory, but never committed. This is annoying not only because they continue to appear in our Git status, but sometimes they do not allow us to merge or switch between branches in Egit - complaining about uncommitted changes.
I read on the Internet about using class variables instead, but I cannot find the correct path to the JBoss libraries. The classpath lines listed above seem to be somewhere inside the Eclipse / plugins directory somewhere? But I canβt find him. I also tried to point some variables to my C: \ jboss-5.1.0.GA \ directory, but that does nothing either.
Is there a way to simply leave the .classpath file inside the repository, since it is now in its current state, so that new users who clone the repository still receive them, but then simply ignore all future changes that developers make to the files?
source share