Plugin works on mac but not windows

I am using Sonarqube 10.1 (deployed with zip), and my customized plugin which is similar with this plugin: GitHub - donhui/sonar-mybatis: MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files.

I previously developed and tested my plugin on macOS, where it worked seamlessly. However, when I attempted to integrate it into a Windows environment, I noticed that while the scanning process appeared to run correctly (as evidenced by the logging output), the results were not showing up in SonarQube’s scanning output. I have reconfigured everything, but the issue persists. It works on macOS but not on Windows. Do you have any suggestions for troubleshooting and fixing this?


  1. Environment Variables:
    Environment variables and paths have been set consistently and correctly on both Windows and macOS. For example, I have configured JAVA_HOME and PATH appropriately.

  2. SonarQube Logs:
    SonarQube logs show that the build() and addExtension() methods run flawlessly with their respective content. This indicates that the file’s content is scanned with the correct logic and produces the expected output. However, I am unsure where the results went, as the SonarQube output does not display the detected bugs.

  3. Java Version Compatibility:
    I am using the same version of Java (JDK 17) on both platforms, and I have confirmed that this Java version is compatible with my SonarQube version and plugin.

  4. Rebuild and Reinstall:
    To rule out any issues with the build process, I have attempted to rebuild and reinstall my plugin on the Windows platform.

I tried my plugin with Linux, and it works flawlessly, seems like the issue only occurs on Windows environment.


Welcome to the community!

Things that are different about Windows:

  • case-sensitivity in paths
  • path separators

It’s not clear to me how the analysis would work fine, without results showing up in SonarQube. I can only suggest that you add more logging.


Thanks for your reply, Ann. After checking and comparing through the logs of a successful scan with other OS, i noticed that the quality profile was set to Sonar Way rather than my own plugin.

By running the scan again after declaring the default rules to my plugin under Quality Profile, the scan runs flawlessly without issue in Windows too!

Thanks a lot for the reply!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.