dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

About Handle "Duplicate class com/alibaba/dubbo/common/Version.class in 2 jar"

Open changwei0708 opened this issue 8 years ago • 3 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.
  • [ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.5.10
  • Operating System version: windows7
  • Java version: jdk1.8

use dubbo-2.5.x and dubbo-2.6.x, it is need to exclude dubbo-common , otherwise, boot log output

Duplicate class com/alibaba/dubbo/common/Version.class in 2 jar

and then i do this

<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>dubbo</artifactId>
			<scope>system</scope>
			<version>${alibaba.dubbo.version}</version>
			<systemPath>${basedir}/lib/dubbo-2.5.10.jar</systemPath>
			<exclusions>
				<exclusion>
					<groupId>com.alibaba</groupId>
					<artifactId>dubbo-common</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

but when i include kryo , i need to repeat that ,just like

<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>dubbo-serialization-kryo</artifactId>
			<version>2.6.2</version>
			<exclusions>
				<exclusion>
					<groupId>com.alibaba</groupId>
					<artifactId>dubbo-common</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

but this Dependency transfer problem is not appear in https://github.com/dangdangdotcom/dubbox, can fix it ?

changwei0708 avatar Aug 17 '18 06:08 changwei0708

I have the same problem. Dubbo 2.6.2

salamando avatar Aug 29 '18 02:08 salamando

@changwei0708 @salamando Please run mvn dependency:tree > tree.log in your project root directory. And upload the file tree.log here (just drag the file here).

zonghaishang avatar Nov 08 '18 03:11 zonghaishang

@changwei0708 @salamando I cannot reproduce this issue on 2.6.2. Pls. share me your demo app in your github space, and reopen this issue if you still have the problem.

beiwei30 avatar Feb 12 '19 03:02 beiwei30