Use a composite resource loader on RamlParser constructor in order to add the FileResourceLoader. It is needed for the include statements.
By default the RamlValidationService and RamlDocumentBuilder use the DefaultResourceLoader, which initializes a CompositeResourceLoader including only the UrlResourceLoader and ClassPathResourceLoader. The problem is that when running the parser using the maven plugin the project /src/java/resources directory is not in the classpath of the maven build and the include statements cannot locate the files contained in /src/java/resources directory.
The solution of that is to use the FileResourceLoader in addition with the other two loaders.
Use a composite resource loader on RamlParser constructor in order to add the FileResourceLoader. It is needed for the include statements. By default the RamlValidationService and RamlDocumentBuilder use the DefaultResourceLoader, which initializes a CompositeResourceLoader including only the UrlResourceLoader and ClassPathResourceLoader. The problem is that when running the parser using the maven plugin the project /src/java/resources directory is not in the classpath of the maven build and the include statements cannot locate the files contained in /src/java/resources directory. The solution of that is to use the FileResourceLoader in addition with the other two loaders.