{"id":8557,"date":"2024-02-06T21:41:09","date_gmt":"2024-02-06T12:41:09","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8557"},"modified":"2024-02-06T18:30:14","modified_gmt":"2024-02-06T09:30:14","slug":"nexus-repository-%ec%82%ac%ec%9a%a9%ed%95%98%ea%b8%b0-with-spring-boot","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8557","title":{"rendered":"\ub0b4\ubd80\ub9dd\uc5d0\uc11c Nexus Repository \uc0ac\uc6a9\ud558\uae30 (gradle \ud504\ub85c\uc81d\ud2b8)"},"content":{"rendered":"<h1>\ub0b4\ubd80\ub9dd\uc5d0\uc11c Nexus Repository \uc0ac\uc6a9\ud558\uae30 (gradle \ud504\ub85c\uc81d\ud2b8)<\/h1>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8553\">\uc5ec\uae30<\/a> \ub97c \ucc38\uc870\ud558\uc5ec Nexus \uac00 \uc124\uce58\ub418\uc5b4 \uc788\ub294 \uac83\uc73c\ub85c \uac00\uc815\ud569\ub2c8\ub2e4.<\/p>\n<h2>\uc8fc\uc758\uc0ac\ud56d(gradle \ud504\ub85c\uc81d\ud2b8)<\/h2>\n<p>maven \ud504\ub85c\uc81d\ud2b8\ub294 \uc678\ubd80\ub9dd\uc5d0 \uc811\uc18d\ud574\uc11c \ube4c\ub4dc\ud558\uba74,<br \/>\n~\/.m2\/repository \uc5d0 \uc758\uc874\uc131\uc774 \uae54\ub054\ud558\uac8c \ub2e4\uc6b4\ubc1b\uc544\uc9d1\ub2c8\ub2e4.<br \/>\n\ud558\uc9c0\ub9cc gradle \ud504\ub85c\uc81d\ud2b8\ub294 \uc774\uc0c1\ud55c \ud30c\uc77c\ud615\uc2dd\uc73c\ub85c \uce90\uc2dc\uac00 \uc774\ub8e8\uc5b4\uc9c0\uae30\uc5d0,<br \/>\n\ub3d9\uc77c\ud55c \ubc29\ubc95\uc73c\ub85c \ubcf5\uc0ac\ud574 \uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub530\ub77c\uc11c \uc544\ub798 \ubc29\uc2dd\uc73c\ub85c \uc758\uc874\uc131\uc744 \ub2e4\uc6b4\ubc1b\uc544\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p>gradle \ud504\ub85c\uc81d\ud2b8 \ube4c\ub4dc\ud558\uae30<\/p>\n<p>\uc774\ub807\uac8c \ud574\uc11c gradle-wrapper.jar \ub97c \ud504\ub85c\uc81d\ud2b8\uc5d0 \ucd94\uac00\uc2dc\ud0b5\ub2c8\ub2e4.<br \/>\ngradle \uc790\uccb4\uac00 \uc5c6\uc73c\uba74 \ube4c\ub4dc\ub97c \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p>maven \ud504\ub85c\uc81d\ud2b8 \uc0dd\uc131 \ud6c4 \uc758\uc874\uc131\uc744 \ub2e4\uc6b4\ubc1b\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc774\ud6c4\uc5d0 \uc544\ub798 \ub0b4\uc6a9\uc73c\ub85c \uc9c4\ud589\ud558\uba74 \ub429\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>\ud3d0\uc1e0\ub9dd\uc5d0\uc11c Nexus \uc11c\ubc84\ub9cc \uc678\ubd80\ub9dd \uc811\uc18d\uc774 \ud5c8\uc6a9\ub41c \uacbd\uc6b0<\/h2>\n<p>Nexus3 \uc5d0\ub294 \ub514\ud3f4\ud2b8\ub85c maven \ub9ac\ud3ec\uac00 \uc124\uc815\ub418\uc5b4 \uc788\uc73c\ubbc0\ub85c \ubcc4\ub3c4\uc758 \uc124\uc815\uc740 \ud544\uc694\uc5c6\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc678\ubd80\ub9dd \uc811\uc18d \uc124\uc815\uc5d0 <a href=\"https:\/\/repo1.maven.org\/maven2\/\">https:\/\/repo1.maven.org\/maven2\/<\/a> \ub97c \ucd94\uac00\ud574\uc90d\ub2c8\ub2e4.<\/p>\n<p>\uc544\ub798 \uc124\uc815\uc744 \uc218\uc815\ud574 \uc8fc\ub294 \uac83\uc73c\ub85c \ub05d\ub0a9\ub2c8\ub2e4.<\/p>\n<p>~\/.gradle\/gradle.properties<\/p>\n<pre><code class=\"language-bash\">nexusUsername=nexus\nnexusPassword=nexus<\/code><\/pre>\n<p>build.gradle<\/p>\n<pre><code class=\"language-gradle\">repositories {\n    \/\/ mavenCentral()\n    maven {\n        url &quot;http:\/\/localhost:8081\/repository\/maven-central\/&quot; \/\/ Nexus repository url\n        allowInsecureProtocol true \/\/ http \ud1b5\uc2e0\n        \/\/ ~\/.gradle\/gradle.properties should be configured!\n        credentials {\n            username nexusUsername\n            password nexusPassword\n        }\n    }\n}<\/code><\/pre>\n<h2>\uc644\uc804 \ud3d0\uc1c4\ub9dd\uc778 \uacbd\uc6b0<\/h2>\n<p><a href=\"https:\/\/allonsyit.tistory.com\/119\">\ucc38\uc870<\/a><\/p>\n<h3>\uc791\uc5c5\ud750\ub984<\/h3>\n<ol>\n<li>\uc678\ubd80\ub9dd\uc5d0\uc11c \ud504\ub85c\uc81d\ud2b8\ub97c \uc2e4\ud589\uc2dc\ud0a4\uace0 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \ub2e4\uc6b4\ubc1b\ub294\ub2e4.<\/li>\n<li>~\/.m2\/repository \ud3f4\ub354\ub97c \uc555\ucd95\ud574 \ub0b4\ubd80\ub9dd\uc73c\ub85c \ubc18\uc785\ud55c\ub2e4.<\/li>\n<li>\uc544\ub798 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc2e4\ud589\ud574\uc11c Nexus \uc11c\ubc84\uc5d0 \uc5c5\ub85c\ub4dc \ud55c\ub2e4.<\/li>\n<\/ol>\n<p>mavenimport.sh<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\n\n# copy and run this script to the root of the repository directory containing files\n# this script attempts to exclude uploading itself explicitly so the script name is important\n# Get command line params\nwhile getopts &quot;:r:u:p:&quot; opt; do\n    case $opt in\n        r) REPO_URL=&quot;$OPTARG&quot;\n        ;;\n        u) USERNAME=&quot;$OPTARG&quot;\n        ;;\n        p) PASSWORD=&quot;$OPTARG&quot;\n        ;;\n    esac\ndone\n\nfind . -type f -not -path &#039;.\/mavenimport\\.sh*&#039; -not -path &#039;*\/\\.*&#039; -not -path &#039;*\/\\^archetype\\-catalog\\.xml*&#039; -not -path &#039;*\/\\^maven\\-metadata\\-local*\\.xml&#039; -not -path &#039;*\/\\^maven\\-metadata\\-deployment*\\.xml&#039; | sed &quot;s|^\\.\/||&quot; | xargs -I &#039;{}&#039; curl -u &quot;$USERNAME:$PASSWORD&quot; -X PUT -v -T {} ${REPO_URL}\/{} ;<\/code><\/pre>\n<pre><code class=\"language-bash\">.\/mavenimport.sh -u \ub125\uc11c\uc2a4\uc544\uc774\ub514 -p \ub125\uc11c\uc2a4\ube44\ubc00\ubc88\ud638 -r \ub125\uc11c\uc2a4\uc800\uc7a5\uc18c\uc8fc\uc18c<\/code><\/pre>\n<h3>\ub9ac\ud3ec \uc0dd\uc131<\/h3>\n<p>\ub125\uc11c\uc2a4 \ub9ac\ud3ec\ub97c \uc0dd\uc131\ud574 \uc900\ub2e4.<br \/>\ntype \uc740 maven2(hosted) \ub97c \uc120\ud0dd\ud574 \uc900\ub2e4.<\/p>\n<h3>~\/.m2\/repository \ubc18\uc785\ud558\uae30<\/h3>\n<p>\uc678\ubd80\ub9dd\uc5d0\uc11c \ud504\ub85c\uc81d\ud2b8\ub97c \ube4c\ub4dc\ud558\uace0 ~\/.m2\/repository \ub97c \uc555\ucd95\ud574\uc11c \ub0b4\ubd80\ub9dd\uc73c\ub85c \uc62e\uaca8\uc628\ub2e4.<\/p>\n<h3>\ub125\uc11c\uc2a4\uc5d0 \uc5c5\ub85c\ub4dc<\/h3>\n<p>mavenimport.sh \ub97c \uc2e4\ud589\ud574\uc11c \ub125\uc11c\uc2a4 \uc11c\ubc84\uc5d0 \uc5c5\ub85c\ub4dc\ud55c\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ub0b4\ubd80\ub9dd\uc5d0\uc11c Nexus Repository \uc0ac\uc6a9\ud558\uae30 (gradle \ud504\ub85c\uc81d\ud2b8) \uc5ec\uae30 \ub97c \ucc38\uc870\ud558\uc5ec Nexus \uac00 \uc124\uce58\ub418\uc5b4 \uc788\ub294 \uac83\uc73c\ub85c \uac00\uc815\ud569\ub2c8\ub2e4. \uc8fc\uc758\uc0ac\ud56d(gradle \ud504\ub85c\uc81d\ud2b8) maven \ud504\ub85c\uc81d\ud2b8\ub294 \uc678\ubd80\ub9dd\uc5d0 \uc811\uc18d\ud574\uc11c \ube4c\ub4dc\ud558\uba74, ~\/.m2\/repository \uc5d0 \uc758\uc874\uc131\uc774 \uae54\ub054\ud558\uac8c \ub2e4\uc6b4\ubc1b\uc544\uc9d1\ub2c8\ub2e4. \ud558\uc9c0\ub9cc gradle \ud504\ub85c\uc81d\ud2b8\ub294 \uc774\uc0c1\ud55c \ud30c\uc77c\ud615\uc2dd\uc73c\ub85c \uce90\uc2dc\uac00 \uc774\ub8e8\uc5b4\uc9c0\uae30\uc5d0, \ub3d9\uc77c\ud55c \ubc29\ubc95\uc73c\ub85c \ubcf5\uc0ac\ud574 \uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub530\ub77c\uc11c \uc544\ub798 \ubc29\uc2dd\uc73c\ub85c \uc758\uc874\uc131\uc744 \ub2e4\uc6b4\ubc1b\uc544\uc57c \ud569\ub2c8\ub2e4. gradle \ud504\ub85c\uc81d\ud2b8 \ube4c\ub4dc\ud558\uae30 \uc774\ub807\uac8c \ud574\uc11c gradle-wrapper.jar \ub97c \ud504\ub85c\uc81d\ud2b8\uc5d0 \ucd94\uac00\uc2dc\ud0b5\ub2c8\ub2e4.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8557\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-8557","post","type-post","status-publish","format-standard","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/8557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8557"}],"version-history":[{"count":18,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/8557\/revisions"}],"predecessor-version":[{"id":8578,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/8557\/revisions\/8578"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}