由于电信短信平台二次开发中使用了maven进行项目管理,在添加依赖jar包时,需要将sendMsg_jdk1.6.jar安装到maven中,让maven自动进行加载。
使用maven2的安装命令。
命令格式如下:
1、本地发布
[color=Green]mvn install: install-file -Dfile=sendMsg_jdk1.6.jar -DgroupId=com.linkage
-DartifactId=netmsg -Dversion=2.0(jdk1.6) -Dpackaging=jar[/color]
2、远程发布
[color=Green]mvn deploy:deploy-file -DgroupId=com.link
age -DartifactId=netmsg -Dversion=2.0(jdk1.6) -Dpackaging=jar -Dfile=sendMsg_jdk
1.6.jar -Durl=http://localhost:8080/nexus/content/repositories/releases
-DrepositoryId=nexus-releases[/color]
在项目POM.xml中加入:
注:关于repositoryId=nexus-releases说明,nexus-releases在.m2/settings.xml中已经配置。
参考:16.7.3. 部署第三方构件