Apache Maven Deploy Plugin plugin detailed

Source: Internet
Author: User

The Deploy plugin is the official plugin provided by the Apache Maven team, the latest version of 2.8.2, released in 2014-08-27. The plug-in can deploy the built-in artifacts directly to the remote library of the POM configuration.

By default, the plugin is already configured for use in MAVEN's deploy phase, and the plugin does not have configuration parameters, so you do not need to configure the plugin in the project's Pom to directly execute the following command.

MVN Deploy

1. For a MAVEN component, its publishing information usually includes the following: Component metadata artifact code package itself POM MD5/SHA1 checksum file

2. To deploy MAVEN artifacts, you need to provide the following configuration information in the MAVEN project's POM: Remote libraries such as URLs, access protocols, access account widgets such as group, artifact, version, packing, classifier publishers, Wagon tools such as the actual implementation of the deployment

3. Deployment of the Goals Deploy:deploy,maven project provided by the Deploy plugin reads the required information from the MAVEN project's Pom file, releasing all the artifacts related to the MAVEN project (the Pom and various artifacts of the MAVEN project) to the remote library.
The goal only supports MAVEN projects.
Deploy:deploy-file, any single-component deployment reads the required information from a MAVEN project's pom file or command line, releasing a component (the Pom and the component of the MAVEN project) to the remote library.

The goal supports a variety of projects, not limited to MAVEN projects.

4.deploy:deploy usage for official release, configure <distributionManagement/> in pom for remote library <repository/> URL; for informal publishing, You can also configure <distributionManagement/> give the remote library <snapshotRepository/> URL in the pom, and if you want to publish a Web site for a MAVEN project, you can also configure < in the POM Distributionmanagement/> gives the URL of <site/>, and the project's POM configuration <distributionManagement/> gives only the URL of the remote library. To configure Username/password to access the remote library, you also need to configure <server>; in Settings.xml

Execute the mvn deploy command directly.

5. The usage of deploy:deploy-file is mainly used for component deployment of non-MAVEN projects; it can only be performed manually on the command line; If the deployed artifact does not have a pom, a generic pom is generated by default; command:

MVN deploy:deploy-file-durl=file://c:\m2-repo \
                       -drepositoryid=some.id \
                       -dfile=your-artifact-1.0.jar \
                       [-dpomfile=your-pom.xml] \
                       [-dgroupid=org.some.group] \
                       [-dartifactid=your-artifact] \
                       [-dversion=1.0] \
                       [-dpackaging=jar] \
                       [-dclassifier=test] \
                       [-dgeneratepom=true] \
                       [-dgeneratepom.description= "My Project description"] \
                       [- Drepositorylayout=legacy] \
                       [-duniqueversion=false]

Reference Links:

http://maven.apache.org/plugins/maven-deploy-plugin/
https://github.com/apache/maven-deploy-plugin/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.