赞
踩
背景:项目中使用到新版本的aspose-words组件,但是引用失败;
pom.xml中引用,但是maven 仓库没有aspose-words 后续版本,所以需要在pom中配置 aspose-words的官网。
- <dependencies>
- <dependency>
- <groupId>com.aspose</groupId>
- <artifactId>aspose-words</artifactId>
- <version>24.1</version>
- <classifier>jdk17</classifier>
- </dependency>
- </dependencies>
-
-
- <repositories>
- <repository>
- <id>AsposeJavaAPI</id>
- <name>Aspose Java API</name>
- <url>https://releases.aspose.com/java/repo/</url>
- </repository>
- </repositories>
-

仍然不生效,错误入下:

解决办法:修改maven的配置文件,conf/setting.xml 文件中需要排除AsposeJavaAPI,也就是由 <mirrorOf>*</mirrorOf> 改为: <mirrorOf>*,!AsposeJavaAPI</mirrorOf>,如下图
(, ! + 对应的代理仓库id 表示不从仓库引用)


参考链接:
Aspose官网:Installation|Aspose.Words for Java
仓库:Aspose Repository Browser /java/repo/com/aspose/aspose-words/21.8/
【Maven 引入依赖踩坑】Repositories (jitpack.io) 引入不生效问题_jitpack.io镜像-CSDN博客
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。