# Inclusion and Exclusion Patterns

Inclusion and Exclusion patterns can be configured for source folders. They define which files are considered as Java source files by the Java builder and other Java tooling. This set of Java source files consists of all files where the path relative to the source folder matches an inclusion pattern but not an exclusion pattern.

By default, all files and folders contained in a source folder are included. By defining an inclusion pattern, the set of included resources will be limited to the resources matching the inclusion pattern. Using exclusion patterns, some of these resources can be excluded again.

Exclusion patterns are required when nesting source folders. The nested folder must be excluded from the outer source folder.

The patterns have the same format as ANT patterns:

- '*' matches zero or more characters, '?' matches one character.
- '/' is used to separate folders: This means the first segment in the pattern is matched against the most outer folder name in the path to match, the second segment with the second, and so on.
- '**' matches any number of folders

Java builder
Classpath variables
Inclusion and exclusion patterns
Access rules

Java Build Path properties