MAVEN projects or third-party jars are published to the

Source: Internet
Author: User
Tags configuration settings

1. Third-party jar release

Example:

Open the command line into the MAVEN installation directory of the bin directory, enter the following instructions, the specific reference according to the circumstances of the changes, the following parameters detailed description.

MVN deploy:deploy-file-dgroupid=hw.vedioicon-dartifactid=vedioicon-dversion=1.0-dpackaging=jar-dfile=d:\ workspace\web-mooc\src\main\webapp\web-inf\lib\vedioicon.jar-durl=http://192.168.117.254:8081/nexus/content/ repositories/thirdparty/-drepositoryid=thirdparty

DgroupId and DartifactId form the coordinates of the jar package in Pom.xml, and the project relies on these two properties for positioning. It's OK to name yourself.

Dfile represents the absolute path of the jar package that needs to be uploaded.

Durl the location of the warehouse, open the Nexus-->repositories menu and you can see the path.

The representation ID of the DrepositoryId server, which can be seen in the Nexus configuration.

Once the upload is successful, click on the 3rd party repository in the Nexus interface to see this package.

2. Project Release:

POM Configuration:

<distributionManagement> <repository><id>releases</id><url>http:// 192.168.117.254:8081/nexus/content/repositories/releases/</url></repository> <snapshotRepository > <id>snapshots</id> <name>nexus Distribution Snapshot repository</name&              Gt <url>http://192.168.117.254:8081/nexus/content/repositories/snapshots/</url> </ Snapshotrepository> </distributionManagement>

Project Right-click Run-maven-build in goal to fill in the deploy directly run can


Permissions configuration: In the user or MAVEN configuration settings.xml, note if the user is configured under. m2 in the. m2 in the settings.

<servers>    <server>       <id>releases</id>      < Username>deployment</username>      <password>******</password >    </server>    <server>       <id>snapshots</id>      <username>deployment</ username>      <password>******</password>     </server>    <server>      <id> thirdparty</id>      <username>deployment</username>       <password>******</password>    </server>   </servers> 

Note The ID must be consistent with the ID in the server


Part of the content reference: http://blog.csdn.net/hongqishi/article/details/9187775

MAVEN projects or third-party jars are published to the

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.