{"id":36346,"date":"2024-11-26T15:56:43","date_gmt":"2024-11-26T07:56:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/36346\/"},"modified":"2024-11-26T15:56:43","modified_gmt":"2024-11-26T07:56:43","slug":"maven-%e5%88%9b%e5%bb%ba-web-%e5%b7%a5%e7%a8%8b%e9%81%87%e5%88%b0%e6%8a%a5%e9%94%99%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/36346\/","title":{"rendered":"Maven \u521b\u5efa Web \u5de5\u7a0b\u9047\u5230\u62a5\u9519\u600e\u4e48\u529e\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173111238618698.jpg\" class=\"aligncenter\" title=\"Maven \u521b\u5efa Web \u5de5\u7a0b\u9047\u5230\u62a5\u9519\u600e\u4e48\u529e\uff1f\u63d2\u56fe\" alt=\"Maven \u521b\u5efa Web \u5de5\u7a0b\u9047\u5230\u62a5\u9519\u600e\u4e48\u529e\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>Maven \u521b\u5efa Web \u5de5\u7a0b\u9047\u5230\u7684\u62a5\u9519\u53ca\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 Maven \u521b\u5efa Web \u5de5\u7a0b\u65f6\uff0c\u7ecf\u5e38\u4f1a\u9047\u5230\u4e00\u4e9b\u9519\u8bef\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li><strong>\u521b\u5efa Web \u5de5\u7a0b\u5931\u8d25<\/strong><\/li>\n<li><strong>\u65e0\u6cd5\u5bfc\u5165 jar \u5305<\/strong><\/li>\n<li><strong>Maven \u62a5\u9519<\/strong><\/li>\n<\/ul>\n<p>\u672c\u6587\u5c06\u9488\u5bf9\u8fd9\u4e9b\u9519\u8bef\u8fdb\u884c\u5206\u6790\u5e76\u63d0\u4f9b\u76f8\u5e94\u7684\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<p><strong>1. \u521b\u5efa Web \u5de5\u7a0b\u5931\u8d25<\/strong><\/p>\n<p>\u5982\u679c\u5728\u521b\u5efa Web \u5de5\u7a0b\u65f6\u9047\u5230\u65e0\u6cd5\u521b\u5efa\u6210\u529f\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u67e5\u770b Maven \u62a5\u9519\u4fe1\u606f\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e9b\u4fe1\u606f\u4f1a\u8bf4\u660e\u5bfc\u81f4\u5931\u8d25\u7684\u5177\u4f53\u539f\u56e0\u3002\u5e38\u89c1\u7684\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\u7f3a\u5c11 Maven \u63d2\u4ef6<\/li>\n<li>\u63d2\u4ef6\u7248\u672c\u4e0d\u6b63\u786e<\/li>\n<li>\u7f51\u7edc\u8fde\u63a5\u95ee\u9898<\/li>\n<\/ul>\n<p><strong>2. \u65e0\u6cd5\u5bfc\u5165 jar \u5305<\/strong><\/p>\n<p>\u5728 Web \u5de5\u7a0b\u4e2d\u5bfc\u5165 jar \u5305\u65f6\uff0c\u9700\u8981\u786e\u4fdd\uff1a<\/p>\n<ul>\n<li>jar \u5305\u5b58\u5728\u4e2d<\/li>\n<li>\u5728 pom.xml \u6587\u4ef6\u4e2d\u6b63\u786e\u914d\u7f6e\u4e86\u4f9d\u8d56<\/li>\n<li>\u4f7f\u7528\u4e86\u6b63\u786e\u7684 jar \u5305\u7248\u672c<\/li>\n<\/ul>\n<p><strong>3. Maven \u62a5\u9519<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 Maven \u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u7c7b\u578b\u7684\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u89e3\u51b3\u8fd9\u4e9b\u9519\u8bef\uff1a<\/p>\n<ul>\n<li>\u68c0\u67e5 Maven \u8bbe\u7f6e\uff0c\u786e\u4fdd\u4f7f\u7528\u7684\u662f\u6b63\u786e\u7684\u8fdc\u7a0b\u4ed3\u5e93<\/li>\n<li>\u66f4\u6362 jar \u5305\u7248\u672c\uff0c\u5c1d\u8bd5\u4f7f\u7528\u66f4\u4f4e\u6216\u66f4\u9ad8\u7684\u7248\u672c<\/li>\n<li>\u5347\u7ea7\u6216\u964d\u7ea7 Maven \u53ca\u76f8\u5173\u63d2\u4ef6<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u5177\u4f53\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li> <strong>\u5220\u9664\u4e0d\u5fc5\u8981\u7684\u63d2\u4ef6\uff1a<\/strong>\u5728 pom.xml \u6587\u4ef6\u4e2d\u5220\u9664 org..maven.plugins:maven-deploy-plugin \u4f9d\u8d56\uff0c\u8be5\u63d2\u4ef6\u901a\u5e38\u5728\u4f7f\u7528 archetype \u521b\u5efa Maven \u9879\u76ee\u65f6\u81ea\u52a8\u5f15\u5165\uff0c\u5982\u679c\u4e0d\u9700\u8981\u90e8\u7f72\u5230\u79c1\u670d\uff0c\u53ef\u76f4\u63a5\u5220\u9664<\/li>\n<li> <strong>\u68c0\u67e5\u8fdc\u7a0b\u4ed3\u5e93\uff1a<\/strong>\u6253\u5f00 Maven \u7684 settings \u6587\u4ef6\uff0c\u67e5\u770b\u8fdc\u7a0b\u4ed3\u5e93\u662f\u5426\u9ed8\u8ba4\u6307\u5411\u4e2d\u592e\u4ed3\u5e93\uff0c\u5982\u679c\u6307\u5411\u5176\u4ed6\u955c\u50cf\uff0c\u53ef\u5728\u6d4f\u89c8\u5668\u4e2d\u641c\u7d22\u62a5\u9519\u7684 jar \u5305<\/li>\n<li> <strong>\u66f4\u6362 jar \u5305\u7248\u672c\uff1a<\/strong>\u5c1d\u8bd5\u4f7f\u7528\u4e0d\u540c\u7684 jar \u5305\u7248\u672c\uff0c\u4ee5\u89e3\u51b3\u517c\u5bb9\u6027\u95ee\u9898<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fMaven \u521b\u5efa Web \u5de5\u7a0b\u9047\u5230\u62a5\u9519\u600e\u4e48\u529e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maven \u521b\u5efa Web \u5de5\u7a0b\u9047\u5230\u7684\u62a5\u9519\u53ca\u89e3\u51b3\u65b9\u6cd5 \u5728\u4f7f\u7528 Maven \u521b\u5efa Web \u5de5\u7a0b\u65f6\uff0c\u7ecf\u5e38\u4f1a\u9047\u5230\u4e00\u4e9b\u9519\u8bef\uff0c\u4f8b\u5982\uff1a \u521b\u5efa Web \u5de5\u7a0b\u5931\u8d25 \u65e0\u6cd5\u5bfc\u5165 jar \u5305 Maven \u62a5\u9519 \u672c\u6587\u5c06\u9488\u5bf9\u8fd9\u4e9b\u9519\u8bef\u8fdb\u884c\u5206\u6790\u5e76\u63d0\u4f9b\u76f8\u5e94\u7684\u89e3\u51b3\u65b9\u6cd5\uff1a 1. \u521b\u5efa Web \u5de5\u7a0b\u5931\u8d25 \u5982\u679c\u5728\u521b\u5efa Web \u5de5\u7a0b\u65f6\u9047\u5230\u65e0\u6cd5\u521b\u5efa\u6210\u529f\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u67e5\u770b Maven \u62a5\u9519\u4fe1\u606f\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e9b\u4fe1\u606f\u4f1a\u8bf4\u660e\u5bfc\u81f4\u5931\u8d25\u7684\u5177\u4f53\u539f\u56e0\u3002\u5e38\u89c1\u7684\u539f\u56e0\u5305\u62ec\uff1a \u7f3a\u5c11 Maven \u63d2\u4ef6 \u63d2\u4ef6\u7248\u672c\u4e0d\u6b63\u786e \u7f51\u7edc\u8fde\u63a5\u95ee\u9898 2. \u65e0\u6cd5\u5bfc\u5165 jar \u5305 \u5728 Web \u5de5\u7a0b\u4e2d\u5bfc\u5165 jar \u5305\u65f6\uff0c\u9700\u8981\u786e\u4fdd\uff1a jar \u5305\u5b58\u5728\u4e2d \u5728 pom.xml \u6587\u4ef6\u4e2d\u6b63\u786e\u914d\u7f6e\u4e86\u4f9d\u8d56 \u4f7f\u7528\u4e86\u6b63\u786e\u7684 jar \u5305\u7248\u672c 3. Maven \u62a5\u9519 \u5728\u4f7f\u7528 Maven \u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u7c7b\u578b\u7684\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u89e3\u51b3\u8fd9\u4e9b\u9519\u8bef\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-36346","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=36346"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36346\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=36346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=36346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=36346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}