我很难找到我放在我的私人关系仓库中的依赖项。依赖关系在maven中,但是我似乎也无法在其中找到它。我确实将它放入我的联系仓库中,并且位置为http://nexus.hq.chris.com/content/repositories/emoji4j/
Could not resolve all dependencies for configuration ':business:compile'.
> Could not find com.kcthota:emoji4j:6.0.
Searched in the following locations:
http://nexus.hq.chris.com/content/groups/public/com/kcthota/emoji4j/6.0/emoji4j-6.0.pom
http://nexus.hq.chris.com/content/groups/public/com/kcthota/emoji4j/6.0/emoji4j-6.0.jar
file:/Users/chris/.m2/repository/com/kcthota/emoji4j/6.0/emoji4j-6.0.pom
file:/Users/chris/.m2/repository/com/kcthota/emoji4j/6.0/emoji4j-6.0.jar
Required by:
Build.gradle片段
dependencies {
// https://mvnrepository.com/artifact/com.kcthota/emoji4j
compile group: 'com.kcthota', name: 'emoji4j', version: '6.0'
}
buildscript {
repositories {
maven {
url "http://nexus.hq.chris.com/content/groups/public/"
}
maven { url "https://repo1.maven.org/maven2/" }
maven { url "http://nexus.hq.chris.com/content/repositories/emoji4j/" }
mavenCentral()
}
dependencies {
classpath 'com.jcraft:jsch:0.1.54'
}
}
任何人都知道如何获得对我所有依赖项的http://nexus.hq.chris.com/content/groups/public/和http://nexus.hq.chris.com/content/repositories/emoji4j/的认可吗?我需要http://nexus.hq.chris.com/content/groups/public/位置来获取其他依赖项。我尝试在其中添加它,但是我对该存储区只有读取权限。
另一种可接受的解决方案是让它在http://nexus.hq.chris.com/content/groups/public/和maven Central中进行查找。任何帮助将不胜感激。
答案 0 :(得分:2)
我认为,您可能会混淆build script和application dependencies的依赖性。
您已经配置了构建脚本存储库,但还需要配置应用程序存储库:
// build.gradle
repositories {
maven {
url "http://nexus.hq.chris.com/content/groups/public/"
}
maven { url "https://repo1.maven.org/maven2/" }
maven { url "http://nexus.hq.chris.com/content/repositories/emoji4j/" }
mavenCentral()
}