nexus bulk upload

## prepare script 

[root@localhost repository]# wget https://raw.githubusercontent.com/sonatype-nexus-community/nexus-repository-import-scripts/master/mavenimport.sh --2021-10-13 15:03:50-- https://raw.githubusercontent.com/sonatype-nexus-community/nexus-repository-import-scripts/master/mavenimport.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.108.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 663 [text/plain] Saving to: ‘mavenimport.sh.1’ 100%[=================================================================================================>] 663 --.-K/s in 0s 2021-10-13 15:03:51 (73.4 MB/s) - ‘mavenimport.sh.1’ saved [663/663]

## setup gitlab-runner 

[root@localhost repository]# ./mavenimport.sh -u admin -p admin -r http://192.168.0.140:8081/repository/maven-releases/ -r http://192.168.0.140:8081/repository/maven-releases/ * About to connect() to 192.168.0.140 port 8081 (#0) * Trying 192.168.0.140... * Connected to 192.168.0.140 (192.168.0.140) port 8081 (#0) * Server auth using Basic with user 'admin' > PUT /repository/maven-releases//org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom HTTP/1.1 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.29.0 > Host: 192.168.0.140:8081 > Accept: */* > Content-Length: 8115 > Expect: 100-continue > < HTTP/1.1 100 Continue * We are completely uploaded and fine < HTTP/1.1 201 Created < Date: Wed, 13 Oct 2021 06:09:18 GMT < Server: Nexus/3.35.0-02 (OSS) < X-Content-Type-Options: nosniff < Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation < X-XSS-Protection: 1; mode=block < Content-Length: 0

## config deploy plugin 

<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http://192.168.0.140:8080/manager/text</url> <path>/kcaerp</path> <update>true</update> <username>admin</username> <password>admin</password> </configuration> </plugin>

## config gitlab-ci.yml 

stages: - build cache: paths: - .m2/repository uild: stage: build before_script: - echo ${pwd} script: # - source /etc/profile.d/maven.sh - mvn --version # - mvn -f pom.xml clean install - mvn tomcat7:deploy # - cp ./target/kca-erp-0.0.1-SNAPSHOT.war /app/tomcat/webapps after_script: - echo 'build success!' tags: - tomcat9

## result 












댓글

이 블로그의 인기 게시물

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: URL using bad/illegal format or missing URL

starcraft map

Data Analysis with Superset - boardless chart