modernizer-maven-plugin icon indicating copy to clipboard operation
modernizer-maven-plugin copied to clipboard

Issues 184 sortpom

Open delanym opened this issue 2 years ago • 4 comments

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.

delanym avatar Apr 13 '23 19:04 delanym

@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.

delanym avatar Apr 13 '23 19:04 delanym

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 avatar Apr 14 '23 04:04 gaul

@gaul Like you said I think the build should be split into two steps:

  1. compile with never JDK (11) targeting old one (6)
  2. 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.

krzyk avatar Apr 14 '23 08:04 krzyk

#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.

gaul avatar Feb 12 '24 12:02 gaul