junit4 - Unable to force newer version of surefire-plugin in Maven -
i have maven project , using surefire-plugin run tests. previously, didn't force version , maven picked 2.4.3 me (why ??).
i want use 2.7.2 instead, has better support junit4 (especially parametrized tests).
hence, have modified root parent pom :
<pluginmanagement> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.7.2</version> <dependencies> <dependency> <groupid>org.apache.maven.surefire</groupid> <artifactid>surefire-junit47</artifactid> <version>2.7.2</version> </dependency> </dependencies> <configuration> <skiptests>true</skiptests> </configuration> </plugin> </plugins> </pluginmanagement>
however, in child modules, surefire:2.4.3 keeps being called. here -x debug trace :
[debug] configuring mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test'
whereas in parent pom, 2.7.2 used:
[debug] configuring mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test'
and effective-pom shows "version" of plugin if not inherited in child modules:
<plugin> <artifactid>maven-surefire-plugin</artifactid> <version>2.4.3</version> <configuration> <skiptests>true</skiptests> </configuration> </plugin>
any appreciated.
regards, raphael
Comments
Post a Comment