title: How to include slf4j-simple in the artifact JAR when build from inside Intellij IDEA
body: <p><strong>Using Intellij IDEA</strong> (version 2017.2.1) I have a Java/Maven project in which I want to include <code>slf4j</code> with the <code>slf4j-binding</code>.</p>
  
  <p><em>I know that StackOverflow as an abundance of questions about <code>slf4j</code> and its missing binding, but most refer to Eclipse. My problem however occurs under Intellij.</em></p>
  
  <p>In the <code>pom.xml</code> I list under <code>&lt;dependencies&gt;</code>:</p>
  
  <pre><code>&lt;dependency&gt;
       &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
       &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
       &lt;version&gt;1.7.25&lt;/version&gt;
   &lt;/dependency&gt;
   &lt;!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple --&gt;
   &lt;dependency&gt;
       &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
       &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
       &lt;version&gt;1.7.25&lt;/version&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>Now when I let Intellij build an artifact JAR and I then run the JAR from the command line I  get the (dreaded) error:</p>
  
  <pre><code>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  </code></pre>
  
  <p>Upon inspection the JARdoes indeed not contain <code>slf4j-simple</code> classes (<code>slf4j</code> classes are present though). How can I fix this and <strong>instruct Intellij</strong> to incorporate slf4j-simple as listed ion the <code>pom.xml</code>?</p>
  
  <p>For completeness, here full project <code>pom.xml</code> Intellij is using:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;au.gov.acic.travelalert&lt;/groupId&gt;
      &lt;artifactId&gt;extract-data&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;dependencies&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.7.25&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
              &lt;version&gt;1.7.25&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils&lt;/artifactId&gt;
              &lt;version&gt;1.9.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-collections4&lt;/artifactId&gt;
              &lt;version&gt;4.1&lt;/version&gt;
          &lt;/dependency&gt;        &lt;dependency&gt;
              &lt;!-- jsoup HTML parser library @ https://jsoup.org/ --&gt;
              &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
              &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
              &lt;version&gt;1.10.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <hr>
  
  <p><em>Final note:</em> At the beginning when I set up the project logging didn't even work <em>inside the IDE</em>, despite the correct entries in the <code>pom.xml</code>. But somehow, after additionally adding (and subsequent removing) of a dependency entry for <code>slf4j-log4j12</code>, the IDE picks the <code>slf4j-simple</code> up, but still does not bundle it when writing out the artefact JAR...</p>