title: Can't compile/run a java project in IntelliJ
body: <h2>The issue:</h2>
  
  <p>While it was working fine yesterday. Today, I wasn't able to compile my project(spring-boot). I created a demo project to simulate the same issue that happened in my current project.</p>
  
  <p>When I try to run the project using the run button It doesn't want to compile. Note all the errors from the failed compilation. Also, you can see that all dependencies are imported (see <strong>External Libraries</strong>):</p>
  
  <p><a href="https://i.stack.imgur.com/Hsxka.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hsxka.jpg" alt="enter image description here"></a></p>
  
  <p>I know I can run the app by typing <code>mvn spring-boot:run</code> in the terminal. But for some reason, I don't want to do that.</p>
  
  <p>As you can see, this demo is a simple spring-boot project:</p>
  
  <p>pom.xml:</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 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.2.6.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;demox&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;demox&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  
  &lt;properties&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <h2>What I 've tried:</h2>
  
  <p>I've tried countless solutions among them:</p>
  
  <ul>
  <li>Select <strong>Build->Rebuild Project</strong></li>
  <li>Clicking <strong>File>Invalidate caches/ restart</strong></li>
  <li><code>mvn clean</code> -> <strong>Build -> Make Project</strong></li>
  <li><strong>Maven -> Reimport</strong></li>
  <li>Deleted <code>.iml</code> file and re-imported the project</li>
  <li>Checked that there is no excludes in <strong>Preferences | Build, Execution, Deployment | Compiler | Excludes</strong> </li>
  </ul>
  
  <h2>About IntelliJ IDEA:</h2>
  
  <pre><code>IntelliJ IDEA 2019.3.4 (Ultimate Edition)
  Build #IU-193.6911.18, built on March 17, 2020
  Licensed to Hamza Belmellouki
  Subscription is active until October 10, 2020
  For educational use only.
  Runtime version: 11.0.6+8-b520.43 x86_64
  VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  macOS 10.15.3
  GC: ParNew, ConcurrentMarkSweep
  Memory: 1502M
  Cores: 4
  Registry: debugger.click.disable.breakpoints=true, documentation.show.toolbar=true, debugger.watches.in.variables=false, compiler.automake.allow.when.app.running=true, ide.tree.collapse.recursively=false, ide.balloon.shadow.size=0
  Non-Bundled Plugins: AceJump, BrowseWordAtCaret, DBN, GsonFormat, IdeaVIM, Lombook Plugin, MavenRunHelper, com.4lex4.intellij.solarized, com.alayouni.ansiHighlight, com.berzanmikaili.intellij.monokai_pro, com.codota.csp.intellij, com.daylerees.rainglow, com.github.holgerbrandl.pasteimages/, com.github.mturlo.intellij.theme.spacegray, com.github.shiraji.emoji, com.godwin.json.parser, com.intellij.ideolog, com.intellij.jira, com.intellij.plugins.html.instantEditing, com.jetbrains.CyanTheme, com.jetbrains.colorful.toolwindow.icons, com.jetbrains.darkPurpleTheme, com.jetbrains.grayTheme, com.ppolivka.gitlabprojects, com.robohorse.robopojogenerator, com.sburlyaev.terminal.plugin, com.viartemev.requestmapper, com.vincentp.gruvbox-theme, commit-template-idea-plugin, mobi.hsz.idea.gitignore, net.seesharpsoft.intellij.plugins.csv, tanvd.grazi, org.asciidoctor.intellij.asciidoc, org.intellij.scala, org.root.GoogleIt, org.sonarlint.idea, some.awesome
  </code></pre>
  
  <p>I've spent lots of time on this issue. How can I fix it?</p>
  
  <h2>From comments:</h2>
  
  <p>Running <code>mvn clean install -X</code>:</p>
  
  <pre><code>Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T19:41:47+01:00)
  Maven home: /usr/local/Cellar/maven/3.6.0/libexec
  Java version: 1.8.0_192, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre
  Default locale: en_MA, platform encoding: UTF-8
  OS name: "mac os x", version: "10.15.3", arch: "x86_64", family: "mac"
  [DEBUG] Created new class realm maven.api
  [DEBUG] Importing foreign packages into class realm maven.api
  [DEBUG]   Imported: javax.annotation.* &lt; plexus.core
  [DEBUG]   Imported: javax.annotation.security.* &lt; plexus.core
  [DEBUG]   Imported: javax.enterprise.inject.* &lt; plexus.core
  [DEBUG]   Imported: javax.enterprise.util.* &lt; plexus.core
  [DEBUG]   Imported: javax.inject.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.artifact &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.classrealm &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.cli &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.configuration &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.exception &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.execution &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.execution.scope &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.lifecycle &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.model &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.monitor &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.plugin &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.profiles &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.project &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.reporting &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.rtinfo &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.settings &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.toolchain &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.usability &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.authentication &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.authorization &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.events &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.observers &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.proxy &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.resource &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.classworlds &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.* &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.classworlds &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.component &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.configuration &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.container &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.context &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.lifecycle &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.logging &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.personality &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.* &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.artifact &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.collection &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.deployment &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.graph &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.impl &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.installation &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.internal.impl &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.metadata &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.repository &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.resolution &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.spi &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.transfer &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.version &lt; plexus.core
  [DEBUG]   Imported: org.fusesource.jansi.* &lt; plexus.core
  [DEBUG]   Imported: org.slf4j.* &lt; plexus.core
  [DEBUG]   Imported: org.slf4j.helpers.* &lt; plexus.core
  [DEBUG]   Imported: org.slf4j.spi.* &lt; plexus.core
  [DEBUG] Populating class realm maven.api
  [INFO] Error stacktraces are turned on.
  [DEBUG] Message scheme: color
  [DEBUG] Message styles: debug info warning error success failure strong mojo project
  [DEBUG] Reading global settings from /usr/local/Cellar/maven/3.6.0/libexec/conf/settings.xml
  [DEBUG] Reading user settings from /Users/hamzabelmellouki/.m2/settings.xml
  [DEBUG] Reading global toolchains from /usr/local/Cellar/maven/3.6.0/libexec/conf/toolchains.xml
  [DEBUG] Reading user toolchains from /Users/hamzabelmellouki/.m2/toolchains.xml
  [DEBUG] Using local repository at /Users/hamzabelmellouki/.m2/repository
  [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/hamzabelmellouki/.m2/repository
  [INFO] Scanning for projects...
  [DEBUG] Using mirror central (https://nexus.sdf.x-hub.io/repository/maven-public/) for maven-releases (https://nexus.sdf.x-hub.io/repository/maven-releases).
  [DEBUG] Using mirror central (https://nexus.sdf.x-hub.io/repository/maven-public/) for maven-snapshots (https://nexus.sdf.x-hub.io/repository/maven-snapshots).
  [DEBUG] Using mirror central (https://nexus.sdf.x-hub.io/repository/maven-public/) for central (http://central).
  [DEBUG] Extension realms for project com.example:demox:jar:0.0.1-SNAPSHOT: (none)
  [DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
  [DEBUG] Using mirror central (https://nexus.sdf.x-hub.io/repository/maven-public/) for sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots).
  [DEBUG] Using mirror central (https://nexus.sdf.x-hub.io/repository/maven-public/) for central (https://repo.maven.apache.org/maven2).
  [DEBUG] Using mirror central (https://nexus.sdf.x-hub.io/repository/maven-public/) for apache.snapshots (https://repository.apache.org/snapshots).
  [DEBUG] Extension realms for project org.springframework.boot:spring-boot-starter-parent:pom:2.2.6.RELEASE: (none)
  [DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
  [DEBUG] Extension realms for project org.springframework.boot:spring-boot-dependencies:pom:2.2.6.RELEASE: (none)
  [DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
  [DEBUG] === REACTOR BUILD PLAN ================================================
  [DEBUG] Project: com.example:demox:jar:0.0.1-SNAPSHOT
  [DEBUG] Tasks:   [clean, install]
  [DEBUG] Style:   Regular
  [DEBUG] =======================================================================
  </code></pre>