本文介绍了与Maven依赖项有关的问题:UnsolvableVersionConflictException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是grpc和java的新手.
Im new in grpc and java.
我的依赖项有很大的问题:
I have a big problem with my dependencies:
我在pom文件中的实际依赖项:
My actual dependencies in pom file:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>2.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-core</artifactId>
<version>2.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<version>1.18.12</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
<version>2.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>3.11.4</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.11.4</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>1.27.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.2-jre</version>
</dependency>
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-spring-boot-starter</artifactId>
<version>2.6.2.RELEASE</version>
</dependency>
</dependencies>
感谢所有建议.
推荐答案
添加对 io.grpc:grpc-netty-shaded:jar:1.27.1
和 io.grpc的依赖:grpc-services:jar:1.27.1
.这些工件目前未包含在grpc-all中.
Add a dependency on io.grpc:grpc-netty-shaded:jar:1.27.1
and io.grpc:grpc-services:jar:1.27.1
. These artifacts aren't presently included in grpc-all.
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.27.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
<version>1.27.1</version>
</dependency>
请注意,gRPC团队希望您避免使用grpc-all,而是参考您需要的特定依赖项;grpc-all引入了比许多用户所需更多的依赖项.
As a note, gRPC team would prefer you to avoid grpc-all and instead reference the specific dependencies you need; grpc-all pulls in far more dependencies than many users need.
这篇关于与Maven依赖项有关的问题:UnsolvableVersionConflictException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!