本地jar包上传至maven私服

in 笔记 with 0 comment

上传Jar到远程marven仓库

mvn deploy:deploy-file -DgroupId=org.apache.thrift -DartifactId=libthrift -Dversion=1.12 -Dpackaging=jar -Dfile=D:\thrift-0.9.2.jar -Durl=http://ip:port/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty  

将本地jar包添加到本地maven仓库

以spring为例
例如这个spring-context-support-3.1.0.RELEASE.jar放在了"D:\mvn"中

<dependency>  
    <groupId>org.springframework</groupId>  
    <artifactId>spring-context-support</artifactId>  
    <version>3.1.0.RELEASE</version>  
</dependency>
mvn install:install-file -Dfile=D:\mvn\spring-context-support-3.1.0.RELEASE.jar -DgroupId=org.springframework -DartifactId=spring-context-support -Dversion=3.1.0.RELEASE -Dpackaging=jar