- Open the Project Settings.
- Click Compiler to open the Compiler page.
- In the Resource patterns field, update the regular expression
that describes extensions of the files to be recognized as resources.
Separate individual patterns with semicolons (;).
Note
Wildcards and negations are welcome. The following symbols are accepted:
- * (asterisk) stands for an unlimited number of any symbols, possibly none.
- ? (question mark) stands for exactly one not empty symbol.
- . stands for a delimiter.
- ! (exclamation mark) indicates a negation of the entire mask to which it is applied. Accordingly, any file with the name and extension that DO NOT MATCH the pattern will be recognized as resource.
The examples below illustrate the use of wildcards in resource patterns:
- *.xml - any XML file is recognized as resource.
- !*.xml - any XML file is not recognized as resource.
- z*.properties;z*.gif;z*.png;z*.jpeg;z*.xml - any properties, gif, png, jpeg, or xml file with the name beginning with z is recognized as resource.
- On the Compiler | Excludes page, specify the files and folders that should be excluded from compilation.
- Specify other settings as required. See Compiler for detailed descriptions of the available options.
- Apply changes and close the dialog.
- Define the paths, providing the proper order of module roots and libraries, as described in the section Configuring Module Dependencies.
Note
Take into account that compiler in IntelliJ IDEA works sequentially, that is, in accordance with dependencies and processing order defined for your project modules, which might be important for some projects.

