{"id":627,"date":"2020-03-10T16:19:55","date_gmt":"2020-03-10T16:19:55","guid":{"rendered":"https:\/\/www.haoyuan.info\/?p=627"},"modified":"2020-03-10T16:19:55","modified_gmt":"2020-03-10T16:19:55","slug":"%e4%b8%bamaven%e6%9b%bf%e6%8d%a2%e9%98%bf%e9%87%8c%e4%ba%91%e9%95%9c%e5%83%8f","status":"publish","type":"post","link":"https:\/\/haoyuan.info\/?p=627","title":{"rendered":"\u4e3aMaven\u66ff\u6362\u963f\u91cc\u4e91\u955c\u50cf"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u8fd9\u6bb5\u65f6\u95f4\u9700\u8981\u641e\u4e00\u641eDubbo\u7684\u5fae\u670d\u52a1\u5b9e\u9a8c\uff0c\u56e0\u6b64\u9700\u8981\u641e\u4e00\u641eJava\u3002\u7136\u800cMaven\u62c9\u53d6\u4f9d\u8d56\u7684\u901f\u5ea6\u4ee4\u4eba\u5d29\u6e83\uff0c\u56e0\u6b64\u8003\u8651\u66ff\u6362Maven\u4e3a\u963f\u91cc\u4e91\u7684\u6e90\uff0c\u63d0\u5347\u62c9\u53d6\u4f9d\u8d56\u7684\u901f\u5ea6\u3002<\/p>\n<h2>\u73af\u5883<\/h2>\n<p>OS: macOS 10.15.3<br \/>\nshell: zsh<br \/>\n\u5df2\u5b89\u88c5Apache maven<\/p>\n<h2>\u6b63\u7247<\/h2>\n<ol>\n<li>\u542f\u52a8terminal, \u6267\u884c<\/li>\n<\/ol>\n<pre><code class=\"language-bash \">cd ~\/.m2\/\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u5728\u8be5\u76ee\u5f55\u521b\u5efa<code>settings.xml<\/code>\u6587\u4ef6\uff0c\u6587\u4ef6\u5185\u5bb9\u4e3a<\/li>\n<\/ol>\n<pre data-language=XML><code class=\"language-markup \">&lt;settings xmlns=\"http:\/\/maven.apache.org\/SETTINGS\/1.0.0\"\n  xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n  xsi:schemaLocation=\"http:\/\/maven.apache.org\/SETTINGS\/1.0.0\n                      http:\/\/maven.apache.org\/xsd\/settings-1.0.0.xsd\"&gt;\n  &lt;localRepository\/&gt;\n  &lt;interactiveMode\/&gt;\n  &lt;usePluginRegistry\/&gt;\n  &lt;offline\/&gt;\n  &lt;pluginGroups\/&gt;\n  &lt;servers\/&gt;\n  &lt;mirrors&gt;\n    &lt;mirror&gt;\n     &lt;id&gt;aliyunmaven&lt;\/id&gt;\n     &lt;mirrorOf&gt;*&lt;\/mirrorOf&gt;\n     &lt;name&gt;\u963f\u91cc\u4e91\u516c\u5171\u4ed3\u5e93&lt;\/name&gt;\n     &lt;url&gt;https:\/\/maven.aliyun.com\/repository\/public&lt;\/url&gt;\n    &lt;\/mirror&gt;\n     &lt;mirror&gt;\n     &lt;id&gt;aliyunmaven&lt;\/id&gt;\n     &lt;mirrorOf&gt;*&lt;\/mirrorOf&gt;\n     &lt;name&gt;\u963f\u91cc\u4e91\u8c37\u6b4c\u4ed3\u5e93&lt;\/name&gt;\n     &lt;url&gt;https:\/\/maven.aliyun.com\/repository\/google&lt;\/url&gt;\n    &lt;\/mirror&gt;\n    &lt;mirror&gt;\n     &lt;id&gt;aliyunmaven&lt;\/id&gt;\n     &lt;mirrorOf&gt;*&lt;\/mirrorOf&gt;\n     &lt;name&gt;\u963f\u91cc\u4e91\u963f\u5e15\u5947\u4ed3\u5e93&lt;\/name&gt;\n     &lt;url&gt;https:\/\/maven.aliyun.com\/repository\/apache-snapshots&lt;\/url&gt;\n    &lt;\/mirror&gt;\n    &lt;mirror&gt;\n     &lt;id&gt;aliyunmaven&lt;\/id&gt;\n     &lt;mirrorOf&gt;*&lt;\/mirrorOf&gt;\n     &lt;name&gt;\u963f\u91cc\u4e91spring\u4ed3\u5e93&lt;\/name&gt;\n     &lt;url&gt;https:\/\/maven.aliyun.com\/repository\/spring&lt;\/url&gt;\n    &lt;\/mirror&gt;\n    &lt;mirror&gt;\n     &lt;id&gt;aliyunmaven&lt;\/id&gt;\n     &lt;mirrorOf&gt;*&lt;\/mirrorOf&gt;\n     &lt;name&gt;\u963f\u91cc\u4e91spring\u63d2\u4ef6\u4ed3\u5e93&lt;\/name&gt;\n     &lt;url&gt;https:\/\/maven.aliyun.com\/repository\/spring-plugin&lt;\/url&gt;\n    &lt;\/mirror&gt;\n  &lt;\/mirrors&gt;\n  &lt;proxies\/&gt;\n  &lt;profiles\/&gt;\n  &lt;activeProfiles\/&gt;\n&lt;\/settings&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u8fd9\u6bb5\u65f6\u95f4\u9700\u8981\u641e\u4e00\u641eDubbo\u7684\u5fae\u670d\u52a1\u5b9e\u9a8c\uff0c\u56e0\u6b64\u9700\u8981\u641e\u4e00\u641eJava\u3002\u7136\u800cMaven\u62c9\u53d6\u4f9d\u8d56\u7684\u901f\u5ea6\u4ee4\u4eba\u5d29\u6e83\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[70],"tags":[29,71],"class_list":["post-627","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-maven"],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8UC2c-a7","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/haoyuan.info\/index.php?rest_route=\/wp\/v2\/posts\/627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haoyuan.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haoyuan.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haoyuan.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haoyuan.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=627"}],"version-history":[{"count":0,"href":"https:\/\/haoyuan.info\/index.php?rest_route=\/wp\/v2\/posts\/627\/revisions"}],"wp:attachment":[{"href":"https:\/\/haoyuan.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haoyuan.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haoyuan.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}