gpt4 book ai didi

java - Maven 次要版本 `x`

转载 作者:行者123 更新时间:2023-12-01 19:40:10 24 4
gpt4 key购买 nike

我遇到过这种依赖:

<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-hbase-1.x</artifactId>
</dependency>

当我尝试这样做时:

<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-hbase-2.x</artifactId>
</dependency>

我收到一个错误:

'dependencies.dependency.version' for com.google.cloud.bigtable:bigtable-hbase-2.x:jar is missing

x 的含义是什么 - 它是某种通配符吗?如果是这样,为什么 1.x 不需要版本,而 2.x 需要?

最佳答案

这是两个正交问题:

  1. bigtable-hbase-2.xbigtable-hbase-1.x 就 maven 而言只是名称(字符串)。它不理解 1.x2.x 的任何内容。它肯定无法理解x

  2. 每个依赖项都需要一个版本,除非在dependencyManagement部分中指定。看起来您的( parent ?)pm 中的某处有一个 dependencyManagement 部分。但该 dependencyManagement 仅涵盖 bigtable-hbase-1.x,而不是 bigtable-hbase-2.x

关于java - Maven 次要版本 `x`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55617931/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com