{"id":43,"date":"2018-08-15T20:02:42","date_gmt":"2018-08-15T12:02:42","guid":{"rendered":"http:\/\/172.81.211.114\/?p=43"},"modified":"2021-08-13T09:51:54","modified_gmt":"2021-08-13T01:51:54","slug":"jenkinsmaventomcatsvn%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/www.yinyubo.com\/?p=43","title":{"rendered":"jenkins\u52a0maven\u52a0tomcat\u52a0svn\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"<p>jenkins+maven+tomcat\u505a\u6301\u7eed\u96c6\u6210\u662fweb\u7f51\u7ad9\u4e0d\u53ef\u7f3a\u5c11\u7684\u4e86\uff0c\u5927\u90e8\u5206\u7f51\u7ad9\u90fd\u8be6\u7ec6\u7684\u5199\u4e86\u5982\u4f55\u914d\u7f6e\u3002\u8fd9\u91cc\u8bb0\u4e00\u4e0b\u9047\u5230\u7684\u95ee\u9898<br \/>\n1.jenkins \u7b7e\u51fasvn\u4ee3\u7801\uff0c\u8fd9\u4e2a\u8fd8\u662f\u6bd4\u8f83\u7b80\u5355\u7684\uff0c\u7f51\u4e0a\u914d\u7f6e\u6b65\u9aa4\u4e5f\u591a\uff0c\u914d\u7f6e\u6210\u8fd9\u6837\uff0c\u5728\u4e3b\u9875\u70b9\u51fb\u7acb\u5373\u6784\u5efa\uff0c\u5c31\u4f1a\u628a\u4ee3\u7801\u4eceSVN\u4e0a\u52a0\u5165\u5de5\u4f5c\u7a7a\u95f4\u4e86\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-45 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/7112781-0ab44b9bd7680b85.jpg\" alt=\"\" width=\"700\" height=\"448\" \/><br \/>\n2.\u52a0\u5165\u89e6\u53d1\u5668\uff0c\u6211\u8bbe\u7f6e\u7684\u662f\u53ea\u8981SVN\u6709\u66f4\u65b0\u5c31\u7acb\u5373\u6784\u5efa\u4ee3\u7801\uff0c\u4e5f\u53ef\u4ee5\u6309\u7167\u9879\u76ee\u9700\u6c42\u8fdb\u884c\u53d8\u66f4\uff0c\u5982\u4e00\u5929\u4e00\u6b21\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-48 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/\u56fe2.jpg\" alt=\"\" width=\"700\" height=\"456\" \/><br \/>\n3.jenkins\u91cc\u4f7f\u7528maven\u6253\u5305\uff0c\u5e76\u4e14\u8df3\u8fc7\u6d4b\u8bd5\uff0c\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\u4f1a\u5728\u5de5\u4f5c\u7a7a\u95f4\u7684target\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a*.war\u5305\uff08\u8fd9\u4e2awar\u5305\u5c31\u662f\u6253\u5305\u597d\u7684\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u624b\u52a8\u590d\u5236\u8be5\u6587\u4ef6\u5230tomcat\u7684webapp\u76ee\u5f55\uff09\u5173\u4e8emaven\u7684\u4f7f\u7528\uff0c\u53e6\u6709\u5176\u4ed6\u7f51\u7ad9\u4ecb\u7ecd\uff0c\u4e3b\u8981\u5c31\u662f\u4fee\u6539pom.xml\u6587\u4ef6\u548c\u4f7f\u7528goals\u547d\u4ee4\uff0c\u662f\u9879\u76ee\u7ba1\u7406\u7684\u4e00\u5927\u5229\u5668<\/p>\n<div class=\"image-package\">\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-49 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/\u56fe3.jpg\" alt=\"\" width=\"700\" height=\"148\" \/><\/div>\n<div class=\"image-package\">4.jenkins\u81ea\u52a8\u90e8\u7f72tomcat.\u8fd9\u91cc\u6bd4\u8f83\u9ebb\u70e6 ,\u9700\u8981\u5148\u5b89\u88c5jenkins\u63d2\u4ef6,Deploy war\/ear to a container\u3002\u7136\u540e\u5728\u914d\u7f6e\u91cc\u586b\u5199\u5982\u4e0b\uff0cwar\u6587\u4ef6\u7528**\/*.war\u5c31\u597d\u4e86\u3002tomcat\u670d\u52a1\u5668\u7684\u7ba1\u7406\u5458\u8d26\u6237\u5bc6\u7801\u4ee5\u53catomcat\u7684\u767b\u5f55\u5730\u5740\u52a0\u4e0a\u7aef\u53e3\u53f7\u3002\u5982\u679c\u672c\u5730\u8c03\u8bd5\uff0c\u5730\u5740\u5c31\u662flocalhost\u4e86\u3002<\/p>\n<div class=\"image-package\">\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-50 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/\u56fe4.jpg\" alt=\"\" width=\"700\" height=\"400\" \/><\/div>\n<div class=\"image-package\">\u4f46\u662f\uff0c\u8fd9\u6837\u90e8\u7f72\u4e4b\u540e\uff0ctomcat\u5b9e\u9645\u4e0a\u5e76\u4e0d\u80fd\u90e8\u7f72\u6210\u529f\uff0c\u4f1a\u62a5\u9519\uff0c<br \/>\n\u9519\u8bef1.\u5982\u4e0b\uff1a<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">Caused by: java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter<\/code><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:849)<\/code><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)<\/code><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)<\/code><br \/>\n\u8fd9\u4e2a\u65f6\u5019\uff0c\u9700\u8981\u4fee\u6539C:\\Program Files\\apache-tomcat-7.0.70\\conf \u76ee\u5f55\u4e0b\u7684context.xml\u6587\u4ef6<br \/>\n\u6dfb\u52a0<br \/>\n\u8fd9\u4e2a\u9519\u8bef\u89e3\u51b3\u4e4b\u540e\uff0c\u8fd8\u6709\u53ef\u80fd\u51fa\u73b0\u53e6\u5916\u4e00\u4e2a\u9519\u8bef<br \/>\n\u9519\u8bef2\uff0c\u5982\u4e0b\uff1a<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">SEVERE: \u00a0 \u00a0 Resource '\/WEB-INF\/lib\/ant-1.7.0.jar' is missing<\/code><br \/>\n\u8fd9\u5f88\u5947\u602a\uff0c\u9700\u8981\u7528\u5230ant\u7684jar\u5305\uff0c\u597d\u5427jenkins\u90e8\u7f72tomcat\u73af\u5883\u8981\u7528\u5230ant\uff0c\u90a3\u5c31\u5f80pom.xml\u91cc\u6dfb\u52a0ant\u7684\u76f8\u5173\u914d\u7f6e<br \/>\norg.apache.ant<br \/>\nant<br \/>\n1.10.1<br \/>\n\u8fd9\u6837\u6dfb\u52a0\u4e4b\u540e\uff0c\u518d\u8fd0\u884c\u9879\u76ee\u7684\u7acb\u5373\u6784\u5efa\u529f\u80fd\uff0c\u4f1a\u53d1\u73b0\uff0cjenkins\u80fd\u591f\u81ea\u52a8\u628atomcat\u76ee\u5f55\u4e0b\u7684\u8001\u7684\u65e0\u7528\u5de5\u7a0b\u6587\u4ef6\u5220\u9664\uff0c\u91cd\u65b0\u6ce8\u5165\u65b0\u7684\u5de5\u7a0b\u6587\u4ef6\uff0c\u5176\u5b9e\u548c maven \u7684tomcat7:redeploy\u529f\u80fd\u662f\u5b8c\u5168\u76f8\u540c\u7684\uff0c\u53ea\u662fjenkins\u4e0b\u4f7f\u7528maven\u00a0tomcat7:redeploy\u603b\u62a5\u9519\uff0c\u6240\u4ee5\u65e0\u5948\u53ea\u80fd\u7528jenkins\u63d2\u4ef6\u91cc\u7684deploy\u65b9\u6cd5<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>jenkins+maven+tomcat\u505a\u6301\u7eed\u96c6\u6210\u662fweb\u7f51\u7ad9\u4e0d\u53ef\u7f3a\u5c11\u7684\u4e86\uff0c\u5927\u90e8\u5206\u7f51\u7ad9\u90fd\u8be6\u7ec6\u7684\u5199\u4e86\u5982\u4f55\u914d\u7f6e\u3002\u8fd9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":49,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43"}],"version-history":[{"count":1,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":965,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions\/965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/media\/49"}],"wp:attachment":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}