Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

How can I upload a jar to maven with maven's deploy command?



  • I can upload a jar to maven feed by using the ProGet web GUI, and how can I achieve it by using command line? Just like nuget.exe for C# packages.

    Thanks,
    Samuel

    Product: ProGet
    Version: 4.7.11


  • inedo-engineer

    According to the mvn deploy documentation, you'd need this in the POM file for the project:

      <distributionManagement>
        <repository>
          <id>myproget</id>
          <name>My ProGet Feed</name>
          <url>http://progethostname/maven2/feedname</url>
        </repository>
      </distributionManagement>
    

    If the feed requires authentication, you also need this in settings.xml (the <id> values have to match):

        <server>
          <id>myproget</id>
          <username>username</username>
          <password>password</password>
        </server>
    

    If you want your snapshot versions deployed to a separate feed, you can add a <snapshotRepository> to <distributionManagement> in the same format as <repository> above.

    After that, the command is just mvn deploy to upload the package to ProGet.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation