http://blog.csdn.net/we_shell/article/details/49819221
MAVEN Configuration for Jar
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.9.2</version>
</dependency>
1. Install the jar package to the local warehouse
Command:
[HTML]View PlainCopy
- MVN install:install-file -dfile=D:\thrift-0.9.2.jar -dgroupid=org.apache.thrift -dartifactid= libthrift -dversion=0.9.2 -dpackaging=jar
--DgroupId and DartifactId constitute the coordinates of the jar package in Pom.xml, corresponding to the DgroupId and DartifactId of the dependency
--Dfile indicates the absolute path of the jar package that needs to be uploaded
--Dpackaging for the type of installation file
2. Upload the jar to the
Command:
[HTML]View PlainCopy
- mvn deploy:deploy-file - Dgroupid=org.apache.thrift -dartifactid=libthrift -dversion=1.12 < span class= "attribute" >-dpackaging=jar -dfile=d:\thrift-0.9.2.jar -durl= Http://ip:port/nexus/content/repositories/thirdparty/ -drepositoryid=THIRDPARTY&NBSP;&NBSP;
--DgroupId and DartifactId constitute the coordinates of the jar package in Pom.xml, corresponding to the DgroupId and DartifactId of the dependency
--Dfile indicates the absolute path of the jar package that needs to be uploaded
--The URL address of the warehouse on Durl (open the Nexus left repositories menu, you can see the path)
--The representation ID of the DrepositoryId server, which can be seen in the Nexus configuration
Maven: Install the jar to the local repository and the jar to the switch