@HDave But what would XML parser be looking for, schema could have any name
@skaffman, Does it mean that when I run maven build of spring-based projhect with -o (offline) flag the build will fail despite the fact that all the dependencies are available in my local repository?
If you omit the schemaLocation, then the XML parser won't know where to get the schema in order to validate the config.
Technically, the XML parser will firstly try to load the schema from internet, if not found or internet access is not available, it will search *.xsd file locally from class path, if still not found, it will be omitted.
The Java XML parser that spring uses will read the schemaLocation values and try to load them from the internet, in order to validate the XML file. Spring, in turn, intercepts those load requests and serves up versions from inside its own JAR files.
Wouldn't the XML parser search the class path?