After updating IntelliJ from version 12 to 13, the following Maven-related plugins cannot be resolved:
org.apache.maven.plugins:maven-clean-plugin:2.4.1
org.apache.maven.plugins:maven-deploy-plugin
org.apache.maven.plugins:maven-install-plugin
org.apache.maven.plugins:maven-site-plugin
When using IntelliJ 12, these were not in the plugins list. Somehow they’ve been added after the update and now IntelliJ complains they cannot be found. Where can I remove these plugins from the list OR resolve the problem by installing them?
I can run maven goals clean
and compile
without problem, but the profile/plugins appear red with warnings in the IDE.
EDIT after 8 years: Please also have a look at all other good answers here. The accepted answer is a common solution but might not work for you or for your IDE version
asked Dec 10, 2013 at 13:47
SpringSpring
11.3k29 gold badges115 silver badges185 bronze badges
4
For newer versions of IntelliJ, enable the use plugin registry option within the Maven settings as follows:
- Click File 🡒 Settings.
- Expand Build, Execution, Deployment 🡒 Build Tools 🡒 Maven.
- Check Use plugin registry.
- Click OK or Apply.
For IntelliJ 14.0.1, open the preferences—not settings—to find the plugin registry option:
- Click File 🡒 Preferences.
Regardless of version, also invalidate the caches:
- Click File 🡒 Invalidate Caches / Restart.
- Click Invalidate and Restart.
When IntelliJ starts again the problem should be vanquished.
Dave Jarvis
30.3k40 gold badges178 silver badges313 bronze badges
answered Nov 27, 2014 at 10:49
GarfieldKlonGarfieldKlon
10.9k6 gold badges31 silver badges32 bronze badges
12
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.
anothernode
4,99912 gold badges43 silver badges60 bronze badges
answered Jul 3, 2017 at 11:00
Steven SpunginSteven Spungin
26.3k5 gold badges83 silver badges75 bronze badges
10
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.
answered Dec 10, 2013 at 16:16
JavaruJavaru
30.2k11 gold badges93 silver badges70 bronze badges
4
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.
answered Oct 28, 2016 at 15:39
Eng.FouadEng.Fouad
115k70 gold badges312 silver badges416 bronze badges
7
The red with warnings maven-site-plugin resolved after the build site Lifecycle:
My IntelliJ version is Community 2017.2.4
answered Sep 25, 2017 at 15:56
WendelWendel
2,74927 silver badges28 bronze badges
3
SOLVED !!!
This is how I fixed the issue…
- Tried one of the answers which include ‘could solve it by enabling «use plugin registry» ‘. Did enable that but no luck.
-
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 selectedImport 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.
- Now lets say I had 10 such plugins which didn’t get resolve and among them the
first was ‘org.apache.maven.plugins:maven-site-plugin’
I went to ‘.m2/repository/org/apache/maven/plugins/’ and deleted the directory
‘maven-site-plugin’ and did a maven reimport again. Guess what, particular
missing plugin got dowloaded. And I just followed similar steps for other
missing plugins and all got resolved.
- Now lets say I had 10 such plugins which didn’t get resolve and among them the
answered Sep 20, 2019 at 7:14
Randhir RayRandhir Ray
5205 silver badges14 bronze badges
5
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>
answered Feb 9, 2017 at 5:06
olivejpolivejp
9001 gold badge9 silver badges14 bronze badges
2
I tried the other answers, but none of them solved this problem for me.
The problem disappeared when I explicitly added the groupId
like this:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
</plugins>
Once the color of the version number changed from red to black and the problem disappeared from the Problems
tab the groupId
can be removed again from the problematic plugin, the error does not show up again and the version number even shows up as suggestion for version
.
answered Aug 29, 2020 at 18:27
JohannesJohannes
82811 silver badges29 bronze badges
2
I am using IntelliJ Ultimate 2018.2.6 and found out, that the feature Reimport All Maven Project does not use the JDK, which is set in the Settings: Build, Execution, Deployment | Build Tools | Maven | Runner.
Instead it uses it’s own JRE in IntelliJ_HOME/jre64/
by default. You can configure the JDK for the Importer in Build, Execution, Deployment | Build Tools | Maven | Importing.
In my specific problem, an SSL certificate was missing in the JREs keystore. Unfortunately IDEA only logs this issue in it’s own logfile. A little red box to inform about the RuntimeException had been really nice…
answered Nov 14, 2018 at 10:04
NilsNils
4763 silver badges4 bronze badges
4
I had the same error and was able to get rid of it by deleting my old Maven settings file. Then I updated the Maven plugins manually using the mvn command:
mv ~/.m2/settings.xml ~/.m2/settings.xml.old
mvn -up
Finally I ran the «Reimport All Maven Projects» button in the Maven Project tab in IntelliJ. The errors vanished in my case.
answered Mar 12, 2014 at 10:14
Björn JacobsBjörn Jacobs
4,0134 gold badges28 silver badges47 bronze badges
None of the other solutions worked for me.
My solution:
Maven Settings -> Repositories -> select Local Repository in the list, Update
Worked like a charm!
cigien
57.6k11 gold badges72 silver badges111 bronze badges
answered Dec 26, 2021 at 14:24
1
This did the trick for me…delete all folders and files under ‘C:Users[Windows User Account].m2repository’.
Finally ran ‘Reimport All Maven Projects’ in the Maven Project tab in IntelliJ.
answered Aug 28, 2014 at 3:03
Remove your local Maven unknown plugin and reimport all maven projects. This will fix this issue.
You can find it under View > Tool Windows > Maven
:
answered Jul 12, 2018 at 1:13
Xin CaiXin Cai
1413 silver badges5 bronze badges
For me it was as simple as giving the plugin a version:
<version>3.3.0</version>
The full plugin code sample is given below:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
answered Aug 21, 2020 at 9:22
1
I was recently faced with the same issue. None of the other solutions resolved the red error lines.
What I did was run the actual targets in question (deploy, site). I could see those dependencies then being fetched.
After that, a reimport did the trick.
answered Mar 9, 2017 at 11:51
1
If an artifact is not resolvable.
Go in the directory of your .m2/repository
and check that you DON’T have that kind of file :
build-helper-maven-plugin-1.10.pom.lastUpdated
If you don’t have any artefact in the folder, just delete it, and try again to re-import in IntelliJ.
the content of those files is like :
#NOTE: This is an Another internal implementation file, its format can be changed without prior notice.
#Fri Mar 10 10:36:12 CET 2017
@default-central-https://repo.maven.apache.org/maven2/.lastUpdated=1489138572430
https://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.codehaus.mojo:build-helper-maven-plugin:pom:1.10 from/to central (https://repo.maven.apache.org/maven2): connect timed out
Without the *.lastUpdated file, IntelliJ (or Eclipse by the way) is enabled to reload what is missing.
Spring
11.3k29 gold badges115 silver badges185 bronze badges
answered Apr 27, 2017 at 17:11
Gauthier PeelGauthier Peel
1,3732 gold badges16 silver badges35 bronze badges
2
I could solve this problem by changing «Maven home directory» from «Bundled (Maven 3) to «/usr/local/Cellar/maven/3.2.5/libexec» in the maven settings of IntelliJ (14.1.2).
answered May 4, 2015 at 13:40
MathiasJMathiasJ
1,6611 gold badge14 silver badges20 bronze badges
0
Uncheck the «Work offline» checkbox in Maven settings.
answered Nov 4, 2015 at 6:48
MaheshkumarMaheshkumar
7341 gold badge10 silver badges19 bronze badges
Here is what I tried to fix the issue and it worked:
- Manually deleted the existing plugin from the .m2 repo
- Enabled «use plugin registry» in IntelliJ
- Invalidated the cache and restarted IntelliJ
- Reimported the maven project in IntelliJ
After following above steps, the issue was fixed. Hopefully this helps you as well.
answered Aug 7, 2019 at 14:06
SureshAttSureshAtt
1,8912 gold badges17 silver badges22 bronze badges
For me which worked is putting the repository which contained the plugin under pluginRepository tags. Example,
<pluginRepositories>
<pluginRepository>
<id>pcentral</id>
<name>pcentral</name>
<url>https://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
answered Feb 26, 2020 at 13:00
Enabling «use plugin registry» and Restart project after invalidate cash solved my problem
to Enabling «use plugin registry» >>> (intelij) File > Setting > Maven > enable the option from the option list of maven
To invalidate cash >>> file > invalidate cash
That’s it…
answered Jul 18, 2020 at 5:20
KrishanKrishan
3631 silver badge12 bronze badges
3
This worked for me
- Go to Settings —> Maven —> Importing —> JDK for importer —>
use «Use Project JDK» option instead of a custom JDK set previously. - Re-build/re-import all the dependencies.
answered Mar 31, 2021 at 3:04
0
This worked for me:
- Close IDEA
- Delete «*.iml» and «.idea» -directories(present in the root folder of project)
- Run «mvn clean install» from the command-line
- Re-import your project into IDEA
After re-importing the entire project, installation of dependencies will start which will take some minutes to complete depending upon your internet connection.
answered Jan 24, 2019 at 9:16
My case:
maven-javadoc-plugin
with version3.2.0
is displayed red in IntelliJ.- Plugin is present in my local maven repo.
- Re-imported maven million times.
- Ran
mvn clean install
from the command line N times. - All my maven settings in IntelliJ are correct.
- Tried to switch between Bundled and non-bundled Maven.
- Tried do delete the whole maven repo and to delete only the plugin from it.
- Nothing of the above worked.
- The only thing that almost always helps with modern IntelliJ IDEA versions is «Invalidate caches / Restart». It helped this time as well.
maven-javadoc-plugin
is not red anymore, and I can click on it and to to the sourcepom
file of the plugin.
answered Oct 19, 2020 at 16:14
Dmitriy PopovDmitriy Popov
2,0922 gold badges21 silver badges30 bronze badges
Recently I faced the same issue.
All tips doesn’t work in my cause.
But I fix it.
Go to Intellij idea setting, find Maven, and in it you need to open Repository tab and update maven and local repos. That’s all.
answered Nov 7, 2020 at 17:50
If you have red squiggles underneath the project in the Maven plugin, try clicking the «Reimport All Maven Projects» button (looks like a refresh symbol).
answered Oct 2, 2014 at 17:47
satoukumsatoukum
1,1681 gold badge21 silver badges29 bronze badges
- Check the plugins which cannot be found (maven-site-plugin,maven-resources-plugin)
- go to ‘.m2/repository/org/apache/maven/plugins/’
- delete the directory rm -rf plugin-directory-name (eg: rm -rf maven-site-plugin)
- exit project from intellij
- import project again
- Do a Maven reimport
Explanation: when you do a maven reimport, it will download all the missing plugins again.
Happy Coding
answered May 27, 2020 at 6:34
I use the community edition packaged as snap on Ubuntu 18.04.
I experience that issue each time there a IntelliJ release.
In that scenario, my working solution is to invoke the invalidate cache and restart from the file menù flagging the indexes removal too.
answered May 29, 2021 at 21:54
Antonio PetriccaAntonio Petricca
8,7385 gold badges33 silver badges71 bronze badges
June/2021:
No Delete, No Reimport.
What I did is, I was going to :
C:Usersdell.m2repositoryorgapachemavenplugins
Then double Click on every Plugin Folders, And see what version it is downloaded.
Then I came back to pom file, and according to downloaded version, I carefully changes those versions in <version>....</version>
Tags. Then refresh.
And That way, All red marks are gone, Even gone those Yellow Marks.
All Clean.
Here is my full pom file for further notice. The Project is JavaFx+Maven with Shade :
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>main.java.sample</groupId>
<artifactId>ThreeColumnTable</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>15.0.1</version>
</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>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>resources</goal>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/generated-groovy-stubs</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>org.example.App</mainClass>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.1</version>
<configuration>
<mainClass>org.example.App</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>project-classifier</shadedClassifierName>
<transformers>
<transformer implementation=
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.example.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
answered Jun 26, 2021 at 18:32
Noor HossainNoor Hossain
1,6001 gold badge18 silver badges24 bronze badges
2
Goto IntelliJ -> Preferences -> Plugin
Search for maven, you will see
1. Maven Integration
2. Maven Integration Extension.
Select the Maven Integration option and restart your Intellij
answered Sep 21, 2016 at 8:58
AnilAnil
5951 gold badge5 silver badges14 bronze badges
Is your Maven build failing with the error «Failed to execute goal org.apache.maven.plugins»? Don’t worry; we’ve got you covered! In this troubleshooting guide, we will provide you with step-by-step solutions to resolve this error and help you get your Maven build up and running again.
Table of Contents
- Introduction to Maven
- Common Causes of the Error
- Effective Solutions to Fix the Error
- Solution 1: Check Your POM File
- Solution 2: Verify Your Maven Installation
- Solution 3: Update Maven Plugins
- Solution 4: Clear Maven Cache
- Solution 5: Check Your Proxy Settings
- FAQs
- Related Links
Introduction to Maven
Maven is a popular build automation tool for Java projects, which simplifies the build and dependency management process. Sometimes, while building a Maven project, you may encounter a «Failed to execute goal org.apache.maven.plugins» error, which can be quite frustrating.
Common Causes of the Error
Some common reasons for the «Failed to execute goal org.apache.maven.plugins» error are:
- Incorrect configuration in the POM file
- Issues with the Maven installation
- Outdated Maven plugins
- Corrupted Maven cache
- Proxy settings issues
Effective Solutions to Fix the Error
Here are some effective solutions to resolve the «Failed to execute goal org.apache.maven.plugins» error:
Solution 1: Check Your POM File
The first step in resolving the error is to check your POM file (pom.xml
) for any incorrect configurations or missing dependencies. Ensure that all the required plugins, dependencies, and properties are correctly defined.
<project>
...
<dependencies>
<!-- Add your dependencies here -->
</dependencies>
<build>
<plugins>
<!-- Add your plugins here -->
</plugins>
</build>
...
</project>
Solution 2: Verify Your Maven Installation
Ensure that Maven is properly installed on your system. You can verify this by running the following command in your terminal or command prompt:
mvn --version
If Maven is not installed or the command fails, follow the official installation guide to install Maven on your system.
Solution 3: Update Maven Plugins
Outdated Maven plugins can also cause the «Failed to execute goal org.apache.maven.plugins» error. Update your Maven plugins by specifying the latest version in your POM file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
...
</plugin>
You can find the latest version of a plugin on its official documentation or Maven Central Repository.
Solution 4: Clear Maven Cache
Sometimes, the Maven cache (~/.m2/repository
) might get corrupted, leading to build errors. To clear the Maven cache, delete the .m2/repository
directory and re-run your build:
rm -rf ~/.m2/repository
mvn clean install
Solution 5: Check Your Proxy Settings
If you are behind a proxy server, ensure that your proxy settings are correctly configured in Maven’s settings.xml
file, located in the ~/.m2
or %USERPROFILE%.m2
directory:
<settings>
...
<proxies>
<proxy>
<id>my-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.example.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>proxypwd</password>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
...
</settings>
FAQs
Q1: Can I use Maven with other programming languages besides Java?
Yes, Maven is primarily designed for Java projects, but it can also be used with other programming languages like Scala, Groovy, and Kotlin through the use of appropriate plugins.
Q2: What is the difference between mvn clean install
and mvn clean package
?
mvn clean install
builds your project, packages it, and installs the packaged artifact to your local repository. On the other hand, mvn clean package
builds your project and packages it, but does not install the artifact to your local repository.
Q3: How can I skip running tests while building my Maven project?
To skip running tests while building your Maven project, you can use the -DskipTests
option:
mvn clean install -DskipTests
Q4: How do I specify a specific JDK version for my Maven project?
To specify a specific JDK version for your Maven project, you can configure the maven-compiler-plugin
in your POM file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
Q5: Can I configure multiple profiles in my Maven project?
Yes, you can configure multiple profiles in your Maven project by defining them in your POM file:
<profiles>
<profile>
<id>profile-1</id>
...
</profile>
<profile>
<id>profile-2</id>
...
</profile>
</profiles>
To activate a specific profile, you can use the -P
option:
mvn clean install -P profile-1
- Apache Maven Official Website
- Maven Central Repository
- Maven User Centre
- Maven Plugins Documentation
- Maven – Guide to Using Multiple Repositories
This error occurs when you employ a plugin that Maven could not download. Possible causes for this error are:
- You are referring to a non-existing plugin, e.g. by means of a typo in its group id, artifact id or version.
- You are using a third-party Maven plugin that is not deployed to the central Maven repository and your POM/settings is missing the required
<pluginRepository>
to download the plugin. Note that<repository>
declarations are not considered when looking for the plugin and its dependencies, only<pluginRepositories>
are searched for plugins. - The plugin repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your
${user.home}/.m2/settings.xml
contains a<server>
declaration whose<id>
matches the<id>
of the plugin repository to use. See the Maven Settings Reference for more details. - There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
- Maven failed to save the files to your local repository, see LocalRepositoryNotAccessibleException for more details.
- The plugin repository you have configured is disabled for the specific version of the plugin you requested. For instance, if you want to use a SNAPSHOT version of a plugin, make sure you don’t have
<snapshots><enabled>false</enabled></snapshots>
configured. Likewise, in order to resolve a released version of the plugin, the plugin repository should not be configured with<releases><enabled>false</enabled></releases>
. See the POM Reference for more information on repository configuration.
In those cases, check your POM and/or settings for the proper contents. If you configured the plugin repository in a profile of your settings.xml
, also verify that this profile gets actually activated, e.g. via invoking mvn help:active-profiles
.
In case of a general network-related problem, you could also consult the following articles:
- Configuring a Proxy
- Security and Deployment Settings
- Guide to Remote Repository Access through Authenticated HTTPS
Note: For performance reasons, Maven caches the information that the plugin could not be downloaded. Depending on your setup, you might need to clear this cache by adding the flag -U
to the command line for your corrections to take effect.
IntelliJ IDEA and Maven — «Unresolved Plugin» Solutions
⚠️ Probably outdated (from 2016).
Related:
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206434489
- https://youtrack.jetbrains.com/issue/IDEA-127515
Symptoms
- After adding a plugin or a dependency to
pom.xml
and auto-importing changes or importing changes manually, the plugin or dependency is still not resolved/downloaded
- Check via
CTRL+SHIFT+A
-> Enter «Maven Projects» (you would a red underlined plugin or dependency)
- «Cannot reconnect» to remote Maven central repository
- Check via
CTRL+SHIFT+A
-> Enter «Maven Settings» > Repositories (you would see a red entry)
Causes (only assumptions)
- Corrupted download: background process has been interrupted/aborted…
- due to a network problem
- (un)intentionally by the user
- After downloading the archive, while extracting the archive, IntelliJ aborts the process because of too low disk space
- Simultaneous downloads from the Maven repository (?)
Solutions — tested on Linux
Before you try any of these solutions, save your work, clear IntelliJ’s cache via File > «Invalidate Cache / Restart» and check if the problem persists.
Please also try if a simple «Reimport All Maven Projects» (type as action using CTRL+SHIFT+A
) changes anything.
1. Solution — «Unresolved plugin»
If you have multiple unresolved plugins, it’s maybe less work for you to follow the second solution instead to redownload all plugins at once.
Let’s assume the plugin’s full name which causes the problem is: org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade
(replace with your plugin’s name)
- Close IntelliJ
- Get the path of your plugin. The path of the example plugin would be
org/apache/maven/plugins/maven-shade-plugin
(substitute ‘.’ and ‘:’ with ‘/’) - Navigate to the affected plugin directory and delete it:
cd ~/.m2/repository/org/apache/maven/plugins/maven-shade-plugin ls -a # should show a directory named after your plugin's version number mv 2.4.3 2.4.3_old
- Start IntelliJ again
CTRL+SHIFT+A
-> Enter «Reimport All Maven Projects»- If the problem still persists, try the second solution below
2. Solution — «Cannot reconnect» to Maven repository
- Make sure that you have enough disk space (especially when using a VM)
- Try to update the repository
CTRL+SHIFT+A
-> Enter «Maven Settings» > Repositories -> select the red entry and click «Update» - Wait and drink ☕. This possibly takes a long time depending on your system, especially after the download has finished. The progress bar stands still but package extraction is in progress, please be patient.
- If IntelliJ fails and the problem still persists: close IntelliJ, then:
cd ~/.m2 mv repository repository_old
- Update as descibed in 2.
После того, как я обновил версию IntelliJ с 12 по 13, я вижу ошибки в моем профиле Maven/Project/Plugins, говорящие, что следующие плагины не могут быть решены:
org.apache.maven.plugins:maven-clean-plugin:2.4.1
org.apache.maven.plugins:maven-deploy-plugin
org.apache.maven.plugins:maven-install-plugin
org.apache.maven.plugins:maven-site-plugin
Хотя я использовал IntelliJ 12, они не были в моем списке плагинов, как-то они добавляются после обновления, и теперь он жалуется, что их невозможно найти, где я могу удалить эти плагины из списка или решить проблему, установив их?
Я могу запускать maven цели clean
и compile
без проблем, но профиль/плагины просто выглядит красным с предупреждениями, которые мне не нравятся.
10 дек. 2013, в 15:12
Поделиться
Источник
21 ответ
У меня была такая же проблема в IntelliJ 14.0.1. Я мог бы решить эту проблему, включив «использование реестра плагинов» в настройках maven IntelliJ.
GarfieldKlon
27 нояб. 2014, в 12:47
Поделиться
Запустите принудительное повторное импортирование из окна инструмента maven. Если это не сработает, отмените кеширование (File> Invalidate cache) и перезапустите. Подождите, пока IDEA повторно проиндексирует проект.
Javaru
10 дек. 2013, в 16:42
Поделиться
У меня была эта проблема в течение многих лет с плагином maven-deploy, и возникла ошибка, хотя я не был напрямую включен в плагин моего POM. В процессе работы я должен был включить плагин с версией в мой раздел плагина POMs, чтобы удалить красновато-рыжий.
Попробовав каждое решение в StackOverflow, я нашел проблему: заглянув в мой каталог.m2/repository/org/apache/maven/plugins/maven-deploy-plugin, появилась версия «XY» вместе с «2.8.2» и др., Поэтому я удалил весь каталог maven-deploy-plugin, а затем повторно импортировал мой проект Maven.
Поэтому кажется, что проблема заключается в ошибке IJ при анализе репозитория. Я бы не удалял все репо, но только плагины, сообщающие об ошибке.
Steven Spungin
03 июль 2017, в 12:55
Поделиться
Ни один из других ответов не работал для меня. Решение, которое сработало для меня, — это загрузить отсутствующий артефакт вручную через cmd:
mvn dependency:get -DrepoUrl=http://repo.maven.apache.org/maven2/ -Dartifact=ro.isdc.wro4j:wro4j-maven-plugin:1.8.0
Eng.Fouad
28 окт. 2016, в 17:27
Поделиться
У меня была такая же ошибка, и я смог избавиться от нее, удалив старый файл настроек Maven. Затем я обновил плагины Maven вручную, используя команду mvn:
mv ~/.m2/settings.xml ~/.m2/settings.xml.old
mvn -up
Наконец, я запустил кнопку «Reimport All Maven Projects» на вкладке Maven Project в IntelliJ. Ошибки исчезли в моем случае.
Björn Jacobs
12 март 2014, в 12:06
Поделиться
Красный с предупреждениями maven-site-plugin разрешен после создания сайта Lifecycle:
Моей версией IntelliJ является Community 2017.2.4
Wendel
25 сен. 2017, в 16:42
Поделиться
Я мог бы решить эту проблему, изменив «домашний каталог Maven» с «Связанный (Maven 3)» на «/usr/local/Cellar/maven/3.2.5/libexec» в настройках maven IntelliJ (14.1.2).
MathiasJ
04 май 2015, в 14:01
Поделиться
Недавно я столкнулся с той же проблемой. Ни одно из других решений не разрешало красные строки ошибок.
То, что я сделал, — это запуск реальных целей (развернуть, сайт). Я мог видеть, что эти зависимости затем извлекаются.
После этого реимпорт сделал трюк.
Denham Coote
09 март 2017, в 12:23
Поделиться
Я использую IntelliJ Ultimate 2018.2.6 и обнаружил, что функция Reimport All Maven Project не использует JDK, который установлен в Настройках: Сборка, Выполнение, Развертывание | Инструменты для сборки | Maven | Runner. Вместо этого он использует собственный JRE в IntelliJ_HOME/jre64/
по умолчанию. Вы можете настроить JDK для Importer в Build, Execution, Deployment | Инструменты для сборки | Maven | Импорт.
В моей конкретной проблеме SSL-сертификат отсутствовал в хранилище ключей JREs. К сожалению, IDEA только регистрирует эту проблему в своем собственном лог файле. Маленькая красная коробка, чтобы сообщить о RuntimeException, была действительно хороша…
nils
14 нояб. 2018, в 10:20
Поделиться
Если артефакт не разрешен, перейдите в библиотеку вашего.m2/repository и убедитесь, что у вас нет такого файла:
строить-хелперов-Maven-плагин-1.10.pom.lastUpdated
Если у вас нет артефакта в папке, просто удалите его и повторите попытку повторного импорта в IntelliJ.
содержимое этих файлов выглядит так:
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Fri Mar 10 10:36:12 CET 2017
@default-central-https://repo.maven.apache.org/maven2/.lastUpdated=1489138572430
https://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.codehaus.mojo:build-helper-maven-plugin:pom:1.10 from/to central (https://repo.maven.apache.org/maven2): connect timed out
Без файла *.lastUpdated, IntelliJ (или Eclipse кстати) позволяет перезагрузить то, что отсутствует.
Gauthier Peel
27 апр. 2017, в 17:53
Поделиться
Я была такая же проблема. Я добавил плагины в свои зависимости pom.xml, и он работает для меня.
<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>
olivejp
09 фев. 2017, в 05:54
Поделиться
Перейти к IntelliJ → Настройки → Плагин
Найдите maven, вы увидите 1. Интеграция Maven 2. Расширение интеграции Maven.
Выберите опцию Maven Integration и перезапустите Intellij
Anil
21 сен. 2016, в 09:39
Поделиться
Снимите флажок «Работа в автономном режиме» в настройках Maven.
Maheshkumar
04 нояб. 2015, в 07:56
Поделиться
Если у вас есть красные squiggles под проектом в плагине Maven, попробуйте нажать кнопку «Reimport All Maven Projects» (выглядит как символ обновления).
satoukum
02 окт. 2014, в 18:29
Поделиться
Это сделало трюк для меня… удалите все папки и файлы в разделе «C:Users [учетная запись пользователя Windows].m2repository».
Наконец побежал «Reimport All Maven Projects» на вкладке Maven Project в IntelliJ.
Brandon Oakley
28 авг. 2014, в 04:10
Поделиться
Это сработало для меня:
- Закрыть ИДЕЯ
- Удалите » *.iml » и » .idea » -directories (присутствует в корневой папке проекта)
- Запустите » mvn clean install » из командной строки
- Повторно импортируйте ваш проект в IDEA
После повторного импорта всего проекта начнется установка зависимостей, которая займет несколько минут в зависимости от вашего интернет-соединения.
Abhishek Gupta
24 янв. 2019, в 09:45
Поделиться
это может помочь кому-то в дальнейшем
я столкнулся с подобными проблемами, моя система не смогла разрешить прокси-сервер
так что подключен к местному Wi-Fi hotpsot.
Abhishek D K
11 дек. 2018, в 14:23
Поделиться
Удалите локальный неизвестный плагин Maven и повторно импортируйте все проекты maven. Это устранит эту проблему.
Xin Cai
12 июль 2018, в 01:45
Поделиться
Я изменил домашний каталог Maven из Bundled (Maven 3) в Bundled (Maven 2) в настройке maven. И это работает для меня. Попробуй!
Culbert
25 авг. 2017, в 15:05
Поделиться
В моем случае в двух подмодулях maven были две несколько разные зависимости (версия 2.1 vs 2.0). После того, как я переключился на одну версию, ошибка прошла в IDEA 14. (Refresh и.m2 swipe не помогли.)
Pavel Vlasov
31 март 2016, в 16:40
Поделиться
Ещё вопросы
- 1hibernate 4 и joda-LocalDate и сохраните его как дату SQL
- 0Не удалось найти код для ответа на этот запрос.
- 1UserControl Fire Событие при изменении свойства
- 0не удается установить Dlib на Windows 10
- 0PHP Назначение переменных для нескольких строк динамической формы
- 0Преобразовать код GIF в изображение GIF или вывести в файл?
- 0Как выбрать COUNT в подзапросе оптимизированным способом
- 1Линейный график D3 JS начинается с 0
- 0гиперссылка laravel4 не отображается в Yahoo, Outlook, но в Gmail гиперссылка работает
- 0координаты XYZ из reprojectImageTo3D opencv
- 1Извлекать числа по позиции в Пандах?
- 0Запутанная таблица CSS
- 0Выполнить функцию, если не удается выполнить другую функцию в течение периода времени
- 0Объединить два массива, если одно из значений равно ключу
- 1как отключить кнопку на основе результата функции JavaScript
- 1Api Last.fm: track.getPlaycount () return -1
- 0не добавлять дубликаты в корзину
- 0Есть ли способ избежать # для осады?
- 0Как показать элемент из массива json один за другим в Angular JS
- 1Понимание 3D-моделей и узлов в Libgdx
- 0JQuery, как взять ссылку на дочерний элемент и использовать его где-нибудь еще
- 0Доступ к элементу массива внутри объекта stdClass
- 0Различные результаты PHP между терминалом и браузером
- 0Как преобразовать любую строку в битовую инвертированную строку ASCII?
- 0Проблемы с прототипированием структуры (неправильное использование неопределенного типа) c ++
- 0Приложение Phonegap для Android — загрузка неверного значка данных в динамически генерируемый <li>
- 1Отключить закрытие диалога для ProgressMonitor
- 1Как я могу определить параметр в функции.
- 1Как заставить «вращающуюся анимацию» менять скорость наугад. Непоседа спиннер анимация.
- 1Внедрить в адаптер привязки данных с помощью Dagger 2
- 0Foreach с огненной базой
- 1Как вырезать область из маски в cv2 python
- 0AngularJS анализирует данные JSON с переменной области видимости
- 1Хранение и доступ к данным в py-файле
- 0Угловые шаблоны не загружаются
- 0Событие при нажатии на <td> создается динамически
- 0Нет подходящей функции для вызова c ++
- 1Установка значения из одного класса в другой в Java
- 1FileLoadException не обработан
- 1Python GUI, который поддерживает интерфейс как CSS & HTML?
- 1Как удалить элементы из отфильтрованных данных — Vue.js 2.x
- 1Telegram TypeError: первый аргумент должен быть вызываемым
- 0phpmailer занимает 5 секунд .. пока php mail () занимает меньше 1
- 1Как мне перенести расширение в VB.NET на C #?
- 1Как использовать внешний SDK с Nativescript
- 0Выпадающая проблема — приложение для мобильного браузера на IOS 7
- 0Модуль индекса Zend Framework 2 не отображает содержимое
- 0Снимите флажок HTML с меткой
- 0Форма входа Python Mechanize, отправка ввода в поле со случайно сгенерированным именем
- 0Вставьте, если существует