Problem with slf4j-api-2.0.7.jar

I am testing incorporating LangChain4J libraries into a Cuba project. But when I included the libraries, it will added slf4j-api-2.0.7.jar into the tomcat shared lib directory and also removed the slf4j-api-1.7.32.jar. Now the core module will not start.

Is there a way I can make Cuba use slf4j-api-2.0.7.jar library ?
Or force the deployment to not use slf4j-api-2.0.7 version and fallback to 1.7.32 ?

CK

Hi,

Did you try excluding the slf4j transitive dependency from the LangChain4J? You can find an example in this topic.

Thanks but it didn’t solve the problem. In the Tomcat shared lib folder, there still ONLY the slf4j-api-2.0.9.jar file and so it won’t boot up Cuba. Currently, I created a task to copy the additional slf4j jar file into the shared lib and added this task to the deploy task.

task deploySlf4j(type: Copy) {
    from file('lib')
    include "slf4j-api-1.7.32.jar"
    into "$cuba.tomcat.dir/shared/lib"
}

Is there a better way to configure gradle to either include all slf4j jars into the shared folder ?