Sonar maven plugin reads SONAR_TOKEN but not SONAR_HOST_URL

I noticed that my sonar maven plugin, version 3.4.0.905, can successfully read SONAR_TOKEN from environment variable defined in the gitlab ci/cd variable but cannot successfully
read SONAR_HOST_URL, instead I would need to set the following in the pom.xml and then it would work fine.

            <properties>
                <sonar.host.url>https://sonar.dev.my-company.net/sonar</sonar.host.url>
            </properties>

is it expected?

Hi,

Welcome to the community!

The current version of SonarScanner for Maven is 5.0. Version 3.4 is very old at this point, and a lot has happened since then.

That said, SONAR_TOKEN is explicitly supported for Maven analysis, but using environment variables isn’t generally intended for this scenario. Can you share why you want to do that?

 
Thx,
Ann