How to deal with "omitted for conflict with.." message in pom.xml?

I have this situation:

在这里输入图像描述

I know that "Maven resolves version conflicts with a nearest-wins strategy". So here wins the aop 3.0.7 based on this rule. But i also define a dependencyManagement section in my pom and it seems like this:

    <properties>
        <org.springframework.version>3.2.4.RELEASE</org.springframework.version>
        <org.springframework.security.version>3.1.4.RELEASE</org.springframework.security.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${org.springframework.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>${org.springframework.security.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${org.springframework.security.version}</version>
        </dependency>

        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.7.1</version>
        </dependency>

    </dependencies>

</project>

And this is what it all looks like on the dependencies tab:

在这里输入图像描述

So i expect the spring-aop to use the 3.2.4.RELEASE version instead of 3.0.7 like the webmvc, as i define this in the dependeny management.. Why is there still being used the older version 3.0.7?


Your dependency management declaration has a typo (com.springframework instead of org.springframework).

This is the correct pom entry:

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-aop</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>

Unfortunately, since the dependency is not being used, Maven (or Eclipse) will not flag as a missing artifact.

链接地址: http://www.djcxy.com/p/75140.html

上一篇: LdapConnection与PrincipalContext

下一篇: 在pom.xml中如何处理“在与..冲突时忽略...”消息?