nexus-unpack-plugin을 이용한 File upload
NEXUS Server
[ec2-user@ip-10-0-0-20 plugin-repository]$ pwd /sw/nexus/nexus/WEB-INF/plugin-repository [ec2-user@ip-10-0-0-20 plugin-repository]$ wget https://repo1.maven.org/maven2/org/sonatype/nexus/plugins/nexus-unpack-plugin/2.11.0-02/nexus-unpack-plugin-2.11.0-02-bundle.zip --2017-10-12 06:49:28-- https://repo1.maven.org/maven2/org/sonatype/nexus/plugins/nexus-unpack-plugin/2.11.0-02/nexus-unpack-plugin-2.11.0-02-bundle.zip Resolving repo1.maven.org (repo1.maven.org)... 151.101.52.209 Connecting to repo1.maven.org (repo1.maven.org)|151.101.52.209|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 86480 (84K) [application/zip] Saving to: 쁭exus-unpack-plugin-2.11.0-02-bundle.zip nexus-unpack-plugin-2.11.0-02- 100%[====================================================>] 84.45K 204KB/s in 0.4s 2017-10-12 06:49:30 (204 KB/s) - 쁭exus-unpack-plugin-2.11.0-02-bundle.zipsaved [86480/86480] [ec2-user@ip-10-0-0-20 plugin-repository]$ ll total 208 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-analytics-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-archetype-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-atlas-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-capabilities-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-content-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-crypto-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-groovy-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-h2-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-healthcheck-oss-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-indexer-lucene-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-kazuki-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-ldap-realm-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-logging-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-lvo-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-maven-bridge-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-npm-repository-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-nuget-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-outreach-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-plugin-console-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-restlet1x-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-rrb-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-ruby-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-rutauth-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-siesta-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-site-repository-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-timeline-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-ui-extjs3-plugin-2.11.0-02 -rw-rw-r-- 1 ec2-user ec2-user 86480 Nov 29 2014 nexus-unpack-plugin-2.11.0-02-bundle.zip drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-webresources-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-wonderland-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-yum-repository-plugin-2.11.0-02 [ec2-user@ip-10-0-0-20 plugin-repository]$ mv nexus-unpack-plugin-2.11.0-02-bundle.zip nexus-unpack-plugin-2.11.0-02.zip [ec2-user@ip-10-0-0-20 plugin-repository]$ unzip nexus-unpack-plugin-2.11.0-02.zip Archive: nexus-unpack-plugin-2.11.0-02.zip creating: nexus-unpack-plugin-2.11.0-02/ inflating: nexus-unpack-plugin-2.11.0-02/nexus-unpack-plugin-2.11.0-02.jar creating: nexus-unpack-plugin-2.11.0-02/META-INF/ inflating: nexus-unpack-plugin-2.11.0-02/META-INF/MANIFEST.MF [ec2-user@ip-10-0-0-20 plugin-repository]$ ll total 212 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-analytics-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-archetype-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-atlas-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-capabilities-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-content-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-crypto-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-groovy-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-h2-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-healthcheck-oss-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-indexer-lucene-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-kazuki-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-ldap-realm-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-logging-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-lvo-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-maven-bridge-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-npm-repository-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-nuget-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-outreach-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-plugin-console-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-restlet1x-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-rrb-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-ruby-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-rutauth-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-siesta-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-site-repository-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-timeline-plugin-2.11.0-02 drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-ui-extjs3-plugin-2.11.0-02 drwxrwxrwx 3 ec2-user ec2-user 4096 Nov 29 2014 nexus-unpack-plugin-2.11.0-02 -rw-rw-r-- 1 ec2-user ec2-user 86480 Nov 29 2014 nexus-unpack-plugin-2.11.0-02.zip drwxr-xr-x 3 ec2-user ec2-user 4096 Aug 11 00:20 nexus-webresources-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Aug 11 00:20 nexus-wonderland-plugin-2.11.0-02 drwxr-xr-x 4 ec2-user ec2-user 4096 Nov 29 2014 nexus-yum-repository-plugin-2.11.0-02 [ec2-user@ip-10-0-0-20 plugin-repository]$ /sw/nexus/bin/nexus start Starting Nexus OSS... Started Nexus OSS. [ec2-user@ip-10-0-0-20 plugin-repository]$
file upload instance
[ec2-user@ip-10-0-0-40 ~]$ zip data.zip jdk-7u80-linux-x64.tar.gz adding: jdk-7u80-linux-x64.tar.gz (deflated 0%) [ec2-user@ip-10-0-0-40 ~]$ ll total 299464 -rw-rw-r-- 1 ec2-user ec2-user 153112854 Oct 12 06:58 data.zip -rw-rw-r-- 1 ec2-user ec2-user 153530841 Oct 12 05:32 jdk-7u80-linux-x64.tar.gz [ec2-user@ip-10-0-0-40 ~]$ curl --upload-file data.zip -u admin:admin -v http://10.0.0.20:8081/service/local/repositories/ci-project-snapshots/content-compressed/com/jdk * Trying 10.0.0.20... * TCP_NODELAY set * Connected to 10.0.0.20 (10.0.0.20) port 8081 (#0) * Server auth using Basic with user 'admin' > PUT /service/local/repositories/ci-project-snapshots/content-compressed/com/jdk HTTP/1.1 > Host: 10.0.0.20:8081 > Authorization: Basic YWRtaW46bG90dGU= > User-Agent: curl/7.51.0 > Accept: */* > Content-Length: 153112854 > Expect: 100-continue > < HTTP/1.1 100 Continue * We are completely uploaded and fine < HTTP/1.1 201 Created < Date: Thu, 12 Oct 2017 06:58:51 GMT < Server: Nexus/2.11.0-02 < X-Frame-Options: SAMEORIGIN < X-Content-Type-Options: nosniff < Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Wed, 11-Oct-2017 06:58:51 GMT < Date: Thu, 12 Oct 2017 06:58:57 GMT < Server: Noelios-Restlet-Engine/1.1.6-SONATYPE-5348-V8 < Content-Length: 0 < * Curl_http_done: called premature == 0 * Connection #0 to host 10.0.0.20 left intact [ec2-user@ip-10-0-0-40 ~]$
NEXUS URL IE RESULT
http://10.0.0.20:8081/content/repositories/ci-project-snapshots/com/jdk/ Index of /repositories/ci-project-snapshots/com/jdk Name Last Modified Size Description Parent Directory jdk-7u80-linux-x64.tar.gz Thu Oct 12 06:58:54 UTC 2017 153530841