Sonarqube-scanner cannot scan all maven multi-module code

Hello, I am having problems now. I installed SonarQube7.3 in the company intranet environment, but I can’t upload maven multi-module files (including front-end code separated before and after) when using sonarqube-scanner on local win7. Excuse me. How do I need to solve the problem of uploading together?Snipaste_2018-11-08_14-53-14 Snipaste_2018-11-08_14-53-37

Please add pom.xml files content. I only need nodes parent, artifactId, and modules.

Can you give me some examples? A little confused!

Here is example pom.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""



I would like to see pom.xml files from beacon-batch, beacon-core and beacon-parent.


Can you understand the pictures I have cut? The order of pom.xml is beacon-batch, beacon-core, beaconn-parent. Right, my engineer said that the outermost folder is built by us. So there is no pom.xml at the outermost level.

Yes, I understand the files. If beacon-parent contains


then you can achieve what you want by simply move the beacon-parent pom.xml file to the main directory (this one which contains After that you are able to remove and use mvn sonar:sonar to analyze the project.

Hello, I have set up the method you gave me, but mvn sonar:sonar still reported the error, I will give you the screenshot! Please help me see!mvn_cdm%E9%94%99%E8%AF%AF%E6%88%AA%E5%9B%BE

I see:

Please provide compiled classes of your project with property

Did you execute mvn compile before mvn sonar:sonar?

No, this is the code I pulled directly from gitlab, and then configured according to your method.

You have to build the project before the analysis. Please execute mvn package sonar:sonar and the it should work.

Thanks a lot, it works, but I found that the front-end code was not uploaded (eg .js, .html, .css, .py). Or need to upload via sonar scan? The front end code is beacon-batch


To fix that, you have to add:


in beacon-batch pom.xml file.

1 Like

As long as I join

<sonar.sources> pom.xml, SRC / main </sonar.sources>

It will report a 500 error.
If I don’t add it, I can upload it successfully.%E5%8A%A0%E5%85%A5pom%E6%8A%A5%E9%94%99

You have to check logs on the SonarQube server. They will show you where is the problem.

Thank you, it is useful for the time being.

Thank you, this three pom.xml lines finished my 2 days long search for solution to my problems.

1 Like