improve pom by oldratlee · Pull Request #477 · jboss-javassist/javassist (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
requireJavaVersionenforce the java version to run maven.- I found that compile failed with jdk 8 (and test target is 11).
- Java 21 satisfies
requireJavaVersion 11.
- The bytecode version of binary is controlled by
javac targetoption.
The guarantee that the built binary can be used by java 8 application, is important for foundational libraries(e.g. javassit).
The CI can check this guarantee with some works:
- build/compile with java 21 or 11(e.g.
maven install) - run test(without compile) on multiple java versions(e.g.
mvn surfire:test) - the test cases that can not run by java 8, should be skipped conditionally(by test case/framework config).
I do this(build by java high version and run test by java low versions in CI/GitHub actions) in some projects, e.g. https://github.com/alibaba/transmittable-thread-local/actions/runs/7358077464/job/20030750510#step:7:206
I can try to add this to the CI/GitHub actions of javassist project with honor.