MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    Gradle 总是在每次 build 下载 pom 文件

    开发交流
    5
    23
    2046
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Peanuuutz
      Peanuuutz last edited by

      像这样:

      pom 文件

      导致 build 非常慢(大约 10 分钟)。

      检查 .gradle/cache/modules-2 下也没发现实际下载的 pom 文件,也就是说每次下载都是失败的。

      检查 IDE 和 Gradle 代理没发现问题。

      1 Reply Last reply Reply Quote 0
      • Nambers
        Nambers 摸鱼 last edited by

        gradle 里加国内镜像?

        Peanuuutz 1 Reply Last reply Reply Quote 0
        • Peanuuutz
          Peanuuutz @Nambers last edited by

          @nambers 像这样?一直都有来着。

          1 Reply Last reply Reply Quote 0
          • RainChan
            RainChan 摸鱼 last edited by

            理论上下载一次后第二次就能直接使用缓存,可能是内第一次就没有下载成功?

            Peanuuutz Orisland 2 Replies Last reply Reply Quote 0
            • Nambers
              Nambers 摸鱼 last edited by

              mavenLocal() ?

              Peanuuutz 1 Reply Last reply Reply Quote 0
              • Peanuuutz
                Peanuuutz @RainChan last edited by

                @rainchan 搜索 .gradle/cache 没找到这些 pom 文件,就感觉是没一次成功过,但是也不报错。

                Orisland 1 Reply Last reply Reply Quote 0
                • Orisland
                  Orisland 摸鱼 @Peanuuutz last edited by

                  @peanuuutz 选择本地构建。20474783-2f4f-40bc-97d6-9628e4532058-image.png
                  前提是你的本地已经成功进行过一次构建了,新加依赖的时候别忘了打开,否则下载会失败。

                  Peanuuutz 1 Reply Last reply Reply Quote 0
                  • Peanuuutz
                    Peanuuutz @Orisland last edited by

                    @orisland 感谢,不过下载问题是怎么个情况?

                    Orisland 1 Reply Last reply Reply Quote 0
                    • Orisland
                      Orisland 摸鱼 @Peanuuutz last edited by

                      @peanuuutz 暂时不清楚,我理解为一直在尝试获取版本更新(我关闭梯子后立即构建失败,显示get pom链接错误),但是目前这种方法勉强可以解决,暂时没有思考具体原因。

                      1 Reply Last reply Reply Quote 0
                      • Orisland
                        Orisland 摸鱼 @RainChan last edited by

                        @rainchan 我也有此问题,但是一直在下载而不是检测本地,必须手动打开离线构建才可以,否则每重启一次bot大约需要1分钟或者更多时间进行pom下载等操作,不知道具体原因如何。

                        Nambers 1 Reply Last reply Reply Quote 0
                        • Nambers
                          Nambers 摸鱼 @Orisland last edited by

                          @orisland 加mavenLocal看看

                          Orisland 1 Reply Last reply Reply Quote 0
                          • Orisland
                            Orisland 摸鱼 @Nambers last edited by

                            @nambers 解决,感谢,好耶(σ≧∀≦)σ
                            @Peanuuutz 在这里加个mavenLocal()

                            repositories {
                                maven("https://maven.aliyun.com/repository/public")
                                mavenCentral()
                                mavenLocal()
                                jcenter()
                            }
                            
                            
                            Nambers 1 Reply Last reply Reply Quote 0
                            • Nambers
                              Nambers 摸鱼 @Orisland last edited by Nambers

                              @orisland jcenter要关了,不用加 :D
                              mavenCenter是他的替代品

                              Orisland 1 Reply Last reply Reply Quote 0
                              • Orisland
                                Orisland 摸鱼 @Nambers last edited by

                                @nambers 吼的,这就去删。

                                1 Reply Last reply Reply Quote 0
                                • Peanuuutz
                                  Peanuuutz @Nambers last edited by Peanuuutz

                                  @nambers 加了 mavenLocal() 还是在反复下载 pom :(

                                  Orisland Nambers 2 Replies Last reply Reply Quote 0
                                  • Orisland
                                    Orisland 摸鱼 @Peanuuutz last edited by

                                    @peanuuutz 还是用我的吧,手动关掉。

                                    1 Reply Last reply Reply Quote 0
                                    • Nambers
                                      Nambers 摸鱼 @Peanuuutz last edited by

                                      @peanuuutz 是每次都下一遍吗? 把mavenLocal()加到最前面试一下(仓库的排序顺序

                                      Orisland Peanuuutz 2 Replies Last reply Reply Quote 0
                                      • Orisland
                                        Orisland 摸鱼 @Nambers last edited by

                                        @nambers 实测无效,依然download???
                                        7528ef6f-c816-47ac-b241-325897ce92e7-image.png

                                        1 Reply Last reply Reply Quote 0
                                        • Peanuuutz
                                          Peanuuutz @Nambers last edited by

                                          @nambers 问题依然。

                                          1 Reply Last reply Reply Quote 0
                                          • cssxsh
                                            cssxsh last edited by cssxsh

                                            .\gradlew build --stacktrace 添加--stacktrace 参数,查看详细构建日志

                                            Peanuuutz 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact