{"id":9741,"date":"2023-03-07T16:36:32","date_gmt":"2023-03-07T08:36:32","guid":{"rendered":"http:\/\/123.57.164.21\/?p=9741"},"modified":"2023-03-09T15:12:09","modified_gmt":"2023-03-09T07:12:09","slug":"maven%e4%bb%93%e5%ba%93%e6%b8%85%e7%90%86%e7%bc%93%e5%ad%98%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=9741","title":{"rendered":"maven\u4ed3\u5e93\u6e05\u7406\u7f13\u5b58\u6587\u4ef6"},"content":{"rendered":"\n<p><strong>1.\u80cc\u666f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u4f7f\u7528\u8fc7<a rel=\"noreferrer noopener\" href=\"https:\/\/so.csdn.net\/so\/search?q=maven&amp;spm=1001.2101.3001.7020\" target=\"_blank\">maven<\/a>\u7684\u4eba\u90fd\u5e94\u8be5\u77e5\u9053\uff0cmaven\u4e0b\u8f7djar\u5305\u65f6\uff0c\u6709\u65f6\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\uff0c\u4f1a\u9020\u6210\u6587\u672c\u672a\u4e0b\u8f7d\u5b8c\u6bd5\uff0c\u6b8b\u7559.lastUpdated\u6587\u4ef6\uff0c\u4e0b\u6b21\u4f7f\u7528pom\u65f6\uff0c\u7531\u4e8e\u8be5jar\u5305\u5df2\u88abcached\u7f13\u5b58\uff0c\u53c8\u65e0\u6cd5\u66f4\u65b0\uff1b\u7279\u522b\u662f\u6b8b\u7559\u7684\u6587\u4ef6\u6bd4\u8f83\u591a\u65f6\uff0c\u4e00\u4e2a\u4e2a\u624b\u52a8\u53bb\u5220\u66f4\u662f\u8d39\u65f6\uff1b<\/p>\n\n\n\n<p><strong>2.\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u4f7f\u7528dos\u6279\u5904\u7406\u811a\u672c\u53bb\u67e5\u627emaven\u4ed3\u5e93\u4e0b\u7684\u6240\u6709.lastUpdated\u6587\u4ef6\uff0c\u5e76\u5220\u9664\u8be5\u6587\u4ef6\u6240\u5728\u7684\u6587\u4ef6\u5939\u3002\u5220\u9664\u5b8c\u6bd5\u540e\uff0c\u4e0b\u6b21\u7f51\u7edc\u6b63\u5e38\u65f6\u4e0b\u8f7djar\u5305\u5c31\u6ca1\u95ee\u9898\u4e86\u3002\u5373\u4f7f\u5220\u9519\u4e86\u51e0\u4e2a\u6587\u4ef6\u5939\uff08\u5176\u4e2d\u6709\u4e2a\u786e\u8ba4\u6b65\u9aa4\uff0c\u5982\u679c\u62c5\u5fc3\u5220\u9664\u9519\u4e86\uff0c\u53ef\u4ee5\u67e5\u770blastUpdated.txt\uff0c\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u5b58\u50a8\u7740\u6240\u6709.lastUpdated\u76f8\u5173\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u540e\u7eed\u6839\u636e\u8fd9\u4e2a\u8fdb\u884c\u5220\u9664\uff09\uff0c\u4e5f\u4e0d\u4f1a\u6709\u5173\u7cfb\uff0cmaven\u4f1a\u91cd\u65b0\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p><strong>3.\u811a\u672c\u6587\u4ef6<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5728windows\u4e0b\u65b0\u5efa\u4e00\u4e2a.bat\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b,\u4fdd\u5b58\u540e\u4f7f\u7528\u7ba1\u7406\u5458\u6743\u9650\u8fd0\u884c\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@echo off\n@rem \u5207\u6362\u5230\u8981\u5220\u9664\u7684\u8def\u5f84\u4e0b\n\nset \/p input=\u8bf7\u8f93\u5165maven\u4ed3\u5e93\u8def\u5f84\uff1a\nset mavenDir=%input%\n\n%mavenDir:~0,1%:\ncd %mavenDir%\n\necho \u5728%mavenDir%\u8def\u5f84\u4e0b\u5df2\u67e5\u627e\u5230\u6240\u6709\u4ee5.lastUpdated\u7ed3\u5c3e\u7684\u6587\u4ef6\ndir \/s\/b .\\*.lastUpdated>lastUpdated.txt\n\necho \u67e5\u627e\u5230\u7684\u6587\u4ef6\u4fe1\u606f\uff1a%mavenDir%\\lastUpdated.txt\n\necho \u8bf7\u67e5\u770blastUpdated.txt\uff0c\u786e\u8ba4\u662f\u5426\u5220\u9664.lastUpdated\u6587\u4ef6\u6240\u6709\u76ee\u5f55\uff0c\u6309\u4efb\u610f\u952e\u786e\u8ba4\u5220\u9664.\npause>null\n\n@rem \u904d\u5386lastUpdated.txt\u6587\u4ef6\uff0c\u5220\u9664\u6587\u4ef6\u6240\u5728\u76ee\u5f55\nfor \/f \"delims=\" %%i in (lastUpdated.txt) do (\n   echo \u6587\u4ef6\u8bb0\u5f55:%%i\n   rd \/s \/q %%~dpi\n   echo \u5220\u9664\u76ee\u5f55:%%~dpi\n)\n\necho \u6210\u529f\u5220\u9664\u6240\u6709.lastUpdated\u6587\u4ef6\u6240\u5728\u6587\u4ef6\u5939!\n\ndel lastUpdated.txt\necho \u5df2\u6e05\u9664\u4e34\u65f6\u6587\u4ef6%mavenDir%\\lastUpdated.txt\npause>null\ndel null<\/pre>\n\n\n\n<p>windows\u811a\u672c2<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    # windows\u811a\u672c\n    @echo off\n    rem create by NettQun\n     \n    rem \u8fd9\u91cc\u5199\u4f60\u7684\u4ed3\u5e93\u8def\u5f84\n    set REPOSITORY_PATH=D:\\Java\\maven-repository\\maven-aliyun\\repository\n    rem \u6b63\u5728\u641c\u7d22...\n    for \/f \"delims=\" %%i in ('dir \/b \/s \"%REPOSITORY_PATH%\\*lastUpdated*\"') do (\n      echo %%i\n      del \/s \/q \"%%i\"\n    )\n    rem \u641c\u7d22\u5b8c\u6bd5\n    pause<\/pre>\n\n\n\n<p><strong>4.\u8fd0\u884c\u6548\u679c<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-97-1024x338.png\" alt=\"\" class=\"wp-image-9742\" width=\"599\" height=\"198\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-1024x338.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-300x99.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-768x254.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-830x274.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-230x76.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-350x116.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97-480x159.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-97.png 1314w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/figure><\/div>\n\n\n\n<p>lastUpdated.txt\u4f4d\u4e8emaven\u4ed3\u5e93\u6839\u76ee\u5f55\u4e0b\uff08\u547d\u4ee4\u884c\u4e2d\u4f1a\u663e\u793a\u5168\u8def\u5f84\u540d\u79f0\uff09\uff0c\u5185\u5bb9\u5927\u6982\u4e3a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-98-1024x373.png\" alt=\"\" class=\"wp-image-9743\" width=\"626\" height=\"227\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-1024x373.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-300x109.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-768x280.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-1536x560.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-230x84.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-350x128.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98-480x175.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-98.png 1958w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/figure><\/div>\n\n\n\n<p><strong>5.macOS \u6279\u91cf\u5220\u9664 maven \u672c\u5730\u4ed3\u5e93\u7684 lastUpdated \u6587\u4ef6<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">find ~\/.m2\/repository -name \"*.lastUpdated\" | xargs rm<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    # linux\u811a\u672c\n     \n    # \u8fd9\u91cc\u5199\u4f60\u7684\u4ed3\u5e93\u8def\u5f84\n    REPOSITORY_PATH=~\/Documents\/tools\/repository\n    echo \u6b63\u5728\u641c\u7d22...\n    find $REPOSITORY_PATH -name \"*lastUpdated*\" | xargs rm -fr\n    echo \u641c\u7d22\u5b8c<\/pre>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b <a rel=\"noreferrer noopener\" href=\"https:\/\/so.csdn.net\/so\/search?q=maven&amp;spm=1001.2101.3001.7020\" target=\"_blank\">maven<\/a> \u672c\u5730\u4ed3\u5e93\u7684\u6839\u76ee\u5f55\u662f <code>~\/.m2\/repository<\/code><br>lastUpdated \u6587\u4ef6\u4e00\u822c\u662f\u7f51\u4e0d\u597d\u65f6\u4e0b\u8f7d\u4ea7\u751f\u7684\u4e34\u65f6\u6587\u4ef6\uff0c\u4f46\u662f\u8fd9\u4e2a\u6587\u4ef6\u5982\u679c\u4e0d\u5220\uff0c\u90a3\u4e48\u91cd\u65b0\u4e0b\u8f7d\u5c31\u4f1a\u5931\u8d25\uff0c\u53ef\u4ee5\u914d\u4e00\u4e0b\u56fd\u5185\u7684 maven \u4ed3\u5e93\u955c\u50cf\uff0c\u4ee5\u51cf\u5c11 lastUpdated \u6587\u4ef6\u4ea7\u751f\u7684\u60c5\u51b5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u80cc\u666f \u4f7f\u7528\u8fc7maven\u7684\u4eba\u90fd\u5e94\u8be5\u77e5\u9053\uff0cmaven\u4e0b\u8f7djar\u5305\u65f6\uff0c\u6709\u65f6\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\uff0c\u4f1a\u9020\u6210\u6587\u672c\u672a\u4e0b\u8f7d\u5b8c\u6bd5\uff0c\u6b8b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9741"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9741"}],"version-history":[{"count":4,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9741\/revisions"}],"predecessor-version":[{"id":9792,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9741\/revisions\/9792"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}