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