Can anyone think of a clever mechanism by which I ...
# community-support
c
Can anyone think of a clever mechanism by which I can retrieve the maven snapshot version (timestamp & build number) of an artifact that was published by the build?
v
Resolve it after the publishing using a detached configuration maybe? Or just download the according
maven-metadata.xml
and look inside?
c
the resolving makes sense... I hadn't thought about doing that... I explored the maven-metadata concept but it gets a bit ugly
I'd love there to be a way to do this without having to roundtrip things but that is the way of things
v
The timestamp is constructed by Gradle when publishing, but I don't think it is available in any way, especially not through public API.
c
The timestamp is actually the "build started" time which can be returned via the right service injection. It's the build number that's hard. Gradle is doing a metadata fetch internally and then picking the next build number. I'd love to avoid a repeat of that remote call, but I think it's going to be necessary.