Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm facing an error in my pom.xml file given below:

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

Below is my 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> 

How can I fix this error?

like image 677
Lakma Chehani Avatar asked Nov 02 '20 04:11

Lakma Chehani


People also ask

What is spring boot Maven plugin for?

The Spring Boot Maven Plugin provides Spring Boot support in Apache Maven. It allows you to package executable jar or war archives, run Spring Boot applications, generate build information and start your Spring Boot application prior to running integration tests.

What does org Springframework boot plugin do?

It allows you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by spring-boot-dependencies .

Where can I find the version of the Maven boot plugin?

In Maven library, it is found that the repository\ORG\springframework\boot\spring boot Maven plugin has related plug-ins 2.1.7. Release Supplement the version on pom.xml:

How to clean Maven lifecycle in Spring Boot?

Open the Maven tab present on the right tab and check for spring-boot-maven-plugin. If the plugin was not downloaded, then click on clean maven lifecycle and it delete the folders that were generated by maven.

Why Maven plugin is not downloading?

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.

What is Spring Boot boot?

org.springframework.boot Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that can you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.


2 Answers

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>  
like image 160
Wagner M. D. Büttner Avatar answered Sep 20 '22 15:09

Wagner M. D. Büttner


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

<version>${project.parent.version}</version>
like image 35
Salim Nadji Avatar answered Sep 23 '22 15:09

Salim Nadji