Newyorkcity
V2EX  ›  问与答

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

  •  
  •   Newyorkcity · Jun 12, 2020 · 2606 views
    This topic created in 2210 days ago, the information mentioned may be changed or developed.
    是不是可能因为我用的 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 replies    2020-06-12 14:39:52 +08:00
    soulzz
        1
    soulzz  
       Jun 12, 2020   ❤️ 1
    阿里云是有这个镜像的 ,但不在 central 库里

    基本信息
    仓库
    apache-snapshots
    名称
    maven-checkstyle-plugin/
    路径
    apache-snapshots/org/apache/maven/plugins/maven-checkstyle-plugin/
    Newyorkcity
        2
    Newyorkcity  
    OP
       Jun 12, 2020
    @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 就能解决问题呢?

    谢谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   956 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 21:51 · PVG 05:51 · LAX 14:51 · JFK 17:51
    ♥ Do have faith in what you're doing.