Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nacos Client dependency fails due to unresolved ${revision} variable in version 2021.0.5.0 #3870

Open
linynag opened this issue Oct 21, 2024 · 2 comments
Labels
area/nacos spring cloud alibaba nacos kind/question stale

Comments

@linynag
Copy link

linynag commented Oct 21, 2024

Which Component
Nacos Discovery

Describe the bug
When trying to use the spring-cloud-starter-alibaba-nacos-discovery dependency with version 2021.0.5.0, I encounter an issue where the ${revision} variable in the nacos-client dependency's POM file is not resolved correctly, leading to an error:

Could not find artifact com.alibaba.nacos:nacos-all:pom:${revision} in aliyunmaven (https://maven.aliyun.com/repository/public)

The POM file contains the following snippet, where ${revision} is used, but it does not get replaced by a concrete version number:

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 [http://maven.apache.org/xsd/maven-4.0.0.xsd"](http://maven.apache.org/xsd/maven-4.0.0.xsd%22) xmlns="[http://maven.apache.org/POM/4.0.0"](http://maven.apache.org/POM/4.0.0%22)
    xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance">](http://www.w3.org/2001/XMLSchema-instance%22%3E)
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.alibaba.nacos</groupId>
    <artifactId>nacos-all</artifactId>
    <version>${revision}</version> <!-- The issue is here -->
  </parent>
  <groupId>com.alibaba.nacos</groupId>
  <artifactId>nacos-client</artifactId>
  <version>2.2.0</version>
  <name>nacos-client ${project.version}</name>
  <url>http://nacos.io</url>

</project>

Simplest demo
The simplest demo involves creating a Maven project with the following dependency:

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
    <version>2021.0.5.0</version>
</dependency>

Then try building the project, and you will see the error.

To Reproduce
Steps to reproduce the behavior:

  1. Add the following dependency to a Maven project:
    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        <version>2021.0.5.0</version>
    </dependency>
  2. Attempt to build the project using mvn clean install.
  3. See the error related to ${revision} not being resolved.

Expected behavior
The ${revision} variable should be replaced with the correct version of nacos-all, and the project should compile without errors.

Screenshots
N/A

Additional context

  • MacOS
  • Java 8
  • Spring Cloud Alibaba version: 2021.0.5.0
  • Nacos client version: 2.2.0
@yuluo-yx
Copy link
Collaborator

这里的 all 是 nacos 版本的发行版本,或许不应该在 sca 中被替换?

@yuluo-yx yuluo-yx added kind/question area/nacos spring cloud alibaba nacos labels Oct 21, 2024
Copy link

This issue has been open 30 days with no activity. This will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/nacos spring cloud alibaba nacos kind/question stale
Projects
None yet
Development

No branches or pull requests

2 participants