I wanted to know how I could build a maven project and then automatically deploy the artifacts based on environmental files? Basically, I have a spring boot application(hosted on GitHub) that I want to compile using maven and a specific profile for each deployed environment. After the build is completed, I would like to SFTP the artifact(WAR file) to a remote server.
Is there a general consensus on the best way to do this? I had tried at one point to get this working in pipelines but the transfer of the artifacts became complicated because I would have to basically install the FTP client on the VM that was spun up. I was hoping there was a more straightforward way to do this.