'mvn 发布:执行'部署到 Archiva 时花费的时间太长
“mvn release:perform”将工件部署到 Archiva 所需的时间太长。日志显示“release:perform”快速完成其工作(测试、打包、源代码、javadoc...),但需要太长的匹配时间才能完成从 Archiva 下载“maven-metadat.xml”。使用浏览器执行相同的下载请求也需要太长的匹配时间。
有人知道如何让 Archiva 更快吗?
热烈问候
Younes Ouadi
有关我所面临问题的更多详细信息。希望这有助于解决/回答这个问题。
亲爱的朋友们,
我正在使用 Maven 发布插件将我的项目工件发布到 Archiva。发布:准备效果很好。然而,release:perform 花费的时间太长。我有一个包含大约 150 个工件的项目。最后一次尝试“release:perform”已经花费了近 10 个小时。
我检查了日志,发现当 Maven 尝试下载每个工件的“maven-metadata.xml”时,Archiva 需要太多时间来回复。同时,上传项目工件需要合理的时间。下面的日志符合我的发现。
任何人都可以帮助弄清楚为什么 Archiva 需要花费太多时间来下载每个工件的“maven-metadata.xml”?
一个工件的日志如下。所有 150 件文物都出现了同样的行为。我故意在每个请求之间放置空行,以便于后续操作。
1) 'mvn release:perform' 的日志(没有时间戳,但是从 Maven 的角度来看,序列请求很容易知道) [信息] [信息] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ com.natisco.commons.exceptions ---
[信息] 上传: .../com/natisco/com.natisco .commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar [信息]已上传:.../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar(16 KB,127.6 KB/秒)
[信息]正在上传: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom [信息]已上传:.../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom(2 KB,47.8 KB/秒)
[信息]正在下载:.. ./com/natisco/com.natisco.commons.exceptions/maven-metadata.xml [信息]下载:.../com/natisco/com.natisco.commons.exceptions/maven-metadata.xml(343 B,0.0 KB/秒)
[信息]上传:.../com/natisco/com。 natisco.commons.exceptions/maven-metadata.xml [信息] 上传:.../com/natisco/com.natisco.commons.exceptions/maven-metadata.xml(371 B,6.8 KB/秒)
[信息] 上传:.../com.natisco.commons。异常/0.4/com.natisco.commons.exceptions-0.4-sources.jar [信息]已上传:.../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar(11 KB,295.8 KB/秒)
[信息]正在上传: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar [信息] 已上传:.../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar(75 KB,1487.2 KB/秒)
2)从“2011_11_13.request.log”中提取的 Archiva 日志 127.0.0.1 - - [13/Nov/2011:08:24:14 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4.jar HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)” 127.0.0.1 - - [13/Nov/2011:08:24:15 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4.jar.sha1 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)” 127.0.0.1 - - [13/Nov/2011:08:24:15 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4.jar.md5 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)”
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 ( Java 1.6.0_14; 2.6.27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:24:15 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4.pom.sha1 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)” 127.0.0.1 - - [13/Nov/2011:08:24:15 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4.pom.md5 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)”
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000]“GET /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml HTTP/1.1" 200 343 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6。 27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“GET /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml.sha1 HTTP/ 1.1" 200 60 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml HTTP/1.1” 204 0 “-” “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml.sha1 HTTP/ 1.1" 204 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml.md5 HTTP/ 1.1" 204 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "放置/archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar HTTP/1.1" 201 0 "-" "Apache-Maven/3.0. 3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4-sources.jar.sha1 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)” 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4-sources.jar.md5 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)”
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar HTTP/1.1" 201 0 "-" "Apache-Maven/3.0. 3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)" 127.0.0.1 - - [13/Nov/2011:08:27:52 +0000]“PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions -0.4-javadoc.jar.sha1 HTTP/1.1" 201 0 "-" “Apache-Maven/3.0.3(Java 1.6.0_14;Linux 2.6.27.41-170.2.117.fc10.i686)”
预先感谢您的帮助。
尤尼斯·瓦迪
'mvn release:perform' takes too long to deploy artifacts to Archiva. The logs shows that the 'release:perform' do its job quickly (test, package, source, javadoc...) but it takes too match time to complete download of 'maven-metadat.xml' from Archiva. Exceuting the same download request using a browser takes also too match time.
Anybody knows how to push Archiva to be quicker?
Warm regards
Younes Ouadi
More details about the issue I'm facing. Hope this help to get it resolved/answered.
Hello dears,
I'm using maven release plugin to release my project artifacts to Archiva. release:prepare works nicely. However, release:perform takes too long. I have a project with aroung 150 artifacts. The last try of 'release:perform' has took almost 10 hours.
I have checked the logs and figure out that Archiva takes too much time to reply when maven tries to download 'maven-metadata.xml' of each artifact. In the same time, uploading project artifacts takes reasonable time. The logs below conforms my findings.
Anybody can help to figure out why Archiva takes too much time to react to downloading 'maven-metadata.xml' of each artifact?
The logs are as follow for one artifact. The same behavior is witnessed for all the 150 artifacts. I have put deliberately empty lines between each request just to easy follow up.
1) Logs of 'mvn release:perform' (no time stamping but, the sequence requests is nice to know from maven stand point)
[INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ com.natisco.commons.exceptions ---
[INFO] Uploading: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar
[INFO] Uploaded: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar (16 KB at 127.6 KB/sec)
[INFO] Uploading: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom
[INFO] Uploaded: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom (2 KB at 47.8 KB/sec)
[INFO] Downloading: .../com/natisco/com.natisco.commons.exceptions/maven-metadata.xml
[INFO] Downloaded: .../com/natisco/com.natisco.commons.exceptions/maven-metadata.xml (343 B at 0.0 KB/sec)
[INFO] Uploading: .../com/natisco/com.natisco.commons.exceptions/maven-metadata.xml
[INFO] Uploaded: .../com/natisco/com.natisco.commons.exceptions/maven-metadata.xml (371 B at 6.8 KB/sec)
[INFO] Uploading: .../com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar
[INFO] Uploaded: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar (11 KB at 295.8 KB/sec)
[INFO] Uploading: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar
[INFO] Uploaded: .../com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar (75 KB at 1487.2 KB/sec)
2) Logs of Archiva as extracted from '2011_11_13.request.log'
127.0.0.1 - - [13/Nov/2011:08:24:14 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar.sha1 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.jar.md5 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom.sha1 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4.pom.md5 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:24:15 +0000] "GET /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml HTTP/1.1" 200 343 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "GET /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml.sha1 HTTP/1.1" 200 60 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml HTTP/1.1" 204 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml.sha1 HTTP/1.1" 204 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/maven-metadata.xml.md5 HTTP/1.1" 204 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar.sha1 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-sources.jar.md5 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
127.0.0.1 - - [13/Nov/2011:08:27:52 +0000] "PUT /archiva/repository/internal/com/natisco/com.natisco.commons.exceptions/0.4/com.natisco.commons.exceptions-0.4-javadoc.jar.sha1 HTTP/1.1" 201 0 "-" "Apache-Maven/3.0.3 (Java 1.6.0_14; Linux 2.6.27.41-170.2.117.fc10.i686)"
Thank you in advance for your help.
Younes Ouadi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
缓慢的请求是元数据文件的
GET
。这可能意味着它是尝试从速度缓慢或超时的外部源进行代理。
检查您的代理连接器并禁用任何可能速度较慢的连接器。您还应该添加白名单
/ 黑名单,以确保外部来源不会用于请求 com.natisco.* 工件。
(另请参阅 [电子邮件受保护] 上的帖子:http://s.apache.org/Xph)
The slow requests are the
GET
for the metadata file. What this probably means is that it istrying to proxy from an external source that is slow or timing out.
Check your proxy connectors and disable any that may be slow. You should also add whitelists
/ blacklists to make sure external sources are not used to request
com.natisco.*
artefacts.(See also thread on [email protected]: http://s.apache.org/Xph)