apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.08k stars 10.2k forks source link

maven版本是如何定义的 #5071

Closed pengbiaobeyond closed 7 months ago

pengbiaobeyond commented 8 months ago

我发现有些依赖是没有定义版本的,是怎样拉取到固定版本的 image

dosubot[bot] commented 8 months ago

🤖

你好,@pengbiaobeyond!我叫Dosu, 是一款能够帮助你解决问题,回答问题,甚至成为贡献者的机器人。在等待人类维护者的时候,我在这里为您服务。希望我们能愉快的合作!

在Maven中,版本是在依赖的<version>标签内定义的。版本可以是固定的版本号,例如<version>1.4.20</version>,或者可以是变量,例如<version>${project.version}</version>

在您提供的上下文中,依赖的版本以两种方式定义:

  1. 使用固定的版本号:这是依赖的特定版本。例如,com.google.injectguice工件的<version>5.0.1</version>

  2. 使用变量:这是版本号的占位符,它在pom.xml文件或属性文件的其他地方定义。例如,com.ctrip.framework.apolloapollo-common工件的<version>${project.version}</version>

如果依赖项没有定义版本,Maven将尝试使用在<repositories>标签中定义的仓库中可用的最新版本。然而,通常建议始终为依赖项指定版本,以确保构建的一致性。

在您提供的上下文中,<repositories>标签包含了apollo-coreapollo-openapi的快照版本的仓库。如果这些依赖项没有定义版本,Maven将从这个仓库中拉取最新的快照版本。

关于Apollo仓库的版本管理,我没有在仓库中找到答案,但答案可能在其他地方,或者我可能错过了。如果您需要更多信息,欢迎提供更多的上下文。

参考源码:

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

pengbiaobeyond commented 8 months ago

但是我一直拉到的都是1.29版本的包,仓库中已经有2.2版本的包了

nobodyiam commented 8 months ago

org.springframework.boot:spring-boot-dependencies 中定义的

pengbiaobeyond commented 8 months ago

谢谢

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] commented 7 months ago

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.