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/