Add strict option to EnforceBytecodeVersion to not ignore module-info and Multi-Release JAR classes by Mooninaut · Pull Request #205 · mojohaus/extra-enforcer-rules (original) (raw)

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: