LoginSignup
0
0

mvn install が失敗する

Posted at

備忘録

エラー

$ mvn clean package

[ERROR] Failed to execute goal on project ... 
from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [...] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

原因

maven-default-http-blocker が肝。
maven3.8.1 よりpom.xml内のhttpでの指定がブロックされるようになった模様。
Maven3.8.1リリースノート

対策

mvnの設定において、maven-default-http-blockerをスキップさせる。
※homebrewでmvnをインストールした環境

$ vi /opt/homebrew/Cellar/maven/3.9.2/libexec/conf/settings.xml

maven-default-http-blocker 箇所をコメントアウト。

<!--
<mirror>
	<id>maven-default-http-blocker</id>
	<mirrorOf>external:http:*</mirrorOf>
	<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
	<url>http://0.0.0.0/</url>
	<blocked>true</blocked>
</mirror>
-->

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0