title: NoClassDefFoundError at Runtime with Gradle
body: <p>I'm using gradle as the JavaFX plugin.
  Everything works perfectly even after building and runnig the excecutable at <em>distribution/</em>, except with one class: <code>CloseableHttpClient</code></p>
  
  <p>For several purposes I create the following object like this:</p>
  
  <pre><code>CloseableHttpClient client = HttpClients.createDefault();
  </code></pre>
  
  <p>Running the program in the IDE is no problem, everything works fine. But if I build and try to run the .exe-File I get the following <code>Throwable</code>-StackTrace:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
      at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:955)
      at org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:58)
      at ch.itcb.tools.lom.util.JsonSimpleUtil.http(JsonSimpleUtil.java:29)...
  </code></pre>
  
  <p>I really don't understand that. How can it be that just this class doesn't get found, but all my other classes do? </p>
  
  <p>My build.gradle file:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'eclipse'
  apply from: 'javafx.plugin'
  
  sourceCompatibility = 1.8
  version = '0.1'
  
  jar {
      manifest {
          attributes 'Implementation-Title': 'LogoffManager',
                     'Implementation-Version': version
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile fileTree(dir: 'lib', include: ['*.jar'])
  
      compile 'ch.qos.logback:logback-classic:1.1.3'
  
      compile 'org.apache.httpcomponents:httpclient:4.5.1'
  
      compile 'com.googlecode.json-simple:json-simple:1.1'
  
  
  
      compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
      testCompile group: 'junit', name: 'junit', version: '4.+'
  }
  
  test {
      systemProperties 'property': 'value'
  }
  
  uploadArchives {
      repositories {
         flatDir {
             dirs 'repos'
         }
      }
  }
  </code></pre>
  
  <p>Please write a comment if you need more information. Thx.</p>