Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

前端 未结 3 900
死守一世寂寞
死守一世寂寞 2020-12-19 18:13

some problems with java and slf4j Made project using idea and it is ok. But in case I try to make jar with gradle I have some problems.

build.gradle

         


        
3条回答
  •  既然无缘
    2020-12-19 18:41

    JVM cannot find dependencies on classpath because they're not on classpath obviously. By default Gradle and Maven add just your classes to a jar and you have to specify paths to the dependencies manually with the -cp argument. If you want to build a fat jar you can use ShadowJar with Gradle and Shade with Maven.

提交回复
热议问题