title: Classpath entry points to a non-existent location warning when compiling with Maven
body: <p>We recently upgraded from Kotlin 1.1.51 to 1.2.10, cleared all the warnings (we use -Werror to treat warnings as errors), and the project is up and running. We build it from command line using <code>mvn verify</code> without issues, as well as from IntelliJ using <code>Build &gt; Build project</code>.</p>
  
  <p>Then, we decided to upgrade to the latest version (1.2.21), and here is where we are seeing some issues: when compiling the project from command line (<code>mvn verify</code>) a warning shows up causing the compilation to fail:</p>
  
  <blockquote>
    <p>[WARNING] Classpath entry points to a non-existent location: /Users/username/git/projectname/target/classes</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/hu95X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hu95X.png" alt="enter image description here"></a></p>
  
  <p>The interesting thing is that if we do <code>Build &gt; Build Project</code> on IntelliJ, then there is no warning, and the project will compile (and run) without issues. And if we downgrade Kotlin's version to 1.2.10 on the pom file (instead of 1.2.21), it builds successfully again from both command line and IntelliJ Build.</p>
  
  <p>We noticed that when we do Build > Build Project, two directories are created in the target folder: classes and test-classes; while when the command line build fails, there are two different directories: kotlin-ic and maven-status.</p>
  
  <p>I saw questions that seem related (<a href="https://stackoverflow.com/q/44132173/3695983">1</a>, <a href="https://stackoverflow.com/q/47629458/3695983">2</a>, or <a href="https://stackoverflow.com/q/42429289/3695983">3</a>), but their errors/warnings seem specific to certain libraries while in this case it looks like something more general (it's not a particular library that I can add as a dependency as suggested on the answers).</p>
  
  <p>Why is that difference between command line and IntelliJ build? What causes that warning, and how can we fix it?</p>