Validate a given classpath and output location for a project, using the following rules:
- Classpath entries cannot collide with each other; that is, all entry paths must be unique.
- The project output location path cannot be null, must be absolute and located inside the project.
- Specific output locations (specified on source entries) can be null, if not they must be located inside the project,
- A project entry cannot refer to itself directly (that is, a project cannot prerequisite itself).
- Classpath entries or output locations cannot coincidate or be nested in each other, except for the following scenario listed below:
- A source folder can coincidate with its own output location, in which case this output can then contain library archives.
However, a specific output location cannot coincidate with any library or a distinct source folder than the one referring to it.
- A source/library folder can be nested in any source folder as long as the nested folder is excluded from the enclosing one.
- An output location can be nested in a source folder, if the source folder coincidates with the project itself, or if the output
location is excluded from the source folder.
Note that the classpath entries are not validated automatically. Only bound variables or containers are considered
in the checking process (this allows to perform a consistency check on a classpath which has references to
yet non existing projects, folders, ...).
This validation is intended to anticipate classpath issues prior to assigning it to a project. In particular, it will automatically
be performed during the classpath setting operation (if validation fails, the classpath setting will not complete).