excluded directories keep un-excluding

I have a GWT app I build using maven.. all the artifacts live under target/  I am constantly having to re-add the target/generated-sources directory to the exclusions list to keep the crud out of my IDEA indexes. I also have to keep removing this directory from my sources folders..

Why does it keep changing by itself?

4 comments
Comment actions Permalink

I should mention I'm on the latest build in EAP (107.322)

0
Comment actions Permalink

It seems like this might be related to having a project derived from a maven pom... is there something I should add to my pom to make idea take note of directories containing generated GWT stuff under target/ ?

0
Comment actions Permalink

Hi.
This is designed behaviour:

Generated Sources


In order to get generated sources automatically imported as source folders configure corresponding plugins so that they put them into target/generated-sources/<subdir>, where subdir is any folder name you prefer. The subdir folder is necessary to distinguish sources from different tools and also to exclude some special generated sources (e.g. groovy stubs).

Please note that even if you manually configure some source folders under target/generated-sources of this folder itself, IDEA will rewrite them according to your pom.xml.

Any time you want to generate sources you simply execute the corresponding goal, bound for generation (usually generate-sources, generate-test-sources). After that IDEA will pick up new folders and set them up.

Generated Sources in Non-standard location


If it is not possible to configure the plugin you should use Update Folders action available from Maven Projects tool window and for each Maven project in the list. This action takes special steps to discover plugin configuration and configure source folders.

To specify a phase that should be used during this action go to Settings->Maven->Import.

Generated sources have to be included as sources, otherwise you have to generate classes. You can create profile without sources generation, if you project will be compilable in such configuratiion.

regards, Alex

Message was edited by: Alexander Ashitkin

Message was edited by: Alexander Ashitkin

0
Comment actions Permalink

when I read developer responses like that , my blood boils . Excluded means excluded , implicit hidden behavior is BAD , don't freaking make decisions for the user , or remove the freaking functionality all together , 

0

Please sign in to leave a comment.