modernizer-maven-plugin
modernizer-maven-plugin copied to clipboard
Issues 184 sortpom
This sortpom-maven-plugin was added to the build.
When the sort happens in the second commit it reorders the javadoc/modulemaker execution order in the annotations module, so I have to pull the javadoc execution back a phase.
@gaul would you consider requiring JDK11, or should I find an older version of the sortpom-maven-plugin? It seems that if someone is using this modernizer plugin they are interested in using more recent releases.
We should separate between the build from the runtime requirements. For the former it is fine to require newer Java versions. For the latter it would be nice to maintain compatibility with as many Java versions as is convenient. Currently maven-compiler-plugin specifies both source and target as 1.6. It appears that JDK 11 supports Java 1.6 and later but JDK 17 only supports Java 1.7 and later and I guess this will get even tighter with newer Java versions. I think it is OK to require JDK 11 when building for now and revisit the runtime requirement later.
@gaul Like you said I think the build should be split into two steps:
- compile with never JDK (11) targeting old one (6)
- Run a matrix of example projects that are compiled with all the LTS versions + the current (so 6, 7, 8, 11, 17, 20).
I could take a look into that and provide PR if you think it makes sens for modernizer.
#235 updated the Java requirement to 1.7 which should make it easier to use modern Java versions. I'm happy to take PRs which change CI to use newer Java but continue to target older Java versions at runtime.