From 706b1398b8124b99d816e2e224d9f58e53e6b055 Mon Sep 17 00:00:00 2001 From: Cyrille Le Clerc <cyrille@cyrilleleclerc.com> Date: Sat, 10 Aug 2013 19:39:59 +0200 Subject: [PATCH] pom:xml: use <dependencyManagement> to force versions of spring-core, spring-context and spring-beans to 3.2.x. instead of exclusions on spring-data-jpa dependency because Maven sometimes pulls both versions 3.2.x and 3.1.x versions of coring-core, spring-beans and spring-context. --- pom.xml | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 9a62d9b..518d4f7 100644 --- a/pom.xml +++ b/pom.xml @@ -102,12 +102,6 @@ <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>${spring-data-jpa.version}</version> - <exclusions> - <exclusion> - <groupId>org.springframework</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> @@ -318,6 +312,47 @@ </dependencies> + <dependencyManagement> + <dependencies> + <!-- + Force the version of all the spring jars (core, beans, context, ...) + pulled by spring-data-jpa:1.3.4.RELEASE to 3.2.x when spring-data pulls + the 3.1.x versions to prevent some misbehaviors of maven which sometimes + pulls both 3.2.x and 3.1.x versions of spring-core, spring-beans and spring-context + --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring-framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring-framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring-framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-orm</artifactId> + <version>${spring-framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring-framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-tx</artifactId> + <version>${spring-framework.version}</version> + </dependency> + </dependencies> + </dependencyManagement> + <!-- Maven plugin versions are mentioned in order to guarantee the build reproducibility in the long term --> <build> <defaultGoal>install</defaultGoal> -- GitLab