[
https://issues.apache.org/jira/browse/VELOCITY-929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17134761#comment-17134761
]
Thomas Mortagne commented on VELOCITY-929:
------------------------------------------
There is no reason to make the slf4j-api dependency provided. Maven will select
in priority your own slf4j dependency version since Maven selec
> Improper SLF4J dependency
> -------------------------
>
> Key: VELOCITY-929
> URL: https://issues.apache.org/jira/browse/VELOCITY-929
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 2.2
> Reporter: Mantas Gridinas
> Priority: Minor
>
> Currently, velocity-engine-core defines a transitive dependency of
> "slf4j-api" as a compile time dependency, rather than a non-transitive
> compile time dependency as seen by snippet below
> {code:xml}
> <dependency>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-api</artifactId>
> <version>1.7.30</version>
> <scope>compile</scope>
> </dependency>
> {code}
> Instead, the dependency's scope should be provided. This prevents classpath
> races and leaves it up to the user/developer to pull in the necessary slf4j
> API dependency for their project.
> Currently I use the following workaround to exclude the slf4j dependency
> {code:xml}
> <dependency>
> <groupId>org.apache.velocity</groupId>
> <artifactId>velocity-engine-core</artifactId>
> <version>2.2</version>
> <exclusions>
> <exclusion>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-api</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]