maven-compiler-plugin:jar:3.8.1 is missing

Solution 1:

What helped me is surrounding plugins with the following tags:

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>    
        </plugins>
    </pluginManagement>
</build>