-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
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:
- Editing the exoplayer-core pom file downloaded by Maven, adding the
<type>aar</type>
line to its exoplayer-common and exoplayer-extractor dependencies - Removing exoplayer-common and exoplayer-extractor directories from my local repository (so Maven doesn't think they're cached)
- Rerunning the Maven task
- Editing the newly downloaded exoplayer-extractor pom file, again adding
<type>aar</type>
to its exoplayer-common dependency - 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.