从SVN上下载源代码
svn export https://10.200.1.201/xxxx/PLATFORM code/ --force --username xxx --password xxx
显示下载的代码结构(其中包含pom.xml)
cd code/
ls -al
.....
drwxr-xr-x 8 root root 4096 Mar 15 12:50 HS_Communication
drwxr-xr-x 8 root root 4096 Mar 15 12:50 HSM_Common
....
-rw-r--r-- 1 root root 22249 Sep 25 2015 pom.xml
Maven导出项目依赖包
libsPath=/tmp/test/mvnLibTest/code/libs
mvn dependency:copy-dependencies -DoutputDirectory=$libsPath -DincludeScope=compile
删除maven子项目Jar包(因为Maven子项目Jar会存放在其他地方)
rm -rf ${libsPath}/HS_Communication* ${libsPath}/HSM_* ${libsPath}/NM_Task*
#如下是common_libs中没有,但是从MVN仓库中拎出来的
## rm -rf ${libsPath}/Saxon-HE-9.5.0.1.jar
## rm -rf ${libsPath}/javaee-api-5.0-1.jar
显示导出的Maven依赖包
[root@localhost code]# ll $libsPath
total 78624
-rw-r--r-- 1 root root 62983 Mar 15 15:17 activation-1.1.jar
-rw-r--r-- 1 root root 102631 Mar 15 15:17 activeio-core-3.1.2.jar
-rw-r--r-- 1 root root 2968301 Mar 15 15:17 activemq-core-5.3.2.jar
-rw-r--r-- 1 root root 38501 Mar 15 15:17 activemq-pool-5.3.2.jar
....省略
转载请标明出处:http://www.cnblogs.com/ssslinppp/