[MNG-5515] Allow scope validator to be configurable
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Scott Hamilton](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=scotthamilton77)** opened **[MNG-5515](https://issues.apache.org/jira/browse/MNG-5515?redirect=false)** and commented
For projects using flex mojos, those flex mojos use non-standard scopes (e.g. internal, external, rsl, cached, etc.). This throws warnings into the build output, which if one's goal is to keep the build clean, is a problem.
In the DefaultModelValidator class there is even this comment:
/*
* TODO: Extensions like Flex Mojos use custom scopes like "merged", "internal", "external", etc.
* In order to don't break backward-compat with those, only warn but don't error out.
*/
This enhancement is to allow a configuration setting to either skip or configure the allowable scopes to preclude these warnings. Ideally this could be fixed in a better way (perhaps through a project extension plugin) but this was the least intrusive way I saw to get this to work.
See the attached patch file where I allow two different system/user settings. "skipScopeValidation" can be set to skip validation of the scopes entirely, or "additionalScopes" can be set to a comma-delimited list of additional scopes that will pass validation.
---
**Affects:** 3.1.0, 3.2.x
**Attachments:**
- [mvn3-DefaultModelValidator-scopeValidator.patch](https://issues.apache.org/jira/secure/attachment/12713187/mvn3-DefaultModelValidator-scopeValidator.patch) (_2.97 kB_)
Contributor guide
Assessment
This issue has not been assessed yet.