Plugin ‘org.springframework.boot:spring-boot-maven-plugin:’ not found

We Are Going To Discuss About Plugin ‘org.springframework.boot:spring-boot-maven-plugin:’ not found. So lets Start this Java Article.

Plugin ‘org.springframework.boot:spring-boot-maven-plugin:’ not found

  1. Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found

    I fixed the problem adding the version of the plugin in the pom.xml, which is the same of spring boot's version.
    So you just have to configure your pom like this:
    <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${project.parent.version}</version>

  2. 'org.springframework.boot:spring-boot-maven-plugin:'

    I fixed the problem adding the version of the plugin in the pom.xml, which is the same of spring boot's version.
    So you just have to configure your pom like this:
    <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${project.parent.version}</version>

Solution 1

I fixed the problem adding the version of the plugin in the pom.xml, which is the same of spring boot’s version.

So you just have to configure your pom like this:

<groupId>org.springframework.boot</groupId> 
<artifactId>spring-boot-maven-plugin</artifactId> 
<version>${project.parent.version}</version> 

Original Author Of This Content

Solution 2

i fixed the problem adding a version of the plugin in the pom.xml

<version>${project.parent.version}</version>

Original Author Of This Content

Solution 3

The pom.xml is correct. It seems that there is a network issue. The plugin was not downloaded due to that.

Steps to solve the issue :

  • Check for network issue. You need to have a strong internet connection to download all the dependencies and plugins using maven. Otherwise, you will face issue to build maven project for sure.

  • For eclipse/STS :

    1. Right click on the project >> Run As >> Maven clean (this will clean the project by deleting the target folder).

      Example :

enter image description here

  1. Right click on the project >> Run As >> Maven install (this will download all dependencies and generate target folder).

Example :

enter image description here

  1. If problem still persists, then last option is to force refresh of the project. Right click on the project >> Maven >> Update Project.

enter image description here

  1. Update Maven Project Window will be come.

enter image description here

Note: Enable the option Force update of Snapshot/Releases (look in above screenshot). By default, this option is not enabled. Click on ok. It will start updating.


  • For Intellij IDE :
  1. Open the Maven tab present on the right tab and check for spring-boot-maven-plugin.

enter image description here

  1. If the plugin was not downloaded, then click on clean maven lifecycle and it delete the folders that were generated by maven.

enter image description here

  1. Then, click on install maven lifecycle and it will download all the dependencies and generate all the folders from scratch required for the project.

enter image description here

  1. Last step is to force update of the project. You need to click on the Generate Sources and Update Folders for All Projects option.

enter image description here

Note : Go the Preference -> Build, Execution and Deployment -> Build Tools -> Maven -> Enable “Always update Snapshots” option present -> Click on Apply and Ok. This option helps sometimes.


  • For Without any IDE :
  1. Download maven from here and extract it.

  2. Set maven location on the environment variable so that it can run from anywhere.

  3. Open CMD/Terminal and then do mvn clean install inside the project.


Update for viewers: <version> tag is not mandatory tag to be there for spring-boot projects because pom.xml created by spring for spring-boot can handle the version of the spring-boot-maven-plugin.

Updated pom.xml :

<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>dev.che</groupId>
    <artifactId>stu</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>stu</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Edit :

If above steps are not solving your issue, then you can go for the workaround solution by explicitly providing the parent spring boot version in the plugin for spring-boot-maven-plugin (not a recommended solution):

<plugins>
   <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <version>${parent.version}</version> 
    </plugin>
</plugins>

Original Author Of This Content

Solution 4

This solution worked for me:

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.

I just followed these steps in IntelliJ IDEA:

Click File from menu and then click Invalidate Caches / Restart.

Original Author Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment