Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow To Prevent Eclipse from editing the .classpath files of projects?
https://www.eclipse.org/forums/index.php/mv/msg/429586/973968/#msg_973968
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]]>Noa Drach2012-11-06T19:16:12-00:00Re: How To Prevent Eclipse from editing the .classpath files of projects?
https://www.eclipse.org/forums/index.php/mv/msg/429586/974771/#msg_974771
> 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]]>Dani Megert2012-11-07T10:04:18-00:00Re: How To Prevent Eclipse from editing the .classpath files of projects?
https://www.eclipse.org/forums/index.php/mv/msg/429586/974825/#msg_974825
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" ?