what is dependency for Sonar-plugins in POM - maven

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.

Related

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

How to include csjdbc.jar as part of maven dependency?

I have been looking for a dependency for csjdbc.jar in Maven repository so that I can build my app using maven and retrieve that jar on the fly. However, I cannot find a dependency in Maven repository related to that jar. Can anyone help, please?
Hopefully you have already resolved this issue.
csjdbc.jar is not listed in maven repositories. If you have composite software installed you can copy the jar from
~\Composite Software\CIS 6.1.0\apps\jdbc\lib
directory to your local machine's maven repository like below with proper versioning:
C:\maven\repository\composite\csjdbc\6.1\csjdbc-6.1.jar
(I have 6.1 jar)

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.

Grails refresh-dependencies doesn't download snapshot dependency from local maven repository

I am using Grails 2.1.1 and Maven 3.0.3.
In my buildConfig.groovy, I have pom true and I generated the pom.xml via grails create-pom. In this pom I have a dependency with <version>1.0-SNAPSHOT</version> which exists only in my local maven repository. I can successfully run mvn clean compile on this pom.
However running grails refresh-dependencies does not download the most recent version of my snapshot dependency from my local maven repository. The only way I can get it to download the latest version is to manually delete it from the ivy cache.
According to the documentation:
All dependencies (jars and plugins) with a version number ending in -SNAPSHOT are implicitly considered to be changing by Grails.
I assume it would recognize my snapshot file as changing and download it when it is modified. Am I missing some other configuration step? I only want to use maven for dependency management, but is this entirely the wrong way to use Maven with Grails?
This is actually the normal behavior of the Aether resolver.
--refresh-dependencies doesn't bypass your local maven cache. To do that, you'll need to set the maven repository that contains your dependency to always download new snapshots. In BuildConfig.groovy's repositories block:
mavenRepo ("http://my.server/repos/my-grails-plugins") {
updatePolicy 'always'
}
Credit to http://asoftwareguy.com/2013/10/25/grails-2-3-maven-dependency-caching-issues/.
Since I haven't got any responses, what seems like the solution to this is to just not use the grails command line, but rather use the maven goals for Grails.
mvn grails:run-app does the trick. All snapshot dependencies are refreshed and I can start up my app and see the local changes reflected. This way I'm ignoring ivy altogether and letting maven take care of everything.
Edit: If you go this route, I suggest following chapter 5 of the User Guide on Maven Integration for setting up your pom.xml, etc. I was able to follow this and get it set up without any surprises.

Resources