posted: 26 Dec 2007
I've used the Eclipse IDE for ColdFusion development for a few years in the guise of CFEclipse but in the last year, my invovlement in Java, particularly for web applications, has increased and with Eclipse installed on my desktop already, it seemed a perfect fit to carry on using the same familiar IDE for the Java development as well.
However, we are a big user of Subversion for our version control and I found that I was suffering predictable but unhelpful functionality from the Java build process in Eclipse. The basic problem is that during compilation, particularly a full build, the IDE would strip out the build output folder and then replace it with the freshly comiled contents of my src directory. This has one major flaw when using Subversion; Subversion uses a folder (.svn) and sub folders/files to control the version control information for the contents of that folder, in particular the url into the repository where these files live. During a rebuild, this information was being replaced with the Subversion information from the src folder, including the repository location of the src files. Trying to commit the compiled classes to Subversion (I know, probably not the best thing to do) would result in my compiled classes being pushed at the Subversioned src folder in the repository, this would break Subversion and I couldn't commit anything to the repository.
I Googled this problem and I found one posting about excluding the subversion files during the compilation but no help in how this could be done. But this morning I figured it out and thought I would post it here for my own use and to help anyone else with a similar problem.
The settings can be done either local to a project or globally to the IDE (I chose IDE wide). To do this, select Window from the main IDE menu and then 'Preferences...'. In the left menu expand the 'Java' node and then expand the 'Compiler' node. Now pick on the 'Building' node, this brings up the Building preferences in the main pane and scroll down to the 'Output Folder' section. I modified two settings to make this work for me:
1. Uncheck the 'scrub output folders when cleaning projects', otherwise your .svn and other control files will be removed 2. Enter two (extra) terms to the 'Filtered Resources' text box. '*.svn*, *svn/'. This should stop any svn folders or files from being copied.
Then hit Apply or OK and rebuild your project.