简体   繁体   中英

How to activate Java Properties Plugin during the Maven JAR project analysis?

I have a few Maven projects with packaging equal to JAR (example: EasyBundle ). Unfortunately I cannot see Java Properties Plugin Quality Profile at project dashboard after analysis:

EasyBundle仪表板

My project contains *.properties files in src/test/resources (see sources ). How can I activate Java Properties Plugin during the Maven JAR project analysis?

By default the SonarQube Maven plugin will only index what Maven consider as source folders (ie src/main/java and src/test/java for a JAR project).

If you want to have files in src/test/resources indexed you have to override default configuration either on command line or in your pom.xml .

Try: mvn sonar:sonar -Dsonar.tests=src/test

Or add:

<properties>
  <sonar.tests>src/test</sonar.tests>
</properties>

in your pom.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM