栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

运行Maven插件的命令提示插件版本在仓库中找不到

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

运行Maven插件的命令提示插件版本在仓库中找不到

例:运行 mvn dependency:copy-dependencies -DoutputDirectory=lib 命令出现异常:

[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:3.1.2 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:3.1.2: Plugin org.apache.maven.plugins:maven-dependency-plugin:3.1.2 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-dependency-plugin:jar:3.1.2 in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced
[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:3.1.2 is missing, no dependency information available

原因:该插件版本在本地及远程仓库中未找到。

解决:

    方案1:
        切换 Maven 远程仓库。

    方案2:
        修改 运行的插件版本:

        方式① 运行时指定版本:

mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:copy-dependencies -DoutputDirectory=lib

        方式② pom 依赖中指定版本:


    
        
            
                org.apache.maven.plugins
                maven-dependency-plugin
                3.1.1
            
        
    

            然后再运行:

mvn dependency:copy-dependencies -DoutputDirectory=lib
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/343133.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号