V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Newyorkcity
V2EX  ›  问与答

Cannot resolve plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0

  •  
  •   Newyorkcity · 2020-06-12 13:43:53 +08:00 · 2173 次点击
    这是一个创建于 1407 天前的主题,其中的信息可能已经有所发展或是发生改变。
    是不是可能因为我用的 maven 设置了国内镜像站(我用的阿里云的镜像站),然后国内镜像站没有这个插件,同时指定了镜像站,即便镜像站没有也不会前往中央仓库寻找??

    git clone https://github.com/apache/dubbo.git 到本地后用 IDEA 打开这个项目的文件夹,IDEA 自动(调用 maven )引入依赖。最终报错信息为 Cannot resolve plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0

    谢谢
    2 条回复    2020-06-12 14:39:52 +08:00
    soulzz
        1
    soulzz  
       2020-06-12 14:16:33 +08:00   ❤️ 1
    阿里云是有这个镜像的 ,但不在 central 库里

    基本信息
    仓库
    apache-snapshots
    名称
    maven-checkstyle-plugin/
    路径
    apache-snapshots/org/apache/maven/plugins/maven-checkstyle-plugin/
    Newyorkcity
        2
    Newyorkcity  
    OP
       2020-06-12 14:39:52 +08:00
    @soulzz 那我设置了阿里镜像站 maven 在镜像站里找不到 也不会再去中央仓库搜索吗?能否设置要求它去搜索呢?

    另外我回去看了下阿里 maven 镜像设置的文档 https://developer.aliyun.com/mirror/maven 里面有个:



    如果想使用其它代理仓库,可在<repositories></repositories>节点中加入对应的仓库使用地址。以使用 spring 代理仓为例:

    <repository>
    <id>spring</id>
    <url>https://maven.aliyun.com/repository/spring</url>
    <releases>
    <enabled>true</enabled>
    </releases>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
    </repository>

    这里是不是把其中的 spring 都换成 apache-snapshots 就能解决问题呢?

    谢谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2793 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:33 · PVG 20:33 · LAX 05:33 · JFK 08:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.