title: Compilation failure: module not found: org.apache.logging.log4j
body: <p>I have simple application written in Java 11. <code>mvn clean verify</code> (maven 3.6.0) executes with error:  </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project parser: Compilation failure
  [ERROR] ...src/main/java/module-info.java:[2,32] module not found: org.apache.logging.log4j  
  </code></pre>
  
  <p>Dependencies:</p>
  
  <pre><code>&lt;log4j.version&gt;2.11.1&lt;/log4j.version&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
      &lt;version&gt;${log4j.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
      &lt;version&gt;${log4j.version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Module-info.java:  </p>
  
  <pre><code>module abc {
      requires org.apache.logging.log4j;
  }
  </code></pre>
  
  <p>Log4j2 configuration is default and in .xml file. Usage:</p>
  
  <pre><code>import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
  
  private static final Logger logger = LogManager.getLogger(Abc.class); 
  
  logger.info("Boom!");
  </code></pre>
  
  <p>I tried all related questions on stackoverflow with no success.</p>