简体   繁体   中英

How to create .war file using jenkins for deployment

I started working on Jenkins for continuous integration. My java project is build successfully but am not able to find .war file for deployment. If I manually keep the myproject.war file inside workspace auto deployment is happening in tomcat7.

Now my question: is Jenkins able to create .war or not (if any extra plugins are needed please let me know), or if i need to add any build.xml file where can i keep this file.

Thanks in advance.

Finally i find the solution, Jenkins is not having a feature like auto creating .war file. so we have to create build.xml (ANT) for creating .war file. Keep this file in your project and check-in into the repository. And map the build.xml location in Jenkins configuration page. When the build is happen through Jenkins it will take the code from repository build it and stores in workspace in Jenkins folder along with .war file. You can do auto deploy this .war file into your tomcat using Jenkins.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM