intellij 13中gradle 1.10内部maven存储库索引永远不变 [英] gradle 1.10 internal maven repository indexing forever in intellij 13
问题描述
build.gradle文件:
apply plugin:'java'
apply plugin:'war'
sourceCompatibility = 1.5
version ='1.0'
maven {
urlhttp://nexus.company.com/nexus/repo
}
mavenLocal()
mavenCentral()
maven {
urlhttps://oss.sonatype.org/content/repositories/snapshots
}
.m2 / settings.xml似乎完全被gradle忽略(我试图通过不向build.gradle文件添加maven repo并希望gradle看起来像在.m2 / settings.xml找出从哪里获取工件)
.m2 / settings.xml文件
< settings>
< mirrors>
< mirror>
< id> nexus< / id>
< mirrorOf> *< / mirrorOf>
< url> http://nexus.company.com/nexus/repo< / url>
< / mirror>
< / mirrors>
<个人资料>
<个人资料>
< id> central-repo< / id>
< repositories>
< repository>
< id>中央< / id>
< url> http:// central< / url>
< release><启用>真实< / enabled>< / releases>
<快照><启用> true< / enabled>< / snapshots>
< / repository>
< / repositories>
< pluginRepositories>
< pluginRepository>
< id>中央< / id>
< url> http:// central< / url>
< release><启用>真实< / enabled>< / releases>
<快照><启用> true< / enabled>< / snapshots>
< / pluginRepository>
< / pluginRepositories>
< / profile>
< / profiles>
< activeProfiles>
< activeProfile> central-repo< / activeProfile>
< / activeProfiles>
< / settings>
当回购是 http://nexus.company.com/nexus/repo 。没有它,除了内部工件不可用于下载外,其他工作都很好。
然而,maven项目需要相同的工件下载,并在几秒钟内准备好。
我是对Gradle很新颖。我是否犯了错误?
对于永久索引,我使用了新的IntelliJ安装,等待每个索引15-20m @ 100%的CPU。在随后的发布中没有问题。
I have two projects. One Maven and one Gradle. The company also has an internal maven repository. I am trying to setup Gradle to use the internal repo. Using Intellij 13, when I add the repo like so to Gradle in build.gradle
build.gradle file:
apply plugin: 'java'
apply plugin: 'war'
sourceCompatibility = 1.5
version = '1.0'
maven {
url "http://nexus.company.com/nexus/repo"
}
mavenLocal()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
The .m2/settings.xml seems to be ignored completely by gradle (I tried by not adding the maven repo to the build.gradle file and hoping that gradle will look at .m2/settings.xml to figure out where to fetch artifacts from)
.m2/settings.xml file
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus.company.com/nexus/repo</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>central-repo</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>central-repo</activeProfile>
</activeProfiles>
</settings>
Intellij spins forever in the background task saying "Processing indices" when the repo is http://nexus.company.com/nexus/repo is added. Without it things work just fine except the internal artifacts are not available for download.
However, the maven project requiring the same artifacts downloads and is ready in a few seconds.
I am very new to gradle. Did I make any mistake?
For the "indexing forever", I was using a fresh IntelliJ install and ended up just having to wait 15 - 20m @100% CPU per index. On subsequent launches there was no problem.
这篇关于intellij 13中gradle 1.10内部maven存储库索引永远不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!