How to fetch maven artifact without POM file in Gradle 6.0

It appears that Gradle 6.0 changed its behavior with regards to Maven artifacts resolution – for any dependency it always requires a POM file to be present in remote repository. Now for some reasons and for some artifacts the POM file is missing and I still would like Gradle to succeed – it could fetch either JAR or any other artifact with defined extension in version 5.x. Is this still possible in 6.0?

Hi @jpalus. You need to set metadataSources { artifact() } for repositories without metadata. Please refer to this section of the upgrade guide for details:
https://docs.gradle.org/current/userguide/upgrading_version_5.html#maven_or_ivy_repositories_are_no_longer_queried_for_artifacts_without_metadata_by_default

1 Like

Thanks a lot @jendrik! That’s embarrassing, I should have read release notes more carefully.

1 Like

No worries @jpalus. This is a breaking change in 6. More users will run into this and this post will be helpful for many.