IT박스

Nexus Repository Manager OSS 3에서 아티팩트를 수동으로 배포하는 방법

itboxs 2020. 11. 20. 08:44

Nexus Repository Manager OSS 3에서 아티팩트를 수동으로 배포하는 방법


Nexus Repository Manager OSS 3를 설치 한 후 Artifact Upload웹 페이지를 통해 아티팩트를 업로드하는 옵션 표시되지 않습니다 .

Nexus Repository Manager OSS 2.13에는 해당 작업을 수행하는 옵션이 있습니다.

누구나 Nexus 3의 호스팅 된 저장소에 아티팩트를 업로드하는 방법을 보여줄 수 있습니까?

편집 : 3.9.0 버전부터이 기능이 구현되었습니다.


이것은 버전 3.9.0부터 Nexus에서 구현됩니다.

  • 로그인
  • 업로드 선택

여기에 이미지 설명 입력

  • 양식 작성 및 아티팩트 업로드

여기에 이미지 설명 입력


maven 배포 파일을 사용하고 있습니다.

mvn deploy:deploy-file -DgroupId=my.group.id \
    -DartifactId=my-artifact-id \
    -Dversion=1.0.0.1 \
    -Dpackaging=jar \
    -Dfile=foo.jar \
    -DgeneratePom=true \
    -DrepositoryId=my-repo \
    -Durl=http://my-nexus-server.com:8081/repository/maven-releases/

업데이트 : URL에 따옴표를 사용하는 주석에서 언급했듯이 NoSuchElementException이 발생

하지만 내 maven (~ / .m2 / settings.xml)에 서버 구성을 추가했습니다.

<servers>
  <server>
    <id>my-repo</id>
    <username>admin</username>
    <password>admin123</password>
  </server>
</servers>

참조 :

Maven Apache-타사 jars 가이드


This isn't currently implemented in the UI in Nexus 3 (see https://issues.sonatype.org/browse/NEXUS-10121). You'll need to use curl or mvn deploy or some other option.


You can upload artifacts via their native publishing capabilities (e.g. maven deploy, npm publish).

You can also upload artifacts to "raw" repositories via a simple curl request, e.g.

curl --fail -u admin:admin123 --upload-file foo.jar 'http://my-nexus-server.com:8081/repository/my-raw-repo/'

My Team built a command line tool for uploading artifacts to nexus 3.x repository, Maybe it's will be helpful for you - Maven Artifacts Uploader


My team use Gradle and Nexus OSS 3.5.2,

I have found a solution: upload artyfacts from locakhost (I checked Nexus documentation and did not found anything about uploading artifacts from folders) => I have shared directory (use Apache httpd) and connected one to created new Nexus proxy repository. Now when I want to add my own artifacts I can upload ones into shared directory in my remote server.

Maybe someone find my solution useful: 여기에 이미지 설명 입력

My question is here: Is it possible to deploy artifacts from local folder in Sonatype Nexus Repository Manager 3.x


For Windows:

mvn deploy:deploy-file -DgroupId=joda-time -DartifactId=joda-time -Dversion=2.7 -Dpackaging=jar -Dfile=joda-time-2.7.jar 
-DgeneratePom=true -DrepositoryId=[Your ID] -Durl=[YourURL]

참고URL : https://stackoverflow.com/questions/37543120/how-to-manually-deploy-artifacts-in-nexus-repository-manager-oss-3