I have a repository defined like this:
maven {
url 'https://repository.apache.org/content/groups/snapshots' // for myfaces snapshots
}
and a dependency like this
implementation('org.apache.myfaces.core.extensions.quarkus:myfaces-quarkus:2.3-next-SNAPSHOT')
But gradle is not able to resolve it and i suspect that the generated maven-metadata.xml for the snapshot is “wrong” from a gradle perspective, but it works fine when pulling said depndency from a maven proiect.
Gradle uses the timestamp and buildNumber values from the xml to construct a file that does not exist on the server:
<metadata modelVersion="1.1.0">
<groupId>org.apache.myfaces.core.extensions.quarkus</groupId>
<artifactId>myfaces-quarkus</artifactId>
<version>2.3-next-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20200813.133542</timestamp>
<buildNumber>183</buildNumber>
</snapshot>
<lastUpdated>20200813133542</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>2.3-next-20200813.133408-182</value>
<updated>20200813133542</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>2.3-next-20200813.133408-182</value>
<updated>20200813133542</updated>
</snapshotVersion>
<snapshotVersion>
<classifier>sources</classifier>
<extension>jar</extension>
<value>2.3-next-20200813.133408-182</value>
<updated>20200813133542</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
Execution failed for task ‘:quarkusPrepare’.
Could not resolve all dependencies for configuration ‘:runtimeClasspath’.
Could not find org.apache.myfaces.core.extensions.quarkus:myfaces-quarkus:2.3-next-SNAPSHOT.
Searched in the following locations:
-https://repository.apache.org/content/groups/snapshots/org/apache/myfaces/core/extensions/quarkus/myfaces-quarkus/2.3-next-SNAPSHOT/maven-metadata.xml - https://repository.apache.org/content/groups/snapshots/org/apache/myfaces/core/extensions/quarkus/myfaces-quarkus/2.3-next-SNAPSHOT/myfaces-quarkus-2.3-next-20200813.133542-183.pom
This file indeed does not exist.
When using a maven project to pull the dependency, it happly works and resolves to
2.3-next-20200813.133408-182
From what i understand, the maven-metadata.xml is wrong. But as it is hard to convince owners that they should change something because “it works with maven”, I am wondering if there is a way to make gradle resolve this.
Thanks,
Daniel