I have a Java project. It has a pom.xml set up and I use mvn deploy
to deploy new artifacts to an internal company Nexus. And everything is working fine.
But... I'm working on integrating this application in a CI/CD system. So, basically what I need is to programmatically / automatically know where this artifact was deployed (the exact Nexus URL of the artifact) so I can include this as input for the next step of the CI/CD system.
I know this usually isn't needed when working with Maven. But what can I say, I need this URL to appear on some web page which shows this artifact, along with some other info related to it, like which tests were run on it, who created it, when, on top of which commit of which repository it was built etc...
So... Is there a nice, clean way for me to get this info, apart from the hackish way of manually parsing the pom.xml file to try to recreate the URL. Something like mvn give-me-the-url-to-which-you-would-deploy-if-i-were-to-run-deploy
. :)