must run "mvn install" in parent level, that will cause problem.
eg:
integration tests
springmvc-tests
springmvc-tests-general-with-springboot
run in " integration tests" or " springmvc-tests", have problems.
but run in " springmvc-tests-general-with-springboot", no problem.
2018-07-29 2:41 GMT+08:00 wjm wjm <[email protected]>:
> 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 <[email protected]>:
>
>> 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 <[email protected]> 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.
>> >
>>
>
>