Skip to content

Add strict option to EnforceBytecodeVersion to not ignore module-info and Multi-Release JAR classes - #205

Merged
slawekjaranowski merged 1 commit into
mojohaus:masterfrom
Mooninaut:strict-bytecode-version
Jun 8, 2022
Merged

slawekjaranowski merged 1 commit into
mojohaus:masterfrom
Mooninaut:strict-bytecode-version

Conversation

@Mooninaut

Copy link
Copy Markdown

I need to deploy a web application to a servlet container that bundles an obsolete version of ASM, which throws an exception when it encounters any Java 9+ class files. Even a harmless module-info.class in a dependency causes the deployment to fail. I would like to use the enforceByteCodeVersion rule to prevent breaking the app, but currently the rule automatically ignores module-info.class and Multi-Release JAR classes.

This PR adds:

  • A strict option to the enforceBytecodeVersion rule that causes the rule to fail when a module-info.class and / or Multi-Release JAR class with a prohibited bytecode version is detected
  • Documentation for the strict option
  • Integration tests for the strict option

@slawekjaranowski

Copy link
Copy Markdown
Member

Please follow Maven code style for xml
https://maven.apache.org/developers/conventions/code.html

@Mooninaut

Copy link
Copy Markdown
Author

Please follow Maven code style for xml https://maven.apache.org/developers/conventions/code.html

Updated. Please note that many of the existing integration test pom.xml files do not follow Maven code style.

@slawekjaranowski

Copy link
Copy Markdown
Member

Updated. Please note that many of the existing integration test pom.xml files do not follow Maven code style.

I know, but new files can be better ... thanks.

last request - please squash to one final commit.

@slawekjaranowski slawekjaranowski self-assigned this Jun 6, 2022
@Mooninaut
Mooninaut force-pushed the strict-bytecode-version branch from e2ade9d to 58cc452 Compare June 7, 2022 17:17
@Mooninaut

Copy link
Copy Markdown
Author

last request - please squash to one final commit.

Done!

@slawekjaranowski
slawekjaranowski merged commit a41a85d into mojohaus:master Jun 8, 2022
@slawekjaranowski

Copy link
Copy Markdown
Member

@Mooninaut thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants