Using your Eclipse .classpath files from build.xml
Jul 1, 2004 15:29 · 136 words · 1 minute read
Some nameless person says that you should JavaGu(i)(y): Stop adding Eclipse .classpath and .project files to cvs!. Most of the comments in reply to this say that you should check those files in and use Eclipse’s mechanisms for dealing with variations (classpath variables and the like).
I agree that you should check these files in. We’ve gone even farther than that. Our ant build.xml file has a little piece of Groovy script that reads the .classpath file to set the classpath for the build. That way, we only have one classpath (Eclipse’s) to maintain. We also generate a JNLP file from the .classpath. This setup works great for us. Eclipse works easily when you check the project out, and our Solaris build server running anthill can run the builds without worrying about syncing up the classpaths.