Dependencycheck: would it be possible to remove "root project" from the Project Name on reports generated by dependency-check-gradle?

Created on 31 Mar 2021  路  2Comments  路  Source: jeremylong/DependencyCheck

We are looking for a for way to remove "root project" words from the Project name in the repports generated by
gradlew dependencyCheckAnalyze using the dependency-check-gradle version 6.1.1
image

It seems to be taken from the rootProject.name property under the _settings.properties_ file, but it's not a part of the value, but of the name's property
rootProject.name = 'annuaire-service'
There is a parameter --project on the CLI version in order to set the project name https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html
but there is no that parameter for the Analyse Task in the Gradle plugin https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html

Would you know a way to do that?

Thanks in advance

question

Most helpful comment

The name on the report comes from gradle's project.getDisplayName(). It appears that gradle itself prepends "root project" to the value.

https://github.com/gradle/gradle/blob/05088baf7cae823744ead64b96e79ff82a41e013/subprojects/core/src/main/java/org/gradle/api/internal/project/DefaultProject.java#L807-L819

All 2 comments

The name on the report comes from gradle's project.getDisplayName(). It appears that gradle itself prepends "root project" to the value.

https://github.com/gradle/gradle/blob/05088baf7cae823744ead64b96e79ff82a41e013/subprojects/core/src/main/java/org/gradle/api/internal/project/DefaultProject.java#L807-L819

Thank you so much Jeremy for this answer it's more than clear 馃憤

Was this page helpful?
0 / 5 - 0 ratings