Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem is that Spring Security 3.1.4 depends on Spring 3.0.7, so it ends up pulling in spring-aop 3.0.7, which pulls in spring-asm 3.0.7. What you want to do is to use maven's <code>dependencyManagement</code> section to force any Spring inclusions to use the latest version, like so:</p> <pre><code>&lt;dependencyManagement&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-aop&lt;/artifactId&gt; &lt;version&gt;${spring.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-core&lt;/artifactId&gt; &lt;version&gt;${spring.version}&lt;/version&gt; &lt;/dependency&gt; &lt;!-- etc... -- enumerate all Spring sub-projects here that spring-security includes --&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/dependencyManagement&gt; </code></pre> <p>You can verify that you've managed away all the dependencies by running <code>mvn dependency:tree</code>.</p> <p>For example, before <code>dependencyManagement</code>, my <code>mvn dependency:tree</code> output was:</p> <pre><code>[INFO] +- org.springframework.security:spring-security-core:jar:3.1.4.RELEASE:compile [INFO] | +- org.springframework:spring-aop:jar:3.0.7.RELEASE:compile [INFO] | | \- org.springframework:spring-asm:jar:3.0.7.RELEASE:compile [INFO] | +- org.springframework:spring-core:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | +- org.springframework:spring-context:jar:3.0.7.RELEASE:compile [INFO] | +- org.springframework:spring-beans:jar:3.0.7.RELEASE:compile [INFO] | \- org.springframework:spring-expression:jar:3.0.7.RELEASE:compile [INFO] +- org.springframework.security:spring-security-config:jar:3.1.4.RELEASE:compile [INFO] +- org.springframework.security:spring-security-web:jar:3.1.4.RELEASE:compile [INFO] | +- org.springframework:spring-jdbc:jar:3.0.7.RELEASE:compile [INFO] | +- org.springframework:spring-web:jar:3.0.7.RELEASE:compile [INFO] | \- org.springframework:spring-tx:jar:3.0.7.RELEASE:compile </code></pre> <p>Notice in particular the first three lines, where <code>spring-aop</code> brings in <code>spring-asm</code>. After adding sufficient <code>dependencyManagement</code> declarations, we now get:</p> <pre><code>[INFO] +- org.springframework.security:spring-security-core:jar:3.1.4.RELEASE:compile [INFO] | +- org.springframework:spring-aop:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | +- org.springframework:spring-core:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | +- org.springframework:spring-context:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | +- org.springframework:spring-beans:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | \- org.springframework:spring-expression:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] +- org.springframework.security:spring-security-config:jar:3.1.4.RELEASE:compile [INFO] +- org.springframework.security:spring-security-web:jar:3.1.4.RELEASE:compile [INFO] | +- org.springframework:spring-jdbc:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | +- org.springframework:spring-web:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) [INFO] | \- org.springframework:spring-tx:jar:3.2.3.RELEASE:compile (version managed from 3.0.7.RELEASE) </code></pre> <p>Notice how <code>spring-asm</code> is not even included anymore, since the new <code>spring-aop</code> does not require it.</p> <p>This is a cleaner way to manage your Spring versions than the exclusions in the answer above, as it will apply to any other 3rd party dependencies you might add that reference Spring.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload