[英]Deploy war file to jetty using jenkins
I deployed the war file to tomcat using jenkins as a post-build action 我使用jenkins将war文件部署到tomcat作为构建后操作
WAR/EAR files=**/demo.war
Context path=application
Container=tomcat 7
Manager user name=admin
Manager password=admin
Tomcat URL=https://localhost:8080/
How to deploy a war file to jetty instead of tomcat using jenkins . 如何使用jenkins将war文件部署到jetty而不是tomcat。 The project is a maven project which does not have any plugin for jetty. 该项目是一个maven项目,没有任何码头插件。
I think the simplest way to do this is the following: 我认为最简单的方法是:
1. Add to pluguns of pom.xml next lines 1.添加pom.xml下一行的插件
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.1.1.v20140108</version>
<configuration>
<stopPort>9966</stopPort>
<stopKey>stopKey</stopKey>
<stopWait>20</stopWait>
</configuration>
</plugin>
2. Change goals to 2.改变目标
mvn jetty:stop jetty:run-forked mvn jetty:stop jetty:run-forked
If you cannot change pom.xml then you can create separate pom.xml (on other folder). 如果您无法更改pom.xml,则可以创建单独的pom.xml(在其他文件夹上)。 And run the same tasks with this pom.xml. 并使用此pom.xml运行相同的任务。 Post Steps > Invoke top-level maven target > advavanced 发布步骤>调用顶级maven目标> advavanced
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.