You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Maven执行install报错:无法从Azure Feed拉取openapi插件依赖

问题原因与解决方法

核心问题

你配置的<repositories>仅负责项目编译、运行阶段的依赖拉取,而Maven插件(包括插件自身的依赖)的仓库地址需要通过<pluginRepositories>单独配置。当前报错里的pe.com.pichincha:mic-libs-openapi-generator是openapi-generator-maven-plugin的依赖,Maven只会去插件仓库列表里查找,所以你之前加的<repositories>对插件依赖无效。

解决步骤

在你的pom.xml中添加<pluginRepositories>节点,把Azure Feed仓库配置进去,示例如下:

<pluginRepositories>
    <pluginRepository>
        <id>t002</id>
        <url>https://pkgs.dev.azure.com/gz1606/u-devops/_packaging/t002/maven/v1</url>
        <!-- 若为快照仓库,需开启快照支持 -->
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

额外排查点

  • 如果Azure Feed是私有仓库,需在settings.xml中配置对应id的认证信息:
    <servers>
        <server>
            <id>t002</id>
            <username>你的Azure账号</username>
            <password>你的Azure令牌/密码</password>
        </server>
    </servers>
    
  • 执行mvn install -X查看详细日志,确认Maven是否已将Azure Feed加入插件依赖的查找列表
  • 检查全局settings.xml中是否存在优先级更高的插件仓库配置,可能覆盖了项目级配置

内容的提问来源于stack exchange,提问作者cekodis681 cekodis681

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 05:10:30