我正在將Spring安全性3.0的應用程序遷移到Spring安全性3.1。如何防止Maven在可部署戰爭中包含某些依賴關係?
我已經越來越約不正確的架構錯誤被引用:
SEVERE: Exception sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration
problem: You must use a 3.0 schema with Spring Security 3.0.(2.0 or 3.1 versions are not
valid) Please update your schema declarations to the 3.0.3 schema (spring-security-
3.0.3.xsd).
Offending resource: ServletContext resource [/WEB-INF/security-context.xml]
當我看着/ lib中我看到了一些罐子的是3.1版本的複製爲3.0版本。我懷疑這是什麼導致上述錯誤。
當我使用Eclipse Maven插件查看pom.xml的依賴關係樹時,我可以看到早期版本被引用的位置(例如spring-security-acl依賴於幾個3.0 jars),但它們被標記爲'與...衝突而忽略'。這是否意味着他們應該從構建的戰爭文件中省略?
我試過在我的pom的根目錄下明確命名這些文件的3.1版本,但舊版本仍然包含在內。
是的,但它不應該是因爲我一直在更新罐子到3.1。所以我改變了模式聲明以匹配。 – DaFoot 2012-07-19 08:40:42
我需要弄清楚爲什麼它會抱怨,我的感覺是因爲Maven在構建中包含了這些3.0個JAR,因爲某些原因。 – DaFoot 2012-07-19 08:41:41