How to manually deploy artifacts in Nexus Repository Manager OSS 3

后端 未结 8 803
说谎
说谎 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:31

    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]
    
    0 讨论(0)
  • 2020-12-04 11:36

    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.

    0 讨论(0)
  • 2020-12-04 11:42

    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

    0 讨论(0)
  • 2020-12-04 11:43

    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

    0 讨论(0)
  • 2020-12-04 11:44

    This is implemented in Nexus since Version 3.9.0.

    • Login
    • Select Upload

    • Fill out form and upload Artifact

    0 讨论(0)
  • 2020-12-04 11:44

    I'm using maven deploy file.

    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/
    

    UPDATE: As stated in comments using quotes in url cause NoSuchElementException

    But I have add server config in my maven (~/.m2/settings.xml).

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

    References:

    Maven Apache - Guide 3rd party jars

    0 讨论(0)
提交回复
热议问题