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

[AI] spring-ai: 0.8.1 dependency not found #3712

Closed
sichenyong opened this issue Apr 30, 2024 · 3 comments
Closed

[AI] spring-ai: 0.8.1 dependency not found #3712

sichenyong opened this issue Apr 30, 2024 · 3 comments

Comments

@sichenyong
Copy link

I get trouble when I try to learn Spring Cloud Alibaba AI:(https://sca.aliyun.com/docs/2023/user-guide/ai/quick-start/)

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>2023.0.1.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>

    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-ai</artifactId>
        </dependency>
    </dependencies>

I can't import spring-ai-core:0.8.1 even if i changed the mirror of maven to aliyun repository.

here is my maven configuration file :

<mirror>
  <id>aliyunmaven</id>
  <mirrorOf>*</mirrorOf>
  <name>阿里云公共仓库</name>
  <url>https://maven.aliyun.com/repository/public</url>
</mirror>

I went to aliyun repository to search spring-ai-core:0.8.1 , but no result for it:
image

I can't figure out it. what should i do ? Change the mirror?

@yuluo-yx
Copy link
Collaborator

Great to see you using spring cloud alibaba ai. You may have forgotten one important point

spring ai has not been published to the maven central repository yet, you need to configure the repository address additionally in maven:

@yuluo-yx
Copy link
Collaborator

yuluo-yx commented Apr 30, 2024

/area ai
/kind question

@yuluo-yx yuluo-yx changed the title Cannot resolve org.springframework.ai:spring-ai-core:0.8.1: when I learn Spring Cloud Alibaba Ai ...... [AI] spring-ai: 0.8.1 dependency not found Apr 30, 2024
@PeterZh6
Copy link

PeterZh6 commented May 4, 2024

Hi, I also met this problem. You can try to add a remote repository to pom.xml as this will make maven search for spring-ai-core in
this repository.

    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

However, please note that you also need to change <mirrorOf>*</mirrorOf>, as this config redirect all the maven dependency request to aliyun maven repository. You need to change it to <mirrorOf>*,!spring-milestones</mirrorOf>to exclude spring-snapshots. note that no space between ,and !
This should solve your problem.

@yuluo-yx yuluo-yx added this to the Spring Cloud Alibaba AI milestone May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants