Maven downloading surefire plugin 3.0.0-M2 inspite of not been specified in pom - maven

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 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.

Related

maven-compiler-plugin 3.8.4 3.9.0

So far I am fine with maven-compiler-plugin 3.8.1.
However, from time to time I am updating my pom.xml in maven archetypes for keeping pace with newer versions.
With maven-compiler-plugin I am confused and like to understand.
In maven central I can find that 3.9.0 is available. However, using it in my pom.xml I get the failure
maven-compiler-plugin:3.9.0 or one of its dependencies could not be resolved: org.apache.maven.plugins:maven-compiler-plugin:jar:3.9.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt.
Check this on the given url it looks like it should have been found.
On the maven apache site I can see, that 3.9.0 is not released, but 3.8.4.
How is it possible that Maven Central shows a version in release notation that is not released by its developers?
Looking for 3.8.4 on maven central reveals that the next older version before 3.9.0 is 3.8.1 - nothing in between.
Why do the developers release a maven plugin but do not load it up to Maven Central?
What am I thinking wrong here?

Latest release of sonar maven plugin is broken

It looks like they released latest version of sonar maven plugin which is under org/sonarsource/scanner/maven/sonar-maven-plugin/3.8.0.2131/
However it has a dependency below that is missing in the public maven repos :-
org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.0.226
The latest version i could find for this dependency is 2.15.0.2182 available in public repos
This is causing most of our build failures now where we use sonar goal in maven. I know we can fix this by specifying the version something like below :-
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar
However, that would require us to make changes in a number of places.
Is anyone in the community aware of this and if so do we know if they are going to fix the latest version of sonar maven plugin and make all its dependencies available?
For the moment you can specify in your Jenkins job the version of the plugin :
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar
SonarSCanner for Maven

what is dependency for Sonar-plugins in POM

We have upgraded SonarQube from version 3.7.2 to 4.5.5. We are using maven to
build and deployment.
There are some plugins need to be updated. But, I am not sure whether, I am not able to find the exact GAV parameter for them or to find latest version using POM.
e.g Build-stability-plugin; I am not able to find version 1.3 for this plugin on maven repository.
Any kind of help will be appreciated
You mix Maven plugins and SonarQube plugins. The latter doesn't need to be deployed in Maven repository nor to be defined in project poms.

Cannot get the latest version of maven plugin

I am new to maven, I have write my own maven plugin with the pom file
<groupId>com.xxx.api</groupId>
<artifactId>xxx-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
then, in my IDE (intellij) I used clean install to install my maven plugin
and in the main project, my maven plugin works fine.
However, when I modify my maven plugin by adding parameter to my mojo and "mvn clean install" ,
(the groupId,artifactId,version keep the same) it supposed to be the latest version.
However, in the main project, when I try to use the latest maven plugin, I always get the old version
i.e I cannot configure the parameter that I just add to my maven plugin (because it is not exist!)
I have try to delete the maven plugin in my .m2 repo, before I install the latest version of my maven plugin, it still not work.
Any solution that I can get the latest version of my maven plugin by keeping the same
(groupId, artifactId,version)?
thanks,
Zach
Check how the using project is configured. I guess it has its own lib/classes folder. I would suspect that your project has a copy of the older version of the plugin in its lib folder. If so, that is where it is getting the old version. Clean it out from there, i.e. you need to clean the using project.

Maven 2 is Still Alive : Even after setting Maven3

And i got a requirement, converting a Maven 2 project to Maven 3. So i downloaded Maven 3.2.1 and edited the Maven path to 3.And also changed Maven installation in eclipse to point Maven 3.
But when i run my project in eclipse, it is still taking maven 2 plugins. Could you please help me with this ?
Versions are just versions, there's no real relation between the Maven version and the plugin version. Actually, the Maven team tried to keep the maven-plugins as much as possible compatible with Maven3.
https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Plugin+Compatibility+Matrix shows the list of maven plugins and from which version they can be used with Maven3. Only the Maven-site-plugin required a major release, since it had to adopt the reporting part which has been removed with Maven3.

Resources