I know Azure release pipelines can deploy to on-premise servers and other cloud VMs. My pom.xml file enables Maven to create a .jar file. My Azure build uses this pom.xml file. The Azure build works fine by itself; there are no errors when it runs. I want to place the .jar file on to a Linux server via either the same Azure build pipeline job or a different Azure Release Pipeline. How do I do this?
I've looked at documentation. When I changed the build with a pathToPublish:
stanza in my Azure build job, the job completes, but there is a warning:
[warning]Directory '/home/vsts/work/1/a' is empty. Nothing will be added to build artifact 'MyBuildOutputs'.
I don't see how "publishWebProjects" would be relevant. Nothing I am doing is relevant to the web.
When I try to create a new and separate release pipeline in Azure (that will hopefully include the same build pipeline job), the different stages that I choose from never involve deploying to a VM. Plus none of the options are obvious to me as to how to configure a source (i.e., to use the .jar file from the previous step a build job). Maybe the source defaults to the Artifact thus created by the Maven build job that I configured. In the Pipeline job I configured a Git repo as an Artifact, but I am not 100% sure Azure knows I want the .jar file that it can produce with Maven to be the artifact to be deployed as the source of the pipeline job itself. Which Template, in the Pipeline options for a given stage, do I choose as the stage in a new release pipeline to move a .jar file to a Linux server?