-1

We were building one of the projects with surefire plugin version with Maven 3.0.4 and Java 1.7 . Recently we changed to build code with Maven 3.3.9 and Java 1.8 . But we cam across NestedException issue which we resolved by adding surefire plugin version 3.0.0-M2 within pom.xml. But due to certain conditions we had to revert to the same old Maven i.e. 3.0.4 and Java 1.7 and we removed the surefire plugin entry with version 3.0.0-M2 within pom. But the build is still downloading 3.0.0-M2 version surefire and using it and its failing the build with guice exception. We cleared the repo, removed from nexus but it is still downloading . There is no entry within pom for this plugin why is it still downloading the surefire 3.0.0-M2 version . Please help .

Alim Azad
  • 471
  • 2
  • 9
  • 23
  • Always define all plugins your are using in your pom file...to prevent such issues. Why move to Maven 3.3.9 and not to 3.6.0 ? Furthermore Maven 3.0.4 is extremely old..apart from that without full error messages the code etc. it's more or less impossible to find the real issue...I strongly encourage you to upgrade to more recent versions of Maven and also to JDK 8+... – khmarbaise Dec 21 '18 at 10:52
  • You could try and use maven enforcer plugin, that might help to see if there's any transitive dependency on surefile plugin, and you could exclude it in the POM – codevalid Dec 21 '18 at 15:33
  • The plugin is always downloaded with maven-metdata-nexus.xml with below entry. `3.0.0-M2 3.0.0-M2` . I tried removing the version element but nothing seems to be working . It downloading everytime I remove it – Alim Azad Dec 24 '18 at 04:45

1 Answers1

0

@alim-azad What conditions forced you to downgrade the version 3.0.0-M2? The CI is testing it against Maven 3.2+. Downgrading to such very low version of Maven is a risk that you wont be able to step out of issues fixed in higher versions.

tibor17
  • 1,043
  • 6
  • 9
  • Initially the builds were failing with NestedException when trigerred build with 3.3.9 and JDK1.8 and older surefire plugins. Hence we added surefire plugin version 3.0.0-M2 to resolve the same . But developers came back saying we don't want builds to happen with Maven 3.3.9 and JDK1.8 and new surefire plugin version . We reverted all the configuration to the existing developers set up but it didnt work and we have to manuqally update pom to use defined surefire plugin version . Not sure what has went wrong . – Alim Azad Jan 07 '19 at 07:16
  • Why developers said that they do not want to use new surefire plugin version? Why they did not try Maven 3.3.9 with JDK 1.7 and Surefire 3.0.0-M3? I am developing Surefire and I would recommend you to use this version. There is no reason to scare! – tibor17 Jan 08 '19 at 12:05