建筑学:
公司关系设置在 box1:8081
Hudson 设置在 box1:8090
上述两个系统都有代理并且可以成功访问公共互联网(通过 Nexus 的远程浏览能力确认,并且 Hudson 能够按预期构建一个 maven 项目,填充 hudson 正在使用的新 .m2/repository)
但是 - 当我编辑 settings.xml 以使用 nexus 镜像时(根据行上的多个指令,即:here),将我的存储库重命名为 repository_old (这样我可以在有问题时跟踪获取的新依赖项),然后运行简单的 Maven 目标,如 clean 或 install,我遇到了一个奇怪的情况。
命令终端会输出
Downloading: http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
4 KB
[WARNING] Checksum validation failed, expected <!DOCTYPE but is f91612c35130352fb87d878ad11e365864726080 for http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
4 KB
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 45ab043cf424aacf8b314b01bdae110516db8d1f for http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
Downloaded: http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom (4 KB at 1.0 KB/sec)
[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Downloading: http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.jar
4 KB
[WARNING] Checksum validation failed, expected <!DOCTYPE but is ac40ff8e0340bd60e08433c1440a699049d77126 for http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.jar
4 KB
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 11b860e6a486fb2e5c1ffcc56d9240139dcfb2f0 for http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.jar
Downloaded: http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.jar (4 KB at 13.3 KB/sec)
而且,在这个例子中 - 网址
http://box1:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
是准确的,并且可以从我的本地工作站和 box1 环境中解决。
然而。当我挖掘 org/apache/maven/plugins/maven-dependency-plugin/2.1/ 的新存储库文件夹(和子文件夹)并打开 maven-dependency-plugin-2.1.pom 我看到网络错误
The page http://www.box1.com/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom Cannot be found
注意以下问题:
www 前缀
.com 后缀
no nexus 端口
知道什么是错误配置吗?感觉就像 nexus 服务器试图按摩传入的请求 URL 并假设(错误地)域后缀和端口?