jQAssistant / jqassistant

Your Software. Your Structures. Your Rules.
https://jqassistant.org/
GNU General Public License v3.0
198 stars 35 forks source link

jQA fails with message "Cannot read rules. The id of a rule must be unique: default(null)" #228

Closed obfischer closed 9 years ago

obfischer commented 9 years ago

My current project fails with the following error message:

[ERROR] Failed to execute goal com.buschmais.jqassistant.scm:jqassistant-maven-plugin:1.0.0:analyze (analyze) on project uls-component-tests: Cannot read rules. The id of a rule must be unique: default(null) -> [Help 1]

I have two plugins with my custom constraints. All of my constraints in both plugins are added to the default group

<group id="default">
    <includeConstraint refId="user-qa-rules:steckbrief:exists"/>
</group>

<group id="default">
    <includeConstraint refId="user-qa-rules:maven:all-dependencies-must-be-managed"/>
</group>

Adding custom constraints to the default groups works only if you have one plugin which addes it constraints to default. If I add the second plugin jQA fails with the message above.

Actually this is not a serious problem but the error message does not help to detect this misconfiguration or error.

Please improve the given error message or allow adding of constraints to the default group by multiple plugins.

DirkMahler commented 9 years ago

Restrictions on ids of rules have been implemented within #223 - error message will be enhanced to provide usable details to the user.