-
Notifications
You must be signed in to change notification settings - Fork 47
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
RequirePropertyDiverges evaluates in own context #282
Comments
Perhaps this should be another issue, but the rule ignores sub-modules that lack the property in question altogether. This is surely a bug. The rule should evaluate the project model, not the file. |
Hello, So your project B would fail only if the "main" pom has no description (the rule is skipped for the defining project), but not for child modules.
I'd happily contribute a PR if someone deems it a worthy addition. |
Please create a PR, you can mention me |
I have 2 projects, a "build configuration" project A, and a multi-module project B.
A includes maven-enforcer-plugin configuration with a rule
B inherits from A, but they are completely separate projects. I always need to rebuild A before seeing the inherited effects in B.
I expect this rule to fail for any module in B without a description tag, or where the description is the same as the parent. I get no failures when I should (and logs show the rule fires for each module in B).
If I move the rule configuration from A to B I get failures.
I suspect the rule is not being "lazy" when it should. It seems to be evaluating in the context of the project it was built, and not the project it is run, if that makes sense.
If someone can confirm this hunch it might lead to a fix, but I don't have time to create a reproducer at this point.
The text was updated successfully, but these errors were encountered: