In the Project tool window, right-click your project and select Add Framework Support. In the dialog that opens, select Maven from the options on the left and click OK. IntelliJ IDEA adds a default POM to the project and generates the standard Maven layout in Project tool window.
In the file menu select settings -> plugins. search for maven, select maven, select enable. Restart intellij. Once restarted you will now have the option to start new maven project and maven functionality will be accessible in all your previous projects.
Press Ctrl+Alt+S to open the IDE settings and select Plugins. Find the plugin in the Marketplace and click Install.
For newer versions of IntelliJ, enable the use plugin registry option within the Maven settings as follows:
For IntelliJ 14.0.1, open the preferences---not settings---to find the plugin registry option:
Regardless of version, also invalidate the caches:
When IntelliJ starts again the problem should be vanquished.
Run a Force re-import from the maven tool window. If that does not work, Invalidate your caches (File > Invalidate caches) and restart. Wait for IDEA to re-index the project.
I had this problem for years with the maven-deploy plugin, and the error showed up even though I was not directly including the plugin in my POM. As a work-around I had to force include the plugin with a version into my POMs plugin section just to remove the red-squiggly.
After trying every solution on Stack Overflow, I found the problem: Looking into my .m2/repository/org/apache/maven/plugins/maven-deploy-plugin
directory there was a version 'X.Y' along with '2.8.2' et al. So I deleted the entire maven-deploy-plugin directory, and then re-imported my Maven project.
So it seems the issue is an IntelliJ bug in parsing the repository. I would not not remove the entire repository though, just the plugins that report an error.
None of the other answers worked for me. The solution that worked for me was to download the missing artifact manually via cmd:
mvn dependency:get -DrepoUrl=http://repo.maven.apache.org/maven2/ -Dartifact=ro.isdc.wro4j:wro4j-maven-plugin:1.8.0
After this change need to let know the Idea about new available artifacts. This can be done in "Settings > Maven > Repositories", select there your "Local" and simply click "Update".
Edit: the -DrepoUrl seems to be deprecated. -DremoteRepositories should be used instead. Source: Apache Maven Dependency Plugin – dependency:get.
The red with warnings maven-site-plugin resolved after the build site Lifecycle:
My IntelliJ version is Community 2017.2.4
SOLVED !!!
This is how I fixed the issue...
Tried again one of the answers in the thread which says 'If that does not work, Invalidate your caches (File > Invalidate caches) and restart.' Did that but again no luck.
Tried These options .. Go to Settings --> Maven --> Importing and made sure the following was selected
Import Maven projects automatically
Create IDEA modules for aggregator projects Keep source...
Exclude build dir...
Use Maven output...
Generated souces folders: "detect automatically"
Phase to be...: "process-resources"
Automatically download: "sources" & "documentation"
Use Maven3 to import
project VM options for importer: -Xmx512m
But again no success.
I had the same issue. I added the plugins into my pom.xml dependencies and it works for me.
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<type>maven-plugin</type>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With