IntelliJ从12版本升级到13版本后,以下maven相关插件无法解决:

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时,这些不在插件列表中。不知何故,它们在更新后被添加,现在IntelliJ抱怨无法找到它们。我可以在哪里从列表中删除这些插件或通过安装它们来解决问题?

我可以运行maven目标干净和编译没有问题,但配置文件/插件在IDE中显示红色警告。

8年后编辑:也请看看这里所有其他好的答案。公认的答案是一个常见的解决方案,但可能不适用于您或您的IDE版本


当前回答

对我来说,我手动下载它们,把主题放在我的。m2文件夹里,然后我使缓存无效并重新启动(我使用Intellij IDEA)。 具体步骤如下:

< groupId > org . codehaus < / groupId >的魔力。 < artifactId > jdepend-maven-plugin < / artifactId > < 2.0版本> < /版>

I go to https://mvnrepository.com/ then serch for jdepend-maven-plugin choose the version 2.0 In Files go and click on View All Download this files jdepend-maven-plugin-2.0.jar jdepend-maven-plugin-2.0.jar.sh1 jdepend-maven-plugin-2.0.pom jdepend-maven-plugin-2.0.pom.sh1 go to .m2 folder then org/codehaus/mojo Create folder with name jdepend-maven-plugin inside with name 2.0 inside put the 4 files downloaded befor. create file with name _remote.repositories open it with text editor and write inside

jdepend-maven-plugin-2.0.jar中部> = jdepend-maven-plugin-2.0.pom中部> =

去intellij IDEA使缓存无效并重新启动。

其他回答

我把依赖放在依赖项中,解决了我的问题:

<dependencies>
    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
    </dependency>
</dependencies>

我忽略了<pluginManagement>,它是<dependencyManagement>,这与<dependencies>不同:

dependencyManagement只声明依赖项,不引入依赖项。

因此,无论我清除存储库文件夹中的所有项目,还是键入mvn clean install -e -U,两者都不起作用。

删除本地Maven未知插件并重新导入所有Maven项目。这将解决这个问题。

你可以在View > Tool Windows > Maven下找到它:

从maven工具窗口运行Force重新导入。如果不工作,Invalidate你的缓存(文件> Invalidate缓存)并重新启动。等待IDEA重新索引项目。

红色警告maven-site-plugin在构建站点生命周期后解决:

我的IntelliJ版本是Community 2017.2.4

对我来说,我手动下载它们,把主题放在我的。m2文件夹里,然后我使缓存无效并重新启动(我使用Intellij IDEA)。 具体步骤如下:

< groupId > org . codehaus < / groupId >的魔力。 < artifactId > jdepend-maven-plugin < / artifactId > < 2.0版本> < /版>

I go to https://mvnrepository.com/ then serch for jdepend-maven-plugin choose the version 2.0 In Files go and click on View All Download this files jdepend-maven-plugin-2.0.jar jdepend-maven-plugin-2.0.jar.sh1 jdepend-maven-plugin-2.0.pom jdepend-maven-plugin-2.0.pom.sh1 go to .m2 folder then org/codehaus/mojo Create folder with name jdepend-maven-plugin inside with name 2.0 inside put the 4 files downloaded befor. create file with name _remote.repositories open it with text editor and write inside

jdepend-maven-plugin-2.0.jar中部> = jdepend-maven-plugin-2.0.pom中部> =

去intellij IDEA使缓存无效并重新启动。