dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Bug] dubbo3.3.0, revision parameter of interface metadata, come from pom.xml's ${project.parent.version} instead of ${project.version}

Open aliuql opened this issue 1 year ago • 2 comments

Pre-check

  • [X] I am sure that all the content I provide is in English.

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

dubbo java 3.3.0, jdk 17, linux

Steps to reproduce this issue

i package a spring boot jar, named: dubbo-samples-spring-boot-provider-2.0.jar and pom.xml of this jar (location: META-INF\maven\org.apache.dubbo\dubbo-samples-spring-boot-provider\pom.xml) as follows:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-samples-spring-boot</artifactId>
    <version>1.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>dubbo-samples-spring-boot-provider</artifactId>
  <version>2.0</version>

<project/>

i opend the flag: dubbo.metadata-report.report-metadata: true and when i start this jar, command like this: java -jar dubbo-samples-spring-boot-provider-2.0.jar

it will report metadata to nacos, and nacos metadata like this: image

the param revision of serviceKey: test1/org.apache.dubbo.springboot.demo.DemoService:1.0:dubbo, is 1.1, why not 2.0 ?

What you expected to happen

the revision param of interface, will it be better get from ${project.verion} of pom.xml ?

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • [ ] Yes I am willing to submit a pull request on my own!

Code of Conduct

aliuql avatar Sep 27 '24 00:09 aliuql

This revision is fetched by jar name. You can check org.apache.dubbo.common.Version

AlbumenJ avatar Sep 29 '24 02:09 AlbumenJ

but i start with the cmd: java -jar dubbo-samples-spring-boot-provider-2.0.jar it register revision: 1.1

may be it caused by spring boot 's jar package mode

aliuql avatar Oct 08 '24 04:10 aliuql