I have a similar problem and it was caused by a transitive maven dependency.
My web project has the following dependencies my pom.xml
<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-core</artifactId> <version>3.2.11.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>3.2.11.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>3.2.11.RELEASE</version> </dependency>
my model has the following dependency in its pom.xml
<dependency> <groupId>org.springframework.security.extensions</groupId> <artifactId>spring-security-saml2-core</artifactId> <version>1.0.0.RELEASE</version> </dependency>
The web project depends on the model project, so when I run my web project, I got a configuration error
Configuration problem: you cannot use spring -security-3.0.xsd schema with Spring Security 3.1. Update your schema declarations to schema 3.1.
Running mvn dependency: the tree shows that spring -security-saml2-core depends on spring -security-config (ver 3.1.2.RELEASE)
[INFO] + -org.springframework.security.extensions: spring -security-saml2-core: jar: 1.0.0.RELEASE: compile
[INFO] | + -org.springframework.security: spring -Security-configurations: jar: 3.1.2.RELEASE: compile [INFO] | - xml-apis: xml-apis: jar: 1.4.01: compile
Since I'm using version 3.2.11.RELEASE in a web project, the solution is to eliminate bad transitive dependency
<dependency> <groupId>org.springframework.security.extensions</groupId> <artifactId>spring-security-saml2-core</artifactId> <version>1.0.0.RELEASE</version> <exclusions> <exclusion> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> </exclusion> </exclusions> </dependency>
This solves the problem for me.
Anthony nguyen
source share