title: NoClassDefFoundError while running a valid jar (compiled with dependencies) despite having commons-httpclient and httpcomponents dependencies on pom
body: <p>I'm trying to automate a simple user act by using selenium webdriver from main method (not under test scope) 
  When running the following code from the complier it works!
  But when running the jar on several cases - facing the following issue 
  (I'm running on Ubuntu, using java 7)  </p>
  
  <p>"Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager" </p>
  
  <p>@Log
  public class MainProgram {</p>
  
  <pre><code>public  WebDriver driver = new FirefoxDriver();
  
  public static void main(String args[]) {
   //   Injector injector = Guice.createInjector(new WebModule());
  
      System.out.println("Browser will soon be opened");
      MainProgram mainProgram = new MainProgram();
      mainProgram.run();
  
  }
  
  public void run(){
  
      driver.get("http://www.google.co.il");
      WebElement lookFor = driver.findElement(By.name("q"));
  
      if(!lookFor.isDisplayed()){
          driver.close();
        log.log(Level.WARNING,"Failed!");
      };
      driver.close();
  
  }
  
  }
  </code></pre>
  
  <p>WebDriver dependencies on pom:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
          &lt;version&gt;2.42.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
          &lt;version&gt;2.42.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-api&lt;/artifactId&gt;
          &lt;version&gt;2.42.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-firefox-driver&lt;/artifactId&gt;
          &lt;version&gt;2.42.2&lt;/version&gt;
      &lt;/dependency&gt;
  
  Case A
  
   when removed -commons-httpclient - received: HttpClientConnectionManager as follows:
  
  &lt;!--
          &lt;dependency&gt;
              &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
              &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;version&gt;4.3.4&lt;/version&gt;
            &lt;!--  &lt;scope&gt;test&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
  
  
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
      at org.openqa.selenium.remote.HttpCommandExecutor.&lt;init&gt;(HttpCommandExecutor.java:99)
      at org.openqa.selenium.remote.HttpCommandExecutor.&lt;init&gt;(HttpCommandExecutor.java:82)
      at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
  
  -------------------------------------------------------------------------------------------------------------------------------------------
  Case B
  
  removed both commons-httpclient + httpcomponents received HttpClientConnectionManager:
  
  &lt;!--        &amp;lt;!&amp;ndash;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
              &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
          &lt;/dependency&gt;&amp;ndash;&amp;gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;version&gt;4.3.4&lt;/version&gt;
            &amp;lt;!&amp;ndash;  &lt;scope&gt;test&lt;/scope&gt;&amp;ndash;&amp;gt;
          &lt;/dependency&gt;--&gt;
  
  
  liron@liron-Latitude-3330:~$ java -jar automatic-tests-4.0-SNAPSHOT-jar-with-dependencies.jar
  Try
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
      at org.openqa.selenium.remote.HttpCommandExecutor.&lt;init&gt;(HttpCommandExecutor.java:99)
      at org.openqa.selenium.remote.HttpCommandExecutor.&lt;init&gt;(HttpCommandExecutor.java:82)
  
  ---------------------------------------------------------------------------------------------------------------------------------------------
  
  Case C
  when both were added to pom - same HttpClientConnectionManager
  
  
  liron@liron-Latitude-3330:~$ java -jar automatic-tests-4.0-SNAPSHOT-jar-with-dependencies.jar
  Browser will soon be opened
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
      at org.openqa.selenium.remote.HttpCommandExecutor.&lt;init&gt;(HttpCommandExecutor.java:99)
      at org.openqa.selenium.remote.HttpCommandExecutor.&lt;init&gt;(HttpCommandExecutor.java:82)
      at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
  
  
  ----------------------------------------------------------------------------------------------------------------------------------------------
  </code></pre>