Cannot resolve plugin org.apache.maven.plugins:
Answered
Hello,
I have IntelliJ 2020.3 and Maven 3.6.3 and java 1.8 jdk.
When trying to build Java project with Maven, I' ve got Cannot resolve plugin org.apache.maven.plugins: for most of Maven plugins (deploy, jar, site).
When I change pom.xml file to following (code below), plugin error gets resolved.
Should I change the maven version to older to get full compatibility and avoiding copying the pom settings to each project?
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Please sign in to leave a comment.
Does previous version (with unresolved plugins) works from command line?
Could you please share version with error too?
I changed to community 2018.3 and Maven 3.6.1 (jdk I left 1.8) and no it's working without issues.
Check mvn -v in terminal. If it won't find it, then install Maven manually through terminal. I did this and it's started working.
In my case, I did not have Maven installed on my MacBook, so I sent it to be installed via the console and the error was eliminated and it worked, thank you for helping me with the error.