Automation with jenkins pipeline

Hello all,
i want to automate the deployment of war and jar on to the tomcat server
i want to build a pipeline which should take the code from git it has to build and the generated war should sent to the tomcat server by using scp method.
i have tried this but how i did was i have added the jenkins user in tomcat server and i have added the jenkins user in user.xml file in tomcat and i have changed the ownership of this path /opt/tomcat/webapps to jenkins user and given 700 permission then it worked but i don’t want to add jenkins user in tomcat how to achive this please help me out.