Great! Thanks for the suggestions. 

The organization of my project is:

parent
   - module1
   - module2


Following your advice, I did:

parent:
<project>
    <groupId>test</groupId>
    <artifactId>parent</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    
    <modules>
        <module>module1</module>
        <module>module2</module>
    </modules>
    
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.0.6.RELEASE</version>
    </dependency>
</project>


module1:
<project>
    <parent>
        <groupId>test</groupId>
        <artifactId>parent</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>module1</artifactId>
    <dependencies>
        <dependency>
            <groupId>test</groupId>
            <artifactId>module2</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
</project>


module2:
<project>
    <parent>
        <groupId>test</groupId>
        <artifactId>parent</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    
    <artifactId>module2</artifactId>
    <dependencies>
        <dependency>
            <groupId>foo</groupId>
            <artifactId>bar</artifactId>
            <version>1.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

It works like a charm :)


--
View this message in context: 
http://maven.40175.n5.nabble.com/Conflicting-Spring-versions-tp5075558p5076112.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to