I am working on an SWT project as part of a team. We are constantly breaking each others build environment because Eclipses .classpath file is checked into version control and we include different SWT libraries for our machines.
Depending on who committed last, the .classpath entry can be:
<classpathentry kind="lib" path="lib/swt/swt-win32.jar"/>
or
<classpathentry kind="lib" path="lib/swt/swt-carbon.jar"/>
or
<classpathentry kind="lib" path="lib/swt/swt-gtk.jar"/>
It appears that the libraries are mutually exclusive, i.e. you cannot include them all at once and let SWT work it out. So we need to filter them for each platform somehow...
Does anyone have any ideas on how to do this? My initial idea was to split this into its own ".classpath-swt" file (ignored by the VCS), auto-generate it using Ant and include it in the main .classpath, but it seems Eclipse doesn't support splitting up the .classpath file.
Our current work-around is to avoid committing the .classpath unless we have actually changed the dependencies, however this still means that a number of people have to fix their development environments each time the .classpath is changed.
Any suggestions will be much appreciated, as long as it's not "don't use Eclipse" as this is not an option for this project :)