使用阿里云oss报错:com.alibaba.cloud:aliyun-oss-spring-boot-starter:jar:unknown was not found in

发布时间 2023-12-20 11:35:53作者: 欢跳的心

根据阿里云OSS的案例文档,在springboot项目中配置pom 时报错

https://github.com/alibaba/aliyun-spring-boot/tree/master/aliyun-spring-boot-samples/aliyun-oss-spring-boot-sample

demo中的配置:

        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>aliyun-oss-spring-boot-starter</artifactId>
        </dependency>

完整报错信息:

com.alibaba.cloud:aliyun-oss-spring-boot-starter:jar:unknown was not found in https://maven.aliyun.com/nexus/content/repositories/central/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alimaven has elapsed or updates are forced

尝试使用 -U 标记(强制更新快照)运行 Maven 导入

 

解决方法:

在 https://mvnrepository.com/ 中搜索到 aliyun-oss 的配置,需要加上版本号1.0.0 就可以成功导入,这个版本的维护到2020年

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>aliyun-oss-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>