Java maven pom.xml中存储库中的梯度搜索依赖项
我有一个Android库依赖项,我从自己的Maven存储库(基于Artifactory)中提取该依赖项: 此依赖关系依赖于另一个库,该库位于另一个Maven存储库中,具有自定义URL:Java maven pom.xml中存储库中的梯度搜索依赖项,java,android,maven,android-studio,gradle,Java,Android,Maven,Android Studio,Gradle,我有一个Android库依赖项,我从自己的Maven存储库(基于Artifactory)中提取该依赖项: 此依赖关系依赖于另一个库,该库位于另一个Maven存储库中,具有自定义URL: repositories { maven { url 'https://mint.splunk.com/gradle/' } } 我想做的是将我的Android库包含在另一个项目中,而不必将存储库URL显式添加到我的Gradle文件中,而是让我的项目通过Mavenpom.xml继承存储库URL 但Gr
repositories {
maven { url 'https://mint.splunk.com/gradle/' }
}
我想做的是将我的Android库包含在另一个项目中,而不必将存储库URL显式添加到我的Gradle文件中,而是让我的项目通过Mavenpom.xml
继承存储库URL
但Gradle不在自定义存储库URL中搜索:
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.splunk.mint:mint:4.2.1.
Searched in the following locations:
https://jcenter.bintray.com/com/splunk/mint/mint/4.2.1/mint-4.2.1.pom
https://jcenter.bintray.com/com/splunk/mint/mint/4.2.1/mint-4.2.1.jar
http://10.0.190.250:8081/artifactory/android-snapshot-local/com/splunk/mint/mint/4.2.1/mint-4.2.1.pom
http://10.0.190.250:8081/artifactory/android-snapshot-local/com/splunk/mint/mint/4.2.1/mint-4.2.1.jar
file:/Applications/Android-SDK/extras/android/m2repository/com/splunk/mint/mint/4.2.1/mint-4.2.1.pom
file:/Applications/Android-SDK/extras/android/m2repository/com/splunk/mint/mint/4.2.1/mint-4.2.1.jar
file:/Applications/Android-SDK/extras/google/m2repository/com/splunk/mint/mint/4.2.1/mint-4.2.1.pom
file:/Applications/Android-SDK/extras/google/m2repository/com/splunk/mint/mint/4.2.1/mint-4.2.1.jar
即使在mypom.xml
中明确定义了存储库:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jmolsmobile.mylibrary</groupId>
<artifactId>mylibrary</artifactId>
<version>1.0.4</version>
<packaging>aar</packaging>
<repositories>
<repository>
<id>splunk</id>
<url>https://mint.splunk.com/gradle/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.splunk.mint</groupId>
<artifactId>mint</artifactId>
<version>4.2.1</version>
</dependency>
</dependencies>
</project>
4.0.0
com.jmolsmobile.mylibrary
我的图书馆
1.0.4
aar
喷溅
https://mint.splunk.com/gradle/
com.splunk.mint
造币厂
4.2.1
你知道为什么会出问题吗?你找到解决办法了吗?我也在同一条船上。不,不幸的是不是,两年后,有什么解决办法吗?
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jmolsmobile.mylibrary</groupId>
<artifactId>mylibrary</artifactId>
<version>1.0.4</version>
<packaging>aar</packaging>
<repositories>
<repository>
<id>splunk</id>
<url>https://mint.splunk.com/gradle/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.splunk.mint</groupId>
<artifactId>mint</artifactId>
<version>4.2.1</version>
</dependency>
</dependencies>
</project>