搭建了https://dl.bintray.com/cuba-platform/main的nexus的代理仓库。但是在项目中引用的时候报错

报错信息如下
image

项目中直接引用https://dl.bintray.com/cuba-platform/main资源时一切正常,但是引用https://dl.bintray.com/cuba-platform/main的nexus代理仓库就报错。

你看下你仓库的 log 里有什么error warning 没有。
你下载的 apache 的包也去 cuba 仓库下载,可能是网速原因没下下来,超时也会报下不下来。
一般应该在 cuba 的远程仓库配置只下 cuba 的库,其他的可以去阿里云的仓库下,速度会好些,比如下面这种,只从 cuba 仓库下 cuba 的东西。其他的去阿里云。
image
image

image
本地搭建nexus仓库是可以用的,但是打到另一台服务器上就用不了了

这个错误截图上面、右边看不到,截图全一些我看下。
不过看这行:
image

还是超时。 cuba仓库在国外,下非cuba的东西又慢又不稳定, 浪费开发时间呢。 建议你合理部署一下仓库。

image

满版的time out, 超时。

还是建议从cuba仓库只下载cuba的东西, 要么就公司升级带宽,搞VPN啥的。

还有就是建议把log文字复制,然后用下面的方式贴上(log或者源代码放在一对```之间)。 这样看起来比较方便。
image

效果如下:

your logs 
2019-09-02 17:00:20,831+0800 INFO  [pxpool-1-thread-12] admin org.sonatype.nexus.index.DefaultIndexerManager - Publishing index for repository cuba-work2
2019-09-02 17:00:20,932+0800 INFO  [pxpool-1-thread-12] admin org.sonatype.nexus.index.tasks.UpdateIndexTask - Scheduled task (UpdateIndexTask) finished :: Updating repository index "cuba-work2" from path null and below. (started 2019-09-02T17:00:19+08:00, runtime 0:00:01.225)
2019-09-02 17:00:21,023+0800 INFO  [pxpool-1-thread-12] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Scheduled Tasks] made by *TASK...
2019-09-02 17:00:21,326+0800 INFO  [ar-4-thread-3] admin org.sonatype.nexus.proxy.maven.routing.internal.RemoteScrapeStrategy - Not possible remote scrape of M2Repository(id=cuba-work2), no scraper succeeded.
2019-09-02 17:00:40,219+0800 INFO  [qtp84374879-238] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [cuba-work2] made by admin...
2019-09-02 17:00:40,503+0800 INFO  [ar-4-thread-4] admin org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - Updating remote transport for proxy repository "cuba-work2" [id=cuba-work2]...
2019-09-02 17:00:41,604+0800 INFO  [ar-4-thread-4] admin org.sonatype.nexus.proxy.maven.routing.internal.RemoteScrapeStrategy - Not possible remote scrape of M2Repository(id=cuba-work2), no scraper succeeded.
2019-09-02 17:01:06,791+0800 INFO  [qtp84374879-171] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [cuba-group] made by admin...
2019-09-02 17:04:46,534+0800 INFO  [qtp84374879-236] admin com.sonatype.nexus.plugins.outreach.internal.outreach.SonatypeOutreach - Could not download page bundle
org.apache.http.conn.ConnectTimeoutException: Connect to sonatype-download.global.ssl.fastly.net:443 [sonatype-download.global.ssl.fastly.net/74.86.151.167] failed: connect timed out
2019-09-02 17:05:08,636+0800 INFO  [qtp84374879-237] admin com.sonatype.nexus.plugins.outreach.internal.outreach.SonatypeOutreach - Could not download page bundle
org.apache.http.conn.ConnectTimeoutException: Connect to sonatype-download.global.ssl.fastly.net:443 [sonatype-download.global.ssl.fastly.net/74.86.151.167] failed: connect timed out
2019-09-02 17:06:04,406+0800 INFO  [Thread-20] *SYSTEM org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Validating all active sessions...
2019-09-02 17:06:04,406+0800 INFO  [Thread-20] *SYSTEM org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Finished session validation.  No sessions were stopped.
2019-09-02 17:34:44,644+0800 INFO  [ar-4-thread-3] *SYSTEM org.sonatype.nexus.proxy.maven.routing.internal.RemoteContentDiscovererImpl - Remote strategy prefix-file on M2Repository(id=central) detected invalid input, results discarded: Prefix file size exceeds maximum allowed size (100000), refusing to load it.
2019-09-02 18:06:04,404+0800 INFO  [Thread-20] *SYSTEM org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Validating all active sessions...
2019-09-02 18:06:04,404+0800 INFO  [Thread-20] *SYSTEM org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Finished session validation.  No sessions were stopped.

image nexus还经常报这种错误
image 私仓里头是有东西的

time out就是超时。私仓有东西它也会去远程仓库去同步下载的。不是一次下好了,就永远用这一版。

这个私仓是刚刚搭起来的

https://support.sonatype.com/hc/en-us/articles/213464978-How-to-avoid-Could-not-download-page-bundle-messages

你看下这个,可能能解决log里Could not download page bundle的错误。一个一个来吧。

这个Could not download page bundle不影响cuba编译的时候下载其他库。 还是重点看看起cuba的时候,后台的错误吧。 都不同。
部署或者起cuba服务,然后看下仓库log的输出。