Colon cannot be used in projectKey

According to official documentation colon can be used in sonar.projectKey, by default for maven project <groupId>:<artifactId> is used as sonar.projectKey. However colon is not accepted when defining projectKey in Administration → Update Key:

Is there any way I can use colon? I have many projects already configured to use groupId:artifactId as projectKey and want to keep this convention.

I have the same issue. using a semicolon in a project key was never a problem before. But I cannot use it anymore for new projects :frowning:

As it was blocker for me as a temporary solution I’ve used maven property to override the default value:

<properties>
    <sonar.projectKey>my.group.my.artifact</sonar.projectKey>
</properties>

This is a huge breaking change! We have setup a lot of policies and rules that match a “namespace” in the project key that is delimited with a :. Can someone clarify if this is a temporary mistake?

big breaking change , our team have an standardize cicd pipeline with standard project key name in the form of : $(project-name)-${groupId}:${artifact id} , this change is breaking all the scanning analysis , any thoughts why is not accepted “:”?

Linking this issue:

1 Like

Hello,

Thank you for the feedback. We decided to revert this change for now, so : is again allowed to be used when creating/updating the project key.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.