无法使用MavenLocal中的分类器解析快照工件

时间:2018-09-12 13:45:41

标签: android maven gradle

尝试解决下一个依赖项时出现错误

  

debugApi组:“ com.keypr.kaos.common”,名称:“ commons”,版本:project.version,分类器:“ debug”,ext:“ aar”

Could not resolve all files for configuration ':commons-kaos:debugCompileClasspath'.
> Could not find commons-debug.aar (com.keypr.kaos.common:commons:3.1.40-SNAPSHOT:20180912.132455-2).
  Searched in the following locations:
      file:/home/vandalko/.m2/repository/com/keypr/kaos/common/commons/3.1.40-SNAPSHOT/commons-3.1.40-20180912.132455-2-debug.aar

存储库:

-rw-r--r-- 1 vandalko vandalko 62360 вер 12 16:24 commons-3.1.40-20180912.132454-1-debug.aar
-rw-r--r-- 1 vandalko vandalko    32 вер 12 16:24 commons-3.1.40-20180912.132454-1-debug.aar.md5
-rw-r--r-- 1 vandalko vandalko    40 вер 12 16:24 commons-3.1.40-20180912.132454-1-debug.aar.sha1
-rw-r--r-- 1 vandalko vandalko  1595 вер 12 16:24 commons-3.1.40-20180912.132454-1.pom
-rw-r--r-- 1 vandalko vandalko    32 вер 12 16:24 commons-3.1.40-20180912.132454-1.pom.md5
-rw-r--r-- 1 vandalko vandalko    40 вер 12 16:24 commons-3.1.40-20180912.132454-1.pom.sha1
-rw-r--r-- 1 vandalko vandalko  1233 вер 12 16:24 commons-3.1.40-20180912.132455-2.pom
-rw-r--r-- 1 vandalko vandalko    32 вер 12 16:24 commons-3.1.40-20180912.132455-2.pom.md5
-rw-r--r-- 1 vandalko vandalko    40 вер 12 16:24 commons-3.1.40-20180912.132455-2.pom.sha1
-rw-r--r-- 1 vandalko vandalko 56179 вер 12 16:24 commons-3.1.40-20180912.132455-2-release.aar
-rw-r--r-- 1 vandalko vandalko    32 вер 12 16:24 commons-3.1.40-20180912.132455-2-release.aar.md5
-rw-r--r-- 1 vandalko vandalko    40 вер 12 16:24 commons-3.1.40-20180912.132455-2-release.aar.sha1
-rw-r--r-- 1 vandalko vandalko  1035 вер 12 16:24 maven-metadata.xml
-rw-r--r-- 1 vandalko vandalko    32 вер 12 16:24 maven-metadata.xml.md5
-rw-r--r-- 1 vandalko vandalko    40 вер 12 16:24 maven-metadata.xml.sha1

元数据

<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
  <groupId>com.keypr.kaos.common</groupId>
  <artifactId>commons</artifactId>
  <version>3.1.40-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20180912.132455</timestamp>
      <buildNumber>2</buildNumber>
    </snapshot>
    <lastUpdated>20180912132455</lastUpdated>
    <snapshotVersions>
      <snapshotVersion>
        <extension>pom</extension>
        <value>3.1.40-20180912.132455-2</value>
        <updated>20180912132455</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>release</classifier>
        <extension>aar</extension>
        <value>3.1.40-20180912.132455-2</value>
        <updated>20180912132455</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>debug</classifier>
        <extension>aar</extension>
        <value>3.1.40-20180912.132454-1</value>
        <updated>20180912132454</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
</metadata>

如您所见,maven-metadata.xml指向正确的版本,但是Gradle尝试加载其他版本...

在Gradle论坛上也有同样的问题,因为我有点拼命https://discuss.gradle.org/t/cant-resolve-snapshot-artifact-with-classifier-in-mavenlocal/28589

0 个答案:

没有答案