How to manually deploy artifacts in Nexus Repository Manager OSS 3

后端 未结 8 804
说谎
说谎 2020-12-04 11:19

After installing Nexus Repository Manager OSS 3 I do not see option Artifact Upload to upload artifacts through web page.

In Nexus Repository Manager OS

相关标签:
8条回答
  • 2020-12-04 11:45

    To use mvn deploy:deploy-file, must add ~./m2/settings.xml

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

    command:

    mvn deploy:deploy-file -DgroupId=com.example \
                                           -DartifactId=my-app \
                                           -Dversion=2.0.0 \
                                           -Dpackaging=jar \
                                           -Dfile=my-app.jar \
                                           -DgeneratePom=true \
                                           -DrepositoryId=nexus-repo \
                                           -Durl=http://localhost:8081/repository/maven-releases/
    
    0 讨论(0)
  • 2020-12-04 11:55

    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/'
    
    0 讨论(0)
提交回复
热议问题