1.WEB-INF文件夹下添加lib文件夹,文件夹下添加demo-client-0.1-SNAPSHOT.jar
2.pom.xml中配置如下代码:
12 com.ali.demo.sso 3demo-common-resource 40.1-resource-SNAPSHOT 5system 6${project.basedir}/src/main/webapp/WEB-INF/lib/demo-client-0.1-SNAPSHOT.jar 7
system scope引入的包,在使用jar-with-dependencies打包时将不会被包含,可以使用resources将本地包打进jar-with-dependencies
org.apache.maven.plugins maven-shade-plugin make-assembly package shade jar-with-dependencies xxx-jar-with-dependencies lib/ lib/ **/demo-client-0.1-SNAPSHOT.jar
生成的xxx-jar-with-dependencies.jar中,将会包含lib目录以及demo-client-0.1-SNAPSHOT.jar,并且能够被在执行的时候被找到。