title: Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
body: <p>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.</p>
  
  <p>build.gradle</p>
  
  <pre><code>group 'test.test'
  version '1.0-SNAPSHOT'
  
  apply plugin: 'java'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.11'
      compile 'org.slf4j:slf4j-api:1.7.20'
      compile 'ch.qos.logback:logback-classic:1.1.7'
  
  }
  
  
  jar {
      manifest {
          attributes 'Main-Class': 'Test'
      }
  }
  </code></pre>
  
  <p>Test.java</p>
  
  <pre><code>import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  public class Test {
      private static final Logger LOGGER = LoggerFactory.getLogger(Test.class);
  
      public static void main(String[] args) {
          LOGGER.info("info");
      }
  }
  </code></pre>
  
  <p>Terminal:</p>
  
  <pre><code>gradle build
  java -jar target/HttpServer-1.0-SNAPSHOT.jar 
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
          at HttpServerHH.Main.&lt;clinit&gt;(Main.java:15)
  Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
          at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
          ... 1 more
  </code></pre>
  
  <p>I tried to use gradle/maven (mvn package) the same problem. Some reasons it cannot find Logger and LoggerFactory in classpath. </p>