Can't resolve snapshot artifact with classifier in MavenLocal


(Olexandr Tereshchuk) #1

I have an error, when trying to resolve next dependency

debugApi group: ‘com.keypr.kaos.common’, name: ‘commons’, version: project.version, classifier: ‘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

Repository:

-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

Metadata

<?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>

As you can see, maven-metadata.xml points to correct version but Gradle tries to load different one…