How can I get the scan url from a maven build?

Currently, the output is something like

[INFO] 334 goals, 324 executed, 10 from cache, saving at least 21s
[INFO] 
[INFO] Publishing build scan...
[INFO] https://baseurl.com/shz6dlj2rfjdk

This is not very computer friendly because it makes it very hard to parse. Is there any way to read this value other than parsing the build logs?

Hi @yeikel

You can programmatically access the published build scan of a Maven build via
https://docs.gradle.com/enterprise/maven-extension/#executing_operations_when_a_build_scan_is_published