Pregunta

I'm using Eclipse STS and SVN on Windows. I'm able to check-in/out from STS, no problem, but when I commit from STS I want to ignore generated files like .class, etc. So I'm trying to use the SVN Property tab and setting the property svn:ignore with the following exclusions...

target
target-eclipse
*.class

But when I commit from eclipse, the .class file still get displayed in the Commit dialog. Is the ignore pattern wrong? I tried using /*.class but eclipse won't let me save that pattern claiming the pattern is not valid

¿Fue útil?

Solución

These patterns only apply to the current folder. As such, what you've provided will only exclude files or folders with those names from the root folder, but not any sub-folders. I don't believe that there is a SVN option that allows for these patterns to apply to all sub-folders as well.

Shouldn't all of your *.class files be in your "target" folder, or another "bin" folder anyway - separated from the source files? If / once so, then you can exclude that folder, which will exclude all of its children as well.

Alternatively, within Eclipse, under Window / Preferences / Team / Ignored Resources, you can add patterns there (e.g. *.class) - which will globally apply everywhere. (But I'd highly recommend the above approach instead.)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top