title: How to fix "The import org.apache.poi cannot be resolved"
body: <p>I want to make use of Apache-POI in my code, but am getting an error message <code>The import org.apache.poi cannot be resolved</code> at the import statement
  <code>import org.apache.poi.xssf.usermodel.XSSFWorkbook;</code></p>
  
  <p>I am a beginner with a freshly set up Visual Studio Code v1.30.2, Maven 3.6.0, Java JRE 1.8.0_201.</p>
  
  <p>I have activated the following extensions:
  Debugger for Java, 0.16.0
  Java dependency viewer, 0.3.0
  Java extension pack, 0.5.0
  Java test runner, 0.14.0
  Language support for Java (TM), 0.37.0
  Maven for Java, 0.14.0</p>
  
  <p>I entered these statements in the pom.xml in the dependency section:</p>
  
  <pre><code>&lt;!-- https://mvnrepository.com/artifact/org.apache.poi/poi--&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
      &lt;artifactId&gt;poi&lt;/artifactId&gt;
      &lt;version&gt;4.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
      &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
      &lt;version&gt;4.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I've also tried with other POI versions, e.g. 3.10-FINAL.</p>
  
  <p>I'm too new to Java, Maven and VSCode to be sure I've included all the necessary information to point to a solution. Please help me :)</p>
  
  <p>I've run <code>mvn compile</code>, with this result:</p>
  
  <pre><code>C:\Users\MYUSERNAME\Documents\Java\project2&gt;mvn compile
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ---------------------&lt; MYNAME.project2:project2 &gt;---------------------
  [INFO] Building project2 1.0-SNAPSHOT
  [INFO] --------------------------------[ jar ]---------------------------------
  [INFO]
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ project2 ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory C:\Users\MYUSERNAME\Documents\Java\project2\src\main\resources
  [INFO]
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ project2 ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 1 source file to C:\Users\MYUSERNAME\Documents\Java\project2\target\classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR :
  [INFO] -------------------------------------------------------------
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[12,1] package org.apache.poi.ss.usermodel does not exist
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[13,37] package org.apache.poi.xssf.usermodel does not exist
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[14,37] package org.apache.poi.xssf.usermodel does not exist
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,9] cannot find symbol
    symbol:   class XSSFWorkbook
    location: class MYNAME.project2.App
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,45] cannot find symbol
    symbol:   class XSSFWorkbook
    location: class MYNAME.project2.App
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[48,9] cannot find symbol
    symbol:   class XSSFSheet
    location: class MYNAME.project2.App
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[55,13] cannot find symbol
    symbol:   method setCellValue(java.lang.String)
    location: variable cell of type com.google.common.collect.Table.Cell
  [INFO] 7 errors
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  5.549 s
  [INFO] Finished at: 2019-01-30T09:41:45+01:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project project2: Compilation failure: Compilation failure:
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[12,1] package org.apache.poi.ss.usermodel does not exist
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[13,37] package org.apache.poi.xssf.usermodel does not exist
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[14,37] package org.apache.poi.xssf.usermodel does not exist
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,9] cannot find symbol
  [ERROR]   symbol:   class XSSFWorkbook
  [ERROR]   location: class MYNAME.project2.App
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,45] cannot find symbol
  [ERROR]   symbol:   class XSSFWorkbook
  [ERROR]   location: class MYNAME.project2.App
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[48,9] cannot find symbol
  [ERROR]   symbol:   class XSSFSheet
  [ERROR]   location: class MYNAME.project2.App
  [ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[55,13] cannot find symbol
  [ERROR]   symbol:   method setCellValue(java.lang.String)
  [ERROR]   location: variable cell of type com.google.common.collect.Table.Cell
  [ERROR] -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/
  </code></pre>
  
  <p>I've also pasted the full output of <code>mvn -X compile</code> <a href="https://pastebin.com/GWpk3pDz" rel="noreferrer">here</a></p>
  
  <p>I've pasted my full <code>POM.XML</code> <a href="https://pastebin.com/k3N4XPYq" rel="noreferrer">here</a></p>
  
  <p>In my local folder C:\Users\MYUSERNAME.m2\repository\org\apache there is <strong>no subfolder</strong> poi.</p>