infact classpath data in MANIFEST.MF is no problem, "java -jar xx.jar" is no problem. just only classpath for "mvn install" have problem, exclude is not a solution for this.
2018-07-28 14:40 GMT+08:00 Willem Jiang <willem.ji...@gmail.com>: > It looks like the plugin add all the m2 depedencies into the classpath. > Can you exclude them[1] in the maven jar plugin ? > > [1] > https://maven.apache.org/plugins/maven-jar-plugin/ > examples/include-exclude.html > > > Willem Jiang > > Twitter: willemjiang > Weibo: 姜宁willem > > On Sat, Jul 28, 2018 at 9:33 AM, wjm wjm <zzz...@gmail.com> wrote: > > > 1.there is no problem run unit test, and start spring applicationContext, > > by "mvn install" > > 2.add maven-jar-plugin in pom, set outputDirectory, and run "mvn install" > > again > > spring will load duplicated libraries in different directory, that cause > > spring start failed. > > (target/lib is my " outputDirectory ") > > > > Loading XML bean definitions from URL > > [jar:file:/D:/work/git/local-servicecomb/integration-tests/ > > target/lib/java-chassis-core-1.1.0-SNAPSHOT.jar!/META-INF/ > > spring/cse.bean.xml] > > Loading XML bean definitions from URL > > [jar:file:/C:/Users/Administrator/.m2/repository/ > > org/apache/servicecomb/java-chassis-core/1.1.0-SNAPSHOT/ > > java-chassis-core-1.1.0-SNAPSHOT.jar!/META-INF/spring/cse.bean.xml] > > > > can anybody help me to avoid this problem? > > thanks. > > >