Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven-compiler-plugin:jar:3.8.1 is missing

Tags:

java

maven

Trying to use 3.8.1 instead of 3.8.0 but get the message:

[WARNING] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 is missing, no dependency information available.

My pom.xml works fine with 3.8.0. Except for a specific problem. I am long awaiting 3.8.1. According to Maven Central it seems to be available. But simply changing 3.8.0 to 3.8.1 in my pom.xml led to the warning and the failure message:

Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>11</source>
                <target>11</target>
                <debug>true</debug>
            </configuration>
        </plugin>

What do I have misunderstood, seeing 3.8.1 in Maven Central but cannot use it in my pom.xml?

like image 822
ngong Avatar asked May 17 '19 09:05

ngong


People also ask

How do I fix Maven spring plugin not found?

From the Preferences in Intelli J, navigate to "Build, Execution, Deployment > Build Tools > Maven", check the "Use plugin registry", and click "OK". Then "File > Invalidate Caches / Restart" to reload Intelli J. The error will go away automatically.

Is Maven compiler plugin necessary?

The compiler plugin is used to compile the source code of a Maven project. This plugin has two goals, which are already bound to specific phases of the default lifecycle: compile – compile main source files. testCompile – compile test source files.


1 Answers

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>
like image 60
redCuckoo Avatar answered Oct 08 '22 21:10

redCuckoo