更新时间:2021-12-30 16:57:51
This is a duplicate of Maven plugins can not be found in IntelliJ. The top answers there did not work for me, so I'll describe what I did.
我只是将所需的插件放入了我的~/.m2/repository
中.有两种方法可以实现这一目标.可以使用mvn dependency:get
手动下载文件,也可以(我偏爱的方式)使插件成为pom.xml的依赖项,并构建该项目.
I just put the needed plugins into my ~/.m2/repository
. There are two ways that achieve that. Either download the files manually with mvn dependency:get
, or (my preferred way) make the plugins a dependency in some (whichever) pom.xml and build that project.
<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>
现在您可以删除依赖项.然后在Intellij中单击重新导入所有Maven项目"(蓝色圆形箭头图标).
Now you can remove the dependencies. Then click "Reimport all Maven Projects" in Intellij (the blue circular arrows icon).
这个问题似乎完全没有害处,但是曲折的线条令人发指,所以我很高兴能够摆脱它们.
This issue seems completely harmless, but the squiggly lines are kind of infuriating, so I am glad I was able to get rid of them.
无法计算构建计划:无法解析插件 org.apache.maven.plugins:maven-jar-plugin:2.3.2 或其依赖项之一
无法读取org.apache.maven.plugins:maven-source-plugin:jar:2.4的工件描述符
无法解析org.apache.maven.plugins:maven-resources-plugin:2.4.3 ..的插件描述符在打开zip文件时出错
从存储库中错误解析插件'org.apache.maven.plugins:maven-jar-plugin'的版本,在任何插件存储库中均未找到插件
插件org.apache.maven.plugins:maven-clean-plugin:2.5或其依赖项之一无法解析
无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.5 或其依赖项之一无法解析
插件org.apache.maven.plugins:maven-compiler-plugin或其中一个依赖项无法解析
插件org.apache.maven.plugins:maven-install-plugin:2.4或其中一个依赖项无法解析
插件 org.apache.maven.plugins:maven-clean-plugin:2.5 或其依赖项之一无法解析