title: Maven: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile
body: <p>When I try to build my project using <code>mvn clean compile assembly:single docker:build</code> i get the following error:</p>
  <blockquote>
  <p>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project sd2122-tp1: Compilation failure
  [ERROR] An unknown compilation problem occurred</p>
  </blockquote>
  <p>When I try to run it again but using  <code>mvn clean compile assembly:single docker:build -X</code> i get the following:</p>
  <pre><code>[INFO] -------------------------------------------------------------
  [ERROR] An unknown compilation problem occurred
  [INFO] 1 error
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  3.153 s
  [INFO] Finished at: 2022-04-20T14:24:16+01:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project sd2122-tp1: Compilation failure
  [ERROR] An unknown compilation problem occurred
  [ERROR]
  [ERROR] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project sd2122-tp1: Comp
  ilation failure
  An unknown compilation problem occurred
  
      at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:306)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:568)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
  Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
  An unknown compilation problem occurred
  
      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1310)
      at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:198)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:568)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
  [ERROR]
  [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/MojoFailureException
  </code></pre>
  <pre><code>    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;sd2122&lt;/groupId&gt;
      &lt;artifactId&gt;sd2122-tp1&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;authors&gt;57369-57482&lt;/authors&gt;
      &lt;/properties&gt;
      &lt;build&gt;
          &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-enforcer-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;rules&gt;
                          &lt;dependencyConvergence /&gt;
                      &lt;/rules&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.10.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;17&lt;/source&gt;
                      &lt;target&gt;17&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                      &lt;/archive&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;io.fabric8&lt;/groupId&gt;
                  &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.39.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;build-dockerimage&lt;/id&gt;
                          &lt;phase&gt;install&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;build&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
  
                  &lt;configuration&gt;
                      &lt;images&gt;
                          &lt;image&gt;
                              &lt;name&gt;sd2122-tp1-${authors}&lt;/name&gt;
                              &lt;build&gt;
                                  &lt;dockerFile&gt;${project.basedir}/Dockerfile&lt;/dockerFile&gt;
                              &lt;/build&gt;
                          &lt;/image&gt;
                      &lt;/images&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                  &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
                  &lt;version&gt;2.13.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                  &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
                  &lt;version&gt;2.13.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jaxb&lt;/groupId&gt;
                  &lt;artifactId&gt;jaxb-runtime&lt;/artifactId&gt;
                  &lt;version&gt;3.0.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                  &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
                  &lt;version&gt;2.13.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;commons-codec&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
                  &lt;version&gt;1.15&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
                  &lt;artifactId&gt;jaxb-ri&lt;/artifactId&gt;
                  &lt;version&gt;3.0.2&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;jakarta.xml.ws&lt;/groupId&gt;
                  &lt;artifactId&gt;jakarta.xml.ws-api&lt;/artifactId&gt;
                  &lt;version&gt;3.0.1&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;jakarta.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;jakarta.servlet-api&lt;/artifactId&gt;
                  &lt;version&gt;5.0.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
                  &lt;version&gt;3.0.4&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-container-jdk-http&lt;/artifactId&gt;
                  &lt;version&gt;3.0.4&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey.inject&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-hk2&lt;/artifactId&gt;
                  &lt;version&gt;3.0.4&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sun.xml.ws&lt;/groupId&gt;
                  &lt;artifactId&gt;jaxws-rt&lt;/artifactId&gt;
                  &lt;version&gt;3.0.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sun.xml.ws&lt;/groupId&gt;
                  &lt;artifactId&gt;rt&lt;/artifactId&gt;
                  &lt;version&gt;3.0.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sun.org.apache.xml.internal&lt;/groupId&gt;
                  &lt;artifactId&gt;resolver&lt;/artifactId&gt;
                  &lt;version&gt;20050927&lt;/version&gt;
              &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>Java and Maven version:</p>
  <pre><code>Maven home: C:\apache-maven-3.8.5
  Java version: 17.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17.0.2
  Default locale: pt_PT, platform encoding: Cp1252
  OS name: &quot;windows 10&quot;, version: &quot;10.0&quot;, arch: &quot;amd64&quot;, family: &quot;windows&quot;```
  
  The full log output is here: https://www.toptal.com/developers/hastebin/hepisinape.bash
  
  
  </code></pre>