解决[ERROR] [ERROR] Some problems were encountered while processing the POMs

在执行mvn -Dmaven.test.skip=true的时候报错:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 54, column 15[ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.5.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.github.maven-nar:nar-maven-plugin:jar:3.5.0, org.codehaus.plexus:plexus-utils:jar:1.1: **Could not find artifact com.github.maven-nar:nar-maven-plugin:jar:3.5.0 in ibiblio (http://mirrors.ibiblio.org/maven2/)** @[ERROR] Unknown packaging: nar @ line 9, column 14 @[ERROR] The build could not read 1 project -> [Help 1][ERROR][ERROR]   The project edu.hit.ir.ltp4j:ltp4j:0.1.0-SNAPSHOT (D:\Experiences\ltp4j-master\ltp4j-master\pom.xml) has 2 errors[ERROR]     Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.5.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.github.maven-nar:nar-maven-plugin:jar:3.5.0, org.codehaus.plexus:plexus-utils:jar:1.1: Could not find artifact com.github.maven-nar:nar-maven-plugin:jar:3.5.0 in ibiblio (http://mirrors.ibiblio.org/maven2/) -> [Help 2][ERROR]     Unknown packaging: nar @ line 9, column 14[ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR][ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

解决方法:

我之前安装maven时修改了默认的中央仓库镜像,在settings.xml文件中加入了

     <mirror>
       <id>ibiblio</id>
       <mirrorOf>central</mirrorOf>
       <name>Human Readable Name for this Mirror.</name>
       <url>http://mirrors.ibiblio.org/maven2/</url>
     </mirror>

后来借鉴这篇博客,把上面加的文本都删掉,改成了阿里云的中央仓库,也就是用如下文本替代上面的文本。

        <!-- 阿里云仓库 -->
        <mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        </mirror>
    
        <!-- 中央仓库1 -->
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo1.maven.org/maven2/</url>
        </mirror>
    
        <!-- 中央仓库2 -->
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror> 

解决问题。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值