maven-plugin-plugin:descriptor goal fails at the and of file
<p>While developing a maven plugin the build prints error:</p>

<pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor (default-descriptor) on project default-method-demo: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor failed: syntax error @[8,1] in file:/full/path/to/project/default-method/src/main/java/org/example/Iface.java -&gt; [Help 1]
</code></pre>

<p>even though that the file <code>Iface.java</code> is compilable.</p>

<p><code>Iface.java</code>:</p>

<pre class="lang-java prettyprint-override"><code>package org.example;

public interface Iface {
    default String getString() {
        return "string";
    }
}
</code></pre>

<p>from <code>pom.xml</code></p>

<pre class="lang-xml prettyprint-override"><code>&lt;packaging&gt;maven-plugin&lt;/packaging&gt;

&lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
            &lt;version&gt;3.3&lt;/version&gt;
            &lt;configuration&gt;
                &lt;source&gt;1.8&lt;/source&gt;
                &lt;target&gt;1.8&lt;/target&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;

&lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
        &lt;artifactId&gt;maven-plugin-api&lt;/artifactId&gt;
        &lt;version&gt;3.0.5&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.apache.maven.plugin-tools&lt;/groupId&gt;
        &lt;artifactId&gt;maven-plugin-annotations&lt;/artifactId&gt;
        &lt;version&gt;3.4&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
    &lt;/dependency&gt;
&lt;/dependencies&gt;
</code></pre>

<p>What causes the problem? How it can be fixed?</p>