title: Adding a .jar file to classpath through maven
body: <p>I'm having some trouble in getting maven to download a number of .jar files my application depends on. The code in which these dependencies are needed is bellow:</p>
  
  <pre><code>import com.fasterxml.jackson.databind.DeserializationFeature;
  import com.fasterxml.jackson.databind.ObjectMapper;
  import com.fasterxml.jackson.databind.ObjectReader;
  import com.fasterxml.jackson.databind.ObjectWriter;
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;
  
  public class ServerConfiguration {
      public String info = null;
      public String idlURL = null;
      public String idlContents = null;
      public List&lt;ServerInfo&gt; servers = new ArrayList&lt;&gt;();
  
      public final void clear() {
          info = null;
          idlURL = null;
          idlContents = null;
          if (servers != null)
              servers.clear();
      }
  
      private final static ObjectReader jsonReader;
      private final static ObjectWriter jsonWriter;
  
      static {
          ObjectMapper mapper = new ObjectMapper();
          mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); // &lt;== Error:(52, 15) java: cannot access com.fasterxml.jackson.core.JsonGenerator class file for com.fasterxml.jackson.core.JsonGenerator not found
          //mapper.configure(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED, true);
          jsonWriter = mapper.writer();
          jsonReader = mapper.reader(ServerConfiguration.class);
      }
  
      public static ServerConfiguration fromJson(String json) throws IOException {
          return jsonReader.&lt;ServerConfiguration&gt;readValue(json); // &lt;== Error:(59, 26) java: cannot access com.fasterxml.jackson.core.JsonProcessingException class file for com.fasterxml.jackson.core.JsonProcessingException not found
      }
  
      public String toJson() throws IOException {
          return jsonWriter.writeValueAsString(this);
      }
  
  }
  </code></pre>
  
  <p>After reading <a href="https://stackoverflow.com/questions/25413842/the-type-com-fasterxml-jackson-core-jsongenerator-cannot-be-resolved-it-is-indi">this</a> question, I tried adding the mentioned packages(<strong>jackson-databind</strong>, <strong>jackson-core</strong>) to <strong>pom.xml</strong>:</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
          &lt;artifactId&gt;guava&lt;/artifactId&gt;
          &lt;version&gt;17.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.netty&lt;/groupId&gt;
          &lt;artifactId&gt;netty-all&lt;/artifactId&gt;
          &lt;version&gt;4.0.21.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;2.3.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
          &lt;version&gt;2.3.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-jdk14&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.10&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.antlr&lt;/groupId&gt;
          &lt;artifactId&gt;antlr4-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;4.2.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>How can I add the respective dependencies?</p>
  
  <p><strong>Edit #1:</strong></p>
  
  <p>The errors given are bellow(the lines where they occur are marked in the code above):</p>
  
  <pre><code>Error:(52, 15) java: cannot access com.fasterxml.jackson.core.JsonGenerator
    class file for com.fasterxml.jackson.core.JsonGenerator not found
  Error:(54, 28) java: cannot access com.fasterxml.jackson.core.ObjectCodec
    class file for com.fasterxml.jackson.core.ObjectCodec not found
  Error:(55, 28) java: cannot access com.fasterxml.jackson.core.Base64Variant
    class file for com.fasterxml.jackson.core.Base64Variant not found
  Error:(59, 26) java: cannot access com.fasterxml.jackson.core.JsonProcessingException
    class file for com.fasterxml.jackson.core.JsonProcessingException not found
  Error:(63, 26) java: cannot access com.fasterxml.jackson.core.Versioned
    class file for com.fasterxml.jackson.core.Versioned not found
  </code></pre>
  
  <p><strong>Edit #2:</strong></p>
  
  <p>I can't seem to add the dependencies:</p>
  
  <p><img src="https://i.stack.imgur.com/MQXAG.png" alt="dependencies"></p>