bertramdev / asset-pipeline

The core implementation of the asset pipeline for the jvm
193 stars 92 forks source link

Asset Pipeline requires log4j? #315

Closed olavgg closed 4 months ago

olavgg commented 2 years ago

When I try to run a Spring Boot project with Asset Pipeline I get the following error

java.lang.IllegalStateException: Unable to load cache item
    ....
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    at asset.pipeline.springboot.AssetPipelineService.<clinit>(AssetPipelineService.groovy)

It seems like log4j is required, but my project is configured with logback. If I add Log4j 1.x dependency it works fine,

mkobel commented 1 year ago

I usually add log4j-over-slf4j as dependency to resolve this issue:

e.g. implementation 'org.slf4j:log4j-over-slf4j:2.0.4'

davydotcom commented 4 months ago

4.5.1 switched to slf4j in all spots