Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to adjust enforcer level #96

Closed
pho3nixx opened this issue Jun 26, 2020 · 0 comments · Fixed by #97
Closed

Add ability to adjust enforcer level #96

pho3nixx opened this issue Jun 26, 2020 · 0 comments · Fixed by #97
Milestone

Comments

@pho3nixx
Copy link

The built-in rules of the maven-enforcer-plugin allow setting a level to not break the build (which is default behavior), but only log a warning, if a rule is violated:

As of version 1.4, you may add a level element to the rules. Valid values are WARN and ERROR. When level WARN is specified, the rule will only spit out a warning but will not fail the build.
(from: https://maven.apache.org/enforcer/maven-enforcer-plugin/usage.html)

Unfortunately, this doesn't apply to extra-enforcer-rules. As far as I can see, the built-in rules implement org.apache.maven.enforcer.rule.api.EnforcerRule2 (which adds the level-feature), whereas extra-enforcer-rules implements org.apache.maven.enforcer.rule.api.EnforcerRule.

@mfriedenhagen mfriedenhagen added this to the 1.3 milestone Jun 26, 2020
mfriedenhagen added a commit that referenced this issue Jun 26, 2020
* Only the old EnforcerRule interface was implemented.
* So the extra-rules could not be set to warn only.
* Although the rules API version is now 1.4.1, using
  1.4.1 of the enforcer-plugin is not possible, because
  a lot of ITs are failing, then.

Fixes #96
mfriedenhagen added a commit that referenced this issue Jun 26, 2020
* Only the old EnforcerRule interface was implemented.
* So the extra-rules could not be set to warn only.
* Although the rules API version is now 1.4.1, using
  1.4.1 of the enforcer-plugin is not possible, because
  a lot of ITs are failing, then.

Fixes #96
mfriedenhagen added a commit that referenced this issue Jun 26, 2020
* Only the old EnforcerRule interface was implemented.
* So the extra-rules could not be set to warn only.
* Although the rules API version is now 1.4.1, using
  1.4.1 of the enforcer-plugin is not possible, because
  a lot of ITs are failing, then.

Fixes #96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants