Question

How do I ignore an entire subtree based on a directory pattern globally, without specifically excluding it for every project? For an example, I would like to exclude the target/ tree in all Maven projects without having to do so individually on a per-project basis.

Adding 'target' to Window > Preferences > Team > Ignored Resources works well, but will also exclude any target dir. elsewhere - which isn't a problem in my case, but I wanted to know if there is a better method to specify excluding certain dirs.

I have also added the exclusion pattern for Tortoise settings, and am aware of the subversion global-ignores property from trying to find the answer here just now :) Just an fyi that I do know where to put the pattern, but not sure of what it should be.

Was it helpful?

Solution

Regarding ignore patterns, TortoiseSVN help says:

You should not include path information in your pattern. The pattern matching is intended for use against planes filenames and folder names. ... . If you want to ignore all tmp folders that exist within a prog folder and not within a doc folder you should use the svn:ignore. There is no reliable way to achieve this using global ignore patterns.

It seems your only option is svn:ignore property.

OTHER TIPS

When you create a new Maven Project, remember to svn:ignore the target folder. That is the strongest way.

Ps : if you construct a pattern for target, you will match all word containing almost target...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top