Maven Deploy Plugin

The Maven Deploy Plugin is used to deploy your project artifacts to a remote repository for sharing with other developers and projects.

Goals:

  • deploy:deploy is used to automatically install the artifact, its pom and the attached artifacts produced by a particular project.
  • deploy:deploy-file is used to install a single artifact along with its pom.

Configuration:

Deployment of project artifcats with ftp:

<distributionManagement>
    <repository>
      <id>ftp-repository</id>
      <url>ftp://repository.qascript.com/repository</url>
    </repository>
  </distributionManagement>
 
  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-ftp</artifactId>
         <version>1.0-beta-6</version>
      </extension>
    </extensions>
  </build>

Your settings.xml would contain a server element where the id of that element matches id of the FTP repository specified in the POM above

<settings>
  <servers>
    <server>
      <id>ftp-repository</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

Run the maven command to deploy:

mvn deploy

 

Share

Bijan Patel

Founder & Creator of QAScript | 12+ years of IT Experience | Full Stack Automation Engineer | Blogger | Trainer

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!