这是indexloc提供的服务,不要输入任何密码
Skip to content

Maven unable to resolve 2.12.x exoplayer-core dependencies #8353

@space-pope

Description

@space-pope

Gradle seems to have no problem downloading ExoPlayer, but I maintain a Java library that uses Maven for dependency management, and the following dependency:

      <dependency>
         <groupId>com.google.android.exoplayer</groupId>
         <artifactId>exoplayer-core</artifactId>
         <version>2.12.2</version>
         <type>aar</type>
         <scope>provided</scope>
      </dependency>

produced the following error during mvn compile (or any other task that pulls dependencies):

The following artifacts could not be resolved: com.google.android.exoplayer:exoplayer-common:jar:2.12.2, com.google.android.exoplayer:exoplayer-extractor:jar:2.12.2

I could see via bintray's web interface that the files are there, so I dug further. This appears to be related to the pom files generated by Gradle. I can fix the problem by:

  1. Editing the exoplayer-core pom file downloaded by Maven, adding the <type>aar</type> line to its exoplayer-common and exoplayer-extractor dependencies
  2. Removing exoplayer-common and exoplayer-extractor directories from my local repository (so Maven doesn't think they're cached)
  3. Rerunning the Maven task
  4. Editing the newly downloaded exoplayer-extractor pom file, again adding <type>aar</type> to its exoplayer-common dependency
  5. Running the Maven task one last time

I would expect having <packaging>aar</packaging> under the project element (as ExoPlayer poms do) to address this problem, but apparently not, at least for runtime-scoped dependencies.

Note that I didn't have this problem with 2.11.x—exoplayer-core doesn't have runtime dependencies on the other libraries in that version.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions