VCS integration: ignore all folders with some name pattern (like "target" produced by Maven)

(this applies to "target" folders as well as some others produced by our build automatically)

we have a project with a very large number of Maven modules. I need IDEA to ignore all "target" folders produced by Maven. Unfortunately, IDEA only ignores certain files in those folders (like java classes), but not the whole folders.
as the result, there is a lot of "unversioned files" reported by IDEA and I have to add them to ignored list folder by folder (which is not a viable solution if you have hundreds of modules).
the files, which IDEA does not ignore in "target" folders:
    osgi-cache\META-INF\MANIFEST.MF
    xxxxx.jar
    xxxxx-javadoc.jar

I see how to add a specific "target" folder to ignored list, but can't use file masks for folders.

here's a fragment from my workspace.xml:

    <ignored path="all.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored mask="*.iml" />
    <ignored path="app-ab/ab/target/" />


I want to add items like

    <ignored path="*/*/target/" />
    <ignored path="*/*/webapp/" />

- does not work.

any ways to solve this?

Please sign in to leave a comment.