Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarqube 7.6 support #81

Closed
pethers opened this issue Jan 30, 2019 · 26 comments
Closed

Sonarqube 7.6 support #81

pethers opened this issue Jan 30, 2019 · 26 comments
Assignees
Labels
Milestone

Comments

@pethers
Copy link

pethers commented Jan 30, 2019

org.sonar.api.profiles.RulesProfile has been removed.

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project cia-all: org.sonar.plugins.pmd.PmdSensor has unsatisfied dependency 'class org.sonar.api.profiles.RulesProfile' for constructor 'public org.sonar.plugins.pmd.PmdSensor(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.pmd.PmdExecutor,org.sonar.plugins.pmd.PmdViolationRecorder,org.sonar.api.batch.fs.FileSystem)' from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@634d56eb:57<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@790f4933:379<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@6f6998b6:47<| ->

@vladonemo
Copy link

Just faced the same. The only possible workaround is to uninstall PMD plugin from SonarQube.

@ediri
Copy link

ediri commented Feb 3, 2019

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project backend-example: org.sonar.plugins.pmd.PmdSensor has unsatisfied dependency 'class org.sonar.api.profiles.RulesProfile' for constructor 'public org.sonar.plugins.pmd.PmdSensor(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.pmd.PmdExecutor,org.sonar.plugins.pmd.PmdViolationRecorder,org.sonar.api.batch.fs.FileSystem)' from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@44d7e24:132<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@1f1ff879:524<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@6736f40f:65<| -> [Help 1]

We had the same issue with findbugs. And the team there fixed it, quite quick, as it was a small change in in the code.

Follow spotbugs/sonar-findbugs#244 for more details

Hope it helps you. For the moment Sonarqube 7.6 is dead as we need the PMD Plugin...

@ediri
Copy link

ediri commented Feb 6, 2019

Hi,

are threre any plans für updating the plugin?

@aepfli
Copy link

aepfli commented Feb 7, 2019

+1

2 similar comments
@smiro21
Copy link

smiro21 commented Feb 8, 2019

+1

@CelesteGH
Copy link

+1

@jensgerdes
Copy link
Collaborator

Hi @pethers

Thank you for the issue. I can confirm the reported problem and will check on that as soon as possible.
Unfortunately, my free time is very limited at the moment - which means if this is a bigger change, I won't be able to fix this within the next days.

Pull requests are welcome.

@jensgerdes jensgerdes self-assigned this Feb 11, 2019
@jensgerdes jensgerdes added the bug label Feb 11, 2019
@jensgerdes
Copy link
Collaborator

The problem seems to be that RulesProfile has been removed from ScannerSide, remaining in ServerSide scope. At compile time everything is fine because the class is still there. However, at runtime, components running in ScannerSide scope can not use it anymore.

See: https://community.sonarsource.com/t/unsatisfied-dependency-in-sq-7-6/6244/4

The problem here is that Sonar-PMD does not clearly separate ServerSide from ScannerSide components. We'll have to separate both from each other so that ServerSide components keep using RulesProfile whereas ScannerSide components switch to ActiveRules.

@Vampire
Copy link

Vampire commented Feb 11, 2019

Besides the findbugs fix that was linked above, you can also have a look at checkstyle/sonar-checkstyle#193, as the checkstyle plugin also suffers from the same issue.

@jensgerdes
Copy link
Collaborator

I have fixed the problem. However, I won't create a release until I have thoroughly tested my changes.
Feel free to check if this fixes your problems:
https://github.com/jensgerdes/sonar-pmd/releases/tag/3.2.0-beta

@jensgerdes jensgerdes added this to the 3.2.0 milestone Feb 13, 2019
@pethers
Copy link
Author

pethers commented Feb 13, 2019

@jensgerdes thanks for the fix, will test it later tonight.

@pethers
Copy link
Author

pethers commented Feb 13, 2019

Have run the latest snapshot build on http://192.168.1.15:9000/sonar/dashboard?id=com.hack23.cia%3Acia-all , build passes so happy with the result :)

@ediri
Copy link

ediri commented Mar 4, 2019

any ideas, when the plugin will be avail. in the marketplace?

@aepfli
Copy link

aepfli commented Mar 4, 2019

sidenote: we also have the latest snapshot running on our live and test instances for over a week now, without any issues.

@jensgerdes
Copy link
Collaborator

Fair question. I will try to release it within this week.

@ediri
Copy link

ediri commented Mar 11, 2019

@jensgerdes : appreciating your great work for the sonar community, but did you had the time to release the plugin? Thx

@ceastman-ibm
Copy link

@jensgerdes just checking on the release of this fix? We are trying to install sonarqube 7.6 but are currently blocked by this.

@agabrys
Copy link

agabrys commented Mar 21, 2019

3.2.0-SNAPSHOT version works correctly on SonarQube Community Edition 7.7 👍

@patsevanton
Copy link

Снимок экрана от 2019-03-30 20-30-53

Снимок экрана от 2019-03-30 20-31-03

@jensgerdes
Copy link
Collaborator

Oops... yes, you are right. I'll fix the description

@jensgerdes
Copy link
Collaborator

I have requested the release of Sonar-PMD 3.2.0 in the market place.
Sorry for the delay. I've just built a house and had not much time to take care of this project...

@mellebie
Copy link

mellebie commented Apr 22, 2019

@jensgerdes Has this been made available in marketplace yet? Facing same issue (RulesProfile) as others from past, when using Sonarqube 7.6 and pitest

@jensgerdes
Copy link
Collaborator

Has this been made available in marketplace yet? Facing same issue (RulesProfile) as others from past, when using Sonarqube 7.6 and pitest

Hi @mellebie
Yes, the release has been made available. See: https://docs.sonarqube.org/display/PLUG/Plugin+Version+Matrix

If you're still experiencing problems, please file in another issue along with:

  • Sonar-PMD version
  • Stack trace
  • optionally the source code

@mellebie
Copy link

@jensgerdes , apologies for my ignorance. Unless I am missing something, from link provided I do not see anything to download. Where exactly should I be going, and what steps to install? Again, I apologize.

@mellebie
Copy link

I got it to work. I installed the latest sonar-pmd from sonarqube marketplace, and now the error is resolved

@jensgerdes
Copy link
Collaborator

I got it to work. I installed the latest sonar-pmd from sonarqube marketplace, and now the error is resolved

Excellent. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests