Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How To Prevent Eclipse from editing the .classpath files of projects?(classpath entries exported from another project are not needed explicitly in the classpath)
How To Prevent Eclipse from editing the .classpath files of projects? [message #973968] Tue, 06 November 2012 19:16 Go to next message
Noa Drach is currently offline Noa DrachFriend
Messages: 6
Registered: November 2012
Junior Member
Hello All,

I am using Eclipse Juno SR1(but this is also valid for Indigo or Helios).
the plugins installed on it are JBOSS Tools and plugin for TFS.

I have about 10 projects - 9 of them are using the remaining one project, let's call it Common.

Common is using a server runtime and also a JDK.

In order to avoid setting the same info on all other projects, so it will be easier to handle and also share the projects with other users,
I marked in the Common export definitions the JDK and runtime to be exported - and it works great!

my problem is that on changes done to the JDK definition, let's say I decided to call it JDK6 instead of JDK1.6.0.30 - when I confirm this change, and since I have a source control, I see that eclipse checks out all the .classpath files of all the 9 projects and adds the JDK definition there explicitly.
I know this editing is not needed because if I undo the checkout all my projects are compiling without any problem.

I think there are other scenarios where this edit happens - but I didn't map them all, yet.

So, my question is -
Is there a way to instruct eclipse to avoid this automatic editing? the other solution I thought of is to put the .classpath files under strict check-out\check-in policy


Thanks,
Noa
Re: How To Prevent Eclipse from editing the .classpath files of projects? [message #974771 is a reply to message #973968] Wed, 07 November 2012 10:04 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 06.11.2012 20:57, Noa Drach wrote:
> Hello All,
>
> I am using Eclipse Juno SR1(but this is also valid for Indigo or Helios).
> the plugins installed on it are JBOSS Tools and plugin for TFS.
>
> I have about 10 projects - 9 of them are using the remaining one
> project, let's call it Common.
>
> Common is using a server runtime and also a JDK.
>
> In order to avoid setting the same info on all other projects, so it
> will be easier to handle and also share the projects with other users,
> I marked in the Common export definitions the JDK and runtime to be
> exported - and it works great!
>
> my problem is that on changes done to the JDK definition, let's say I
> decided to call it JDK6 instead of JDK1.6.0.30 - when I confirm this
> change, and since I have a source control, I see that eclipse checks
> out all the .classpath files of all the 9 projects and adds the JDK
> definition there explicitly.
> I know this editing is not needed because if I undo the checkout all
> my projects are compiling without any problem.
>
> I think there are other scenarios where this edit happens - but I
> didn't map them all, yet.
>
> So, my question is - Is there a way to instruct eclipse to avoid this
> automatic editing?
You can't. But instead of putting a JAR on the Java build path you could
choose an execution environment which should stay stable when you change
the JRE and hence the .classpath file will not change either.

Dani
> the other solution I thought of is to put the .classpath files under
> strict check-out\check-in policy
>
> Thanks,
> Noa
Re: How To Prevent Eclipse from editing the .classpath files of projects? [message #974825 is a reply to message #974771] Wed, 07 November 2012 11:07 Go to previous message
Noa Drach is currently offline Noa DrachFriend
Messages: 6
Registered: November 2012
Junior Member
I didn't understand what you meant by this
Dani Megert wrote on Wed, 07 November 2012 05:04
On 06.11.2012 20:57,
You can't. But instead of putting a JAR on the Java build path you could
choose an execution environment which should stay stable when you change
the JRE and hence the .classpath file will not change either.


what is "an execution environment which should stay stable when you change the JRE" ?

Previous Topic:Problem Starting Eclipse
Next Topic:rcp Plugin - ComboBox in Toolbar
Goto Forum:
  


Current Time: Fri Mar 29 06:33:07 GMT 2024

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

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

Back to the top