logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

Sort release 2.x POM files

Open ppkarwasz opened this issue 3 years ago • 1 comments

This PR performs two cleanup actions:

  • it moves the <scope> of dependencies from the <dependencyManagement> and adds it wherever the dependencies are used. This has some beneficial effect: e.g. log4j-api had a transitive dependency of javax.inject:javax.inject in the provided scope because of the interaction between maven-core and our <dependencyManagement>. Now the dependency is in the test scope.
  • it uses src/tools/sort-pom.xslt to sort all dependencies and plugins according to: the scope (import > provided > system > compile > runtime > text), the artifact id (except Log4j2 artifacts which come always first) and group id.

Warning: do not merge, until all dependency scope changes are accounted for.

ppkarwasz avatar Sep 16 '22 11:09 ppkarwasz

The difference in the dependency list before and after this change is minimal:

  • the transitive dependency javax.inject was before forced in the provided scope. It is now in the same scope as the artifact that depends on it,
  • there are some version changes in the transitive dependencies due to the order change: guava (test scope) is bumped to 29.0-jre in log4j-core, whereas asm is bumped from 7.0 to 7.2,
  • commons-io, xz and netty-all are not necessarily in the test scope.

ppkarwasz avatar Sep 18 '22 18:09 ppkarwasz