IntelliJ

时间:2015-12-05 11:25:33

标签: maven intellij-idea repository

在IntelliJ下试验Grails 3时,我发现了以下警告:

 Unindexed remote maven repositories found. Disable...
 The following repositories used in your gradle projects were not indexed yet: 
 https://repo.grails.org/grails/core
 If you want to use dependency completion for these repositories artifacts,
 Open Repositories List, select required repositories and press "Update" button (show balloon)

如果我正在尝试解决问题,我会收到下一个错误:

FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist in IntelliJ

enter image description here

我想知道,这是什么意思?如果存储库被标记为“远程”,那么为什么问题是缺少某些(本地?)文件?

更新

我认为这实际上与Grails无关。

如何在Indexed Maven Repositories按钮上的IntelliJ Update窗口中了解有关错误的更多详细信息?

弹出消息说

Resource nexus-maven-repository-index.properties does not exist in IntelliJ

enter image description here

5 个答案:

答案 0 :(得分:7)

  • 如果您正在使用自定义存储库
  • 它是Nexus 3.x

您忘记设置任务以发布maven存储库索引的可能性很高。

通过浏览器登录。 转至管理/系统/任务/创建任务/创建发布Maven索引任务

将其设置为每小时发布一次。完成。

答案 1 :(得分:4)

对我来说,解决方法是删除〜/ .m2 / repository文件夹。这使Maven能够正确地重新索引所有内容。

失败的审判,可能适用于其他人:

  • 构建,执行,部署→构建工具→Maven→存储库:选择存储库并单击更新。
  • 构建,执行,部署→构建工具→Maven:提供更多内存JVM
  • 删除文件夹〜/ .IntelliJIdea2016.3 / system / caches

答案 2 :(得分:2)

您可以尝试使用grails / repo和grails / plugins而不是grails / core。

例如,在build.gradle中:

repositories {
    mavenLocal()
    maven { url 'http://repo.grails.org/grails/repo' }
    maven { url 'http://repo.grails.org/grails/plugins' }
}

我使用Grails 3.0.9,JVM版本:1.8.0_45,Apache Maven 3.3.9和Gradle 2.3在IntelliJ Community 15上进行了测试。

答案 3 :(得分:0)

Artifactory用户发生相同的错误。解决了三亚的提示。确保包含本地存储库。 Artifactory Indexing

之后,回购工作: enter image description here

答案 4 :(得分:0)

全新安装后我的索引有问题(来自 Snap ubuntu)。

已通过更改 MAVEN HOME PATH MAVEN HOME PATH 解决 我已经从“捆绑”切换到“/usr/share/maven”

上述解决方案都没有解决我的问题