Continuing the discussion from When buildship imports a java project it doesn't change the "Build Path" output folder:
I raised this a couple of weeks ago and received no reply. The more I think about it, this is a bug. It impacts me in the following ways:
-
as the original topic says, it is confusing to have two folders for java class files in Eclipse, one for the automatic building, one for builds with the gradle tooling.
-
More irritating than this is the lack of a nice repeatable .gitignore template on a project. We are close, very close, to being able to specify a repeatable gitignore syntax at the root project level. This almost works but for the bin directory
**/build/
**/.gradle/these entries keep eclipse metadata out of source control:
**/.settings/
**/.project
**/.classpath
But then there is that miserable bin
directory. Could fix that in .gitignore with one more line:
**/bin/
if not for the fact that I build a lot of rpms and a bin folder is sometimes used for shell scripts and the like.
The outlier here, the one that does not fit with gradle, is the default Eclipse assumption that the default place to put class files is /bin
. I think that Gradle should take a cue from the Maven tooling here. In m2e, the classes are under target
. In gradle, they should be under build/classes
, not just adopt the Eclipse default.
What makes this even more annoying is that with the current state of buildship I find myself needing to delete the Eclipse project while leaving the local Git repository that backs it alone, making some change, and then reimporting. Frequently I must do this two or three times, and I don’t mind it, it’s a relatively painless way to learn to get it right. This would be less painful if the “keep/overwrite” option on Eclipse metadata, for which I’d like to make “overwrite” the best practice, didn’t “trash” my .classpath
file with the unwanted bin
output directory every time.
One more question on this general score: when choosing overwrite, is .gitignore
one of the Eclipse files overwritten? I would prefer that this not be so. .gitignore
has more to do with version control than it does with Eclipse.
This is all occurring with Buildship 1.0.15.