Michael Blow created LOG4J2-3675:
------------------------------------
Summary: org.springframework:spring-test promoted to non-test
dependency
Key: LOG4J2-3675
URL: https://issues.apache.org/jira/browse/LOG4J2-3675
Project: Log4j 2
Issue Type: Bug
Components: Build
Affects Versions: 2.21.0
Reporter: Michael Blow
[This
commit|https://github.com/apache/logging-log4j2/commit/bf2acb54c8d81eced7948818c934d2e88e604676]
changed the scope of the org.springframework:spring-test dependency from
{{test}} to the default ({{compile}}) scope, in several modules (e.g.
[log4j-web/pom.xml|https://github.com/apache/logging-log4j2/commit/bf2acb54c8d81eced7948818c934d2e88e604676#diff-a8531e2b6952e1702ee60e95cf56a42546b27d3b18bbbbd5b3cb3a3345f81856L89]).
Assuming this was not intentional, it should be fixed to no longer pull test
dependencies in at runtime.
e.g.
{noformat}
$ mvn -f log4j-web-2.21.1.pom dependency:tree -Dscope=runtime
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< org.apache.logging.log4j:log4j-web >-----------------
[INFO] Building Apache Log4j Web 2.21.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.6.0:tree (default-cli) @ log4j-web ---
[INFO] org.apache.logging.log4j:log4j-web:jar:2.21.1
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.21.1:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.21.1:compile
[INFO] \- org.springframework:spring-test:jar:5.3.29:compile
[INFO] \- org.springframework:spring-core:jar:5.3.29:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.246 s
[INFO] Finished at: 2023-10-24T20:13:08-04:00
[INFO] ------------------------------------------------------------------------
{noformat}
Note, I encountered this in the 2.21.1 release, but that doesn't exist in Jira
so I selected 2.21.0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)