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
Related
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.
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.
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.
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.
As part of an automated deployment I need a script to download the latest version of an artifact from our internal repository.
Ideally this script will be with ant or a unix shell script.
So for example:
I have myArtifact.war and it has versions 1.0 , 1.1 and 2.0 - I need the script given the correct group id and artifact id to retrieve version 2.0 from our maven repository (currently using artifactory).
Is there any easy way to do this?
You can use the Maven Dependency Plugin goal get together with LATEST as version for your artifact:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get
-DremoteRepositories=<URL_to_your_maven_repo>
-Dartifact=<group_id>:<artifact_id>:LATEST
-Dpackaging=jar
-Ddest=<target_dir>/<artifact_name>.jar
You can parse the maven-metadata.xml to see what versions are available, and which version is the "release" version. See this answer about plugin versions for more details.
If you are using Nexus, you can use the REST API to query the repository. You can also use the REST client API to simplify your processing.
To update the release version, activate the release-profile in the Maven super POM when you do mvn deploy. You can do this by adding -Prelease-profile or -DperformRelease=true to the command line.
The profile is activate by default in the maven-release-plugin's perform goal. It is controlled by the useReleaseProfile property. See the release-perform goal's documentation for more details.