Sonar-maven-plugin fails to connect to db using username/password from servers


I use sonar-maven-plugin for analyzing my PL/SQL project (it is Oracle Database procedural language). I have coverage and execution reports and want to send them to Sonar using sonar-maven-plugin. I have to provide db username/password to help scanner retrieve data dictionary information. I decided to keep it in servers block in my settings.xml file. For getting information from servers block I use servers-maven-extension. But unfortunately sonar-maven-plugin fails to connect to DB when I provide username and password in ${servers...} format. See my sonar properties from pom.xml:



I noticed that another plugins that have ${servers...} references in configuration block under plugin section work well. But I didn’t manage to make sonar-maven-plugin to work with ${servers...} references.

I found this article about encrypting passwords for Sonar but I’d rather like to keep it like password tag of server.

Are there any other approaches to keep a db password for Sonar Scanner?


Welcome to the community!

Analysis hasn’t talked directly to the database for years! Also, I don’t understand why you’re writing a pom file to analyze PL/SQL.

Take a look at the docs for Sonar Scanner. They should get you started.


Thanks for reply!

See, I build my project with maven. I build a package with sources, install them using liquibase, run tests and then I want to send my results to Sonar. All those steps are made using maven.

Is my plugin version old? I thought you have to provide sonar.jdbc.url and connection requisites to plugin in order to make it work.

I will check your link, thanks!

Here’s parameters for my language: