{"id":1539,"date":"2021-07-30T17:44:38","date_gmt":"2021-07-30T09:44:38","guid":{"rendered":"https:\/\/egonlin.com\/?p=1539"},"modified":"2021-07-30T17:44:38","modified_gmt":"2021-07-30T09:44:38","slug":"%e7%ac%ac%e4%ba%8c%e8%8a%82%ef%bc%9ajenkins%e9%83%a8%e7%bd%b2tomcat","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=1539","title":{"rendered":"\u7b2c\u4e8c\u8282\uff1ajenkins\u90e8\u7f72tomcat"},"content":{"rendered":"<h1>jenkins\u90e8\u7f72tomcat<\/h1>\n<pre><code class=\"language-bash\">maven\u7f16\u8bd1\u73af\u5883\uff08jenkins\u670d\u52a1\u5668\uff09\n\u8fd0\u884c\u73af\u5883\uff08web\u670d\u52a1\u5668\uff09<\/code><\/pre>\n<h2>\u4e00\u3001\u90e8\u7f72maven\u7f16\u8bd1\u73af\u5883\uff08jenkins\uff09<\/h2>\n<pre><code class=\"language-bash\">Maven\u662f\u4e00\u4e2aJava\u9879\u76ee\u7ba1\u7406\u548c\u6784\u5efa\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5b9a\u4e49\u9879\u76ee\u7ed3\u6784\u3001\u9879\u76ee\u4f9d\u8d56\uff0c\u5e76\u4f7f\u7528\u7edf\u4e00\u7684\u65b9\u5f0f\u8fdb\u884c\u81ea\u52a8\u5316\u6784\u5efa\uff0c\u662fJava\u9879\u76ee\u4e0d\u53ef\u7f3a\u5c11\u7684\u5de5\u5177\u3002<\/code><\/pre>\n<h3>1\u3001jenkins\u90e8\u7f72maven\u8f6f\u4ef6<\/h3>\n<h4>1\uff09\u4e0b\u8f7d\u5b89\u88c5\u5305<\/h4>\n<pre><code class=\"language-bash\">[root@jenkins ~]# cd \/opt\/\n[root@jenkins \/opt]# wget https:\/\/mirrors.aliyun.com\/apache\/maven\/maven-3\/3.6.3\/binaries\/apache-maven-3.6.3-bin.tar.gz<\/code><\/pre>\n<h4>2\uff09\u89e3\u538b<\/h4>\n<pre><code class=\"language-bash\">[root@jenkins \/opt]# tar -xf apache-maven-3.6.3-bin.tar.gz -C \/usr\/local\/<\/code><\/pre>\n<h4>3\uff09\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h4>\n<pre><code class=\"language-bash\">[root@jenkins \/opt]# vim \/etc\/profile.d\/maven.sh\nexport MAVEN_HOME=\/usr\/local\/apache-maven-3.6.3\nexport PATH=$MAVEN_HOME\/bin:$PATH\n\n# \u5237\u65b0\n[root@localhost opt]# source \/etc\/profile<\/code><\/pre>\n<h4>4\uff09\u5b89\u88c5JDK<\/h4>\n<pre><code class=\"language-bash\">[root@jenkins \/opt]# yum install java-1.8.0-openjdk* -y<\/code><\/pre>\n<h4>5\uff09\u68c0\u67e5<\/h4>\n<pre><code class=\"language-bash\">[root@jenkins \/opt]# mvn --version\nApache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)\nMaven home: \/usr\/local\/apache-maven-3.6.3\nJava version: 1.8.0_282, vendor: Red Hat, Inc., runtime: \/usr\/lib\/jvm\/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64\/jre\nDefault locale: en_US, platform encoding: UTF-8\nOS name: &quot;linux&quot;, version: &quot;3.10.0-1160.el7.x86_64&quot;, arch: &quot;amd64&quot;, family: &quot;unix&quot;<\/code><\/pre>\n<h3>2\u3001\u914d\u7f6ejenkins + maven<\/h3>\n<h4>1\uff09\u914d\u7f6eJDK<\/h4>\n<p><\/p><div id=\"rml_readmorelogin_placeholder\" style=\"position:relative;\"><div id=\"rml_fade_content\" style=\"position: absolute;\r\ntop:-10em;\r\nwidth:100%;\r\nheight:10em;\r\nbackground: -webkit-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -moz-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -o-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -ms-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\"><\/div><div class=\"wpf-controller aru_rml_from_in_post\" style=\"background-color:#eeeeee;border:5px solid #cce6ff;\" id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><h2 id=\"Header\">\u67e5\u770b\u66f4\u591a<\/h2><div id=\"Message\"><p>\u8054\u7cfb\u7ba1\u7406\u5458\u5fae\u4fe1tutu19192010\uff0c\u6ce8\u518c\u8d26\u53f7<\/p>\n<\/div><div id=\"StatusBarHeader\"><\/div><form id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><input name=\"post_id\" value=\"1539\" type=\"hidden\"\/><input name=\"_init_callback\" value=\"InitLogin\" type=\"hidden\"\/><input name=\"post_id\" value=\"1539\" type=\"hidden\"\/><input name=\"rt_ype\" value=\"1\" type=\"hidden\"\/><input name=\"nonce\" value=\"90bb1a92ef\" type=\"hidden\"\/><input name=\"_wpnonce\" value=\"c9a2cc77e1\" type=\"hidden\"\/><input name=\"_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_proxy_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_view\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginView\" type=\"hidden\"\/><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\" width=\"400px\"><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Username:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"username\" value=\"\" type=\"text\"\/><\/td><\/tr><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Password:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"password\" value=\"\" type=\"password\"\/><\/td><\/tr><\/tbody><\/table><p class=\"wpf-table-placeholder submit\"><button class=\"wp_plugin_framework_ajax_button\" type=\"button\" style=\"background-color:#4D90FE;;color:#ffffff;;border:1px solid #3079ed;\" name=\"_event\" value=\"ButtonLogin\">Log in<\/button><\/p><\/td><td class=\"wpf-table-placeholder-input\"><\/td><\/tr><\/tbody><\/table><\/form><div id=\"ButtonStartRegister\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=register\">Register<\/a><\/div><div id=\"Link1\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=lostpassword\">Forgotten username or password?<\/a><\/div><div id=\"StatusBarFooter\"><\/div><\/div><\/div><div id=aru_remaining_content><\/div>","protected":false},"excerpt":{"rendered":"<p>jenkins\u90e8\u7f72tomcat maven\u7f16\u8bd1\u73af\u5883\uff08jenkins\u670d\u52a1\u5668\uff09 \u8fd0\u884c\u73af\u5883\uff08web\u670d\u52a1\u5668\uff09 \u4e00\u3001\u90e8\u7f72 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[175],"tags":[21,178,179,181,182,183,19,22,180,20],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1539"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1539"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1539\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/1547"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}