You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/25 08:19:24 UTC
[GitHub] [dubbo] weii918 opened a new issue, #10363: 2.7.9+ (非 3.x)版本 revision 错误
weii918 opened a new issue, #10363:
URL: https://github.com/apache/dubbo/issues/10363
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.7.9+
* Operating System version: all
* Java version: all
### Steps to reproduce this issue
1、工程本身使用 revision 插件构建,工程引入 2.7.9+ (非 3.x)版本 dubbo
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>2.7.9</version>
</dependency>
2、执行 mvn 构建命令进行打包构建
mvn -U clean package -Drevision=xxxxx
xxxxx 为业务方自己的版本号,与 dubbo 版本号无关
### Expected Behavior
对dubbo-spring-boot-autoconfigure的依赖为目标版本(2.7.9+),而非我自己工程的 revision 版本
### Actual Behavior
基于 revision 插件的机制,对dubbo-spring-boot-autoconfigure的依赖为我自己工程的版本了,导致找不到包
<img width="893" alt="image" src="https://user-images.githubusercontent.com/10379276/180728056-439d370d-046c-4905-b195-8b8737fd0d01.png">
mvn 官方对 revision 的说明文档如下:https://maven.apache.org/maven-ci-friendly.html
多模块(子模块)构建,应该使用${project.version}替代${revision}变量进行打包发行,
<img width="785" alt="image" src="https://user-images.githubusercontent.com/10379276/180726758-da574959-f957-4754-89ec-76af770a4a70.png">
已发行的 dubbo 版本中dubbo-spring-boot-autoconfigure包的依赖版本仍为${revision}变量,会被依赖方污染
<img width="687" alt="image" src="https://user-images.githubusercontent.com/10379276/180727394-d610d6f9-8ec9-4523-bcfe-cefe78e55aba.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] weii918 commented on issue #10363: 2.7.9+ (非 3.x)版本 revision 错误
Posted by GitBox <gi...@apache.org>.
weii918 commented on issue #10363:
URL: https://github.com/apache/dubbo/issues/10363#issuecomment-1194931933
> Dubbo 日志中的版本号目前是不支持自定义的,具体可以看下 org.apache.dubbo.common.Version#getVersion(java.lang.Class<?>, java.lang.String)。大体逻辑是获取当前 Dubbo 类所在的 jar 包的文件名,然后截取其中的版本号,这个和 maven pom 里面的 revision 无关,Dubbo 打包的时候已经替换过版本号了。如果使用的是 shade 模式的确实会导致无法获取正确的版本号,因为 Dubbo 不是独立版本依赖了。
不是这个意思,是在 mvn 构建的时候就存在问题,因为 dubbo 的发行包里面 pom 里面的版本号,如 dubbo-spring-boot-starter 中 dependency 的 dubbo-spring-boot-autoconfigure 仍为 revision 变量,未进行版本号替换,这样在被依赖方使用 revision 构建的时候,会出现错误:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] cngdlcl commented on issue #10363: 2.7.9+ (非 3.x)版本 revision 错误
Posted by GitBox <gi...@apache.org>.
cngdlcl commented on issue #10363:
URL: https://github.com/apache/dubbo/issues/10363#issuecomment-1195131147
此问题在3.0.10依然存在,不知为何到现在都不修复?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ closed issue #10363: 2.7.9+ (非 3.x)版本 revision 错误
Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #10363: 2.7.9+ (非 3.x)版本 revision 错误
URL: https://github.com/apache/dubbo/issues/10363
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ commented on issue #10363: 2.7.9+ (非 3.x)版本 revision 错误
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10363:
URL: https://github.com/apache/dubbo/issues/10363#issuecomment-1194840388
Dubbo 日志中的版本号目前是不支持自定义的,具体可以看下 org.apache.dubbo.common.Version#getVersion(java.lang.Class<?>, java.lang.String)。大体逻辑是获取当前 Dubbo 类所在的 jar 包的文件名,然后截取其中的版本号,这个和 maven pom 里面的 revision 无关,Dubbo 打包的时候已经替换过版本号了。如果使用的是 shade 模式的确实会导致无法获取正确的版本号,因为 Dubbo 不是独立版本依赖了。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org