Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij Open File Resource ( Ignore target folder )

When I use the command + shift + o command I get this popup:

enter image description here

The problem is that in a Java EE applicaton there will be duplicates in the target folder. Sometimes I start editing the wrong file. I do not want them listed, see picture. Is there a way to exclude folders?

Also, on another note:

Sometimes intellij will highlight as error a method call, thinking it matches some other class. Not possible to ignore error ( doesn't help ), and no way of pointing the right method or class manually. Is there a way to fix this?

like image 421
mjs Avatar asked May 30 '13 09:05

mjs


2 Answers

Make sure that the target folder is excluded in the Project Structure | Modules:

enter image description here


It should have been excluded automatically since it is a maven project (I assume).

like image 84
maba Avatar answered Nov 04 '22 01:11

maba


I have done what @maba recommended myself but it comes back whenever mvn clean deletes a directory that IntelliJ is tracking as an ignored directory, IntelliJ seems unable to remember that it was ignoring that directory. Perhaps it sticks a configuration file in the target directory it's trying to ignore? In any case, this answer worked for me even after I ran a mvn clean.

Intellij IDEA. Always show maven's `target` directory

like image 1
Jazzepi Avatar answered Nov 04 '22 00:11

Jazzepi