在maven中添加jar包到本地库

mvn install:install-file

-DgroupId=包名

-DartifactId=项目名

-Dversion=版本号

-Dpackaging=jar

-Dfile=jar文件所在路径


1,将jar包上传到linux服务器上,如路径为/home/hjq/sms.jar

-s6y&y!iC2ye f]0
2,打开putty,设置字符编码为utf8格式,用maven安装该jar包
格式为:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>51Testing软件测试网4kW9u Z9TC,F%XIc
例如:
mvn install:install-file -Dfile=/home/hjq/sms.jar -DgroupId=ufmobile -DartifactId=sms -Dversion=3.0 -Dpackaging=jar

,W Uym^ s0
3,在pom.xml中增加如下语句
<dependency> <groupId>ufmobile</groupId> <artifactId>sms</artifactId> <version>3.0</version> </dependency>
8r(Q-X G/~)U;X0
51Testing软件测试网 u3`a"G3Y
4,OK了

你可能感兴趣的:(maven,xml,linux,F#,软件测试)