GeezerVison is showing github.com — Add enforceBytecodeVersion rule based on mojohaus by cstamas · Pull Request #968 · apache/maven-enforcer
Conversation
cstamas
commented
Mar 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This rule is very often used, and does not require anything special like new dependency, hence it should be among "built in" rules.
OTOH, it had issues, for example on larger multi projects did recheck same (potentially huge) JAR over and over again. It is now altered to not repeat same check (same options against same file) within same session.
This rule is 100% drop-in replacement for old uses (ITs are unmodified and just copied over), moreover rule itself has set priority that if enforce plugin gets updated with this rule, but the extra rules are present, the new rule will kick in. All the options are same as before, and rule name is unchanged as well.
Where it differs, and is reflected in ITs: is not so chatty as mojohaus one, it does not tell "skipped due scope", "skipped due regexp" etc, hence ITs are modified to simply assert for presence or absence of "[DEBUG] Analyzing GAV..." string instead.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This rule is very often used, and does not require anything special
like new dependency, hence it should be among "built in" rules.
OTOH, it had issues, for example on larger multi projects did
recheck same (potentinally huge) JAR over and over again.
It is now altered to not repeat same check (same options
against same file).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Applied PR comments and added new option processOncePerSession (by def true), that if configured to false this rule will behave as before, to be able to disable optimization if it comes in way for any reason.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
We also need to add a documentation.
I don't know why one test fail on Jenkins ...
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
As it is a modified version not directly copied from mojohaus, maybe we can change tile of change to something like:
Add enforceBytecodeVersion rule based on mojohaus
To avoid questions about IP rights 😄
|
cstamas reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
cstamas
changed the title
Moved rule from mojohaus: enforceBytecodeVersion
Add enforceBytecodeVersion rule based on mojohaus
Mar 25, 2026
|
|
<!-- the same as in Maven -->
|
|
|
<!-- all the same as in Maven -->
|
|
|
<resolver.version>1.9.25</resolver.version>
|
|
|
<version.plexus-utils>3.6.0</version.plexus-utils>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.6.1 or 4.0.3 due to CVE
it is also in parent
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|