mulesoft-catalyst / mule-sonarqube-plugin

The Mule SonarQube Plugin provides the capability to do code inspecting and taking project metrics from a mule project using SonarQube.
The Unlicense
48 stars 69 forks source link

Mulesoft Sonarqube plugin 1.0.6 is not compatible with the Sonarqube version 9.9 LTS #60

Open rajeswari-kadavakallu opened 1 year ago

rajeswari-kadavakallu commented 1 year ago

Hi,

Could you please provide a compatible MuleSoft SonarQube plugin which is compatible with the SonarQube version 9.9 LTS

cmxconsulting commented 1 year ago

Hello, what's your issue ? Maybe I've the same one. Thanks

Greenipple commented 1 year ago

Hello. Did you copy rules-3.xml and rules-4.xml into the plgugins folder? Sonarqube won't start without them.

cmxconsulting commented 1 year ago

Hello, Indeed, currently xml files must be copied in the plugins folder, it's a clue. However, the question is, do you use the released jar or do you try to deploy your own plugin version using maven ? In that case there is a problem because the plugin is not well packaged.

To solve the packaging issue (and reduce the huge amount of logs by decreasing the log level), I've made a pull request : https://github.com/mulesoft-catalyst/mule-sonarqube-plugin/pull/62

For the xml files, I think it's not a good way to copy the files in the plugins folder, the basic rules should be defined inside the plugin. I've made another pullrequest about that: https://github.com/mulesoft-catalyst/mule-sonarqube-plugin/pull/63

Tell me if it's ok with one or both updates.

Greenipple commented 1 year ago

Hello. I am using the newest 1.0.6 plugin version. I had no issue packaging it using the maven command provided in the readme file: mvn clean package sonar-packaging:sonar-plugin -Dlanguage=mule. I used maven 3.6.0. and Java 17. I also did it before with a more recent version of maven (3.9.?).

I never tried the plugin version 1.0.4, but I can assure you I have 1.0.6 working with sonarqube 9.9 LTS with no issues.

cmxconsulting commented 1 year ago

Hello, Oh yes, it's working properly because you override the sonar-packaging. If you specify "sonar-plugin" in the "pom.xml" file instead of "jar" for packaging, it will work with the single "mvn clean package" command. If you do not (just "mvn clean install" or "mvn clean package" it will not work)

The pom.xml should have "sonar-plugin" instead of "jar" as it is indeed a sonar plugin.