I have a new error in my project that is in the pom.xml file. How can I fix it?
The error below shown in IntelliJ idea:
Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found
I have a new error in my project that is in the pom.xml file. How can I fix it?
The error below shown in IntelliJ idea:
Plugin 'org.springframework.boot:spring-boot-maven-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.
Add following code
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${parent.version}</version>
</plugin>
and then click on the icon as shown in screenshot, to load Maven changes in pom.xml file
I had the same problem. This summer Intellij suddenly started throwing this error but build went through. I just had to specify version of plugin and it stopped throwing this error.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.4.RELEASE</version>
</plugin>
${parent.version}
as well, which refers to the same thing. –
Rutger I had the same problem using IntelliJ version 2020.2.4. The solution was to edit the pom.xml file and specify the version of the Spring-Boot Maven plugin, with the following syntax:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.0</version>
</plugin>
This Intelli-J release does not recognize the "RELEASE" keyword after the version number, as suggested in the previous answer.
x.x.x.RELEASE
. –
Binturong ${parent.version}
is deprecated. Please use ${project.parent.version}
instead. –
Ribal What worked for me after long tries is updating the indices of the remote maven repository:
Settings > Build, Execution, Deployment > Build Tools > Maven > Repositories.
Then select the remote repository and then update.
This must work.
This error comes when you are using a milestone or snapshot release. It will be resolved after adding appropriate pluginRepository
elements.
You can read more about it here: https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/#getting-started
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
PS: Above answers worked because they explicitly mentioned a different version, which is not milestone or snapshot. IMO that's not the ideal solution.
If you try to update your IDE. It will fix the issue permanently. As, Apparently there was some bug in the IDE which got fixed in build No: Build #IU-211.7142.45, built on April 30, 2021.
By default my configured snapshot project inherited from the spring-boot-starter-parent and set the parent. I added version number and it now as follows:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
</parent>
As docs suggests: "You should need to specify only the Spring Boot version number on this dependency. If you import additional starters, you can safely omit the version number. " https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/
To add to anyone coming across this problem, I am on WSL and my project was in the linux part of wsl (i.e, outside of the mnt folder). What DID fix the problem for me (after countrless tries to update the remote repository, invalidate caches, mvn clean compile
and other similar things) was the following :
to cut one random dependency from my pom.xml
file, click on the icon shown on Vivek Singh's answer and afterwards repaste that dependency and reclick on the icon.
Hope it helps someone.
After so many unsuccessful tries I just clicked on the Event Log on the bottom right of the IDE then found out that my pom file had become a non managed then chose to Add as a maven project and then the maven window reappeared
Just started type version from scratch and IDE suggested mopversion
© 2022 - 2024 — McMap. All rights reserved.