LoginSignup
3
7

More than 5 years have passed since last update.

Proxy環境下でMaven3プロジェクト

Posted at

事の起こり

社内Proxy環境でMaven3プロジェクトを開発しているチームに入ったのでリポジ
トリからgit cloneしてきた。

ワクワクしながらIntelliJを立ち上げてインポートして、まずはmvn install
かなーと思ってやってみると

Plugin org.apache.maven.plugins:maven-plugin-plugin:3.4 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-plugin-plugin:jar:3.4: Could not
transfer artifact org.apache.maven.plugins:maven-plugin-plugin:pom:3.4
from/to central (http://repo.maven.apache.org/maven2): null to
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/3.4/maven-plugin-plugin-3.4.pom:
UnresolvedAddressException -> [Help 1]

あれー!

こうしたら直った

stackoverflowとか見てみたけど、「いや、普
通に勝手に読み込むで。」みたいな答えしかなく。

結果先輩に相談したら「 proxy設定にhttps追加して、~/.m2/にsetting.xml配
置してみて。インストールディレクトリにあるのと同じやつ。
」と教えてい
ただいて解決。

~/.m2/にもsetting.xmlを配置しておかなければいけなかったらしい。
Maven2についてのエントリにはそのようなことが書いてあることもあったけど、
Maven3についての記事にはインストールディレクトリ配下のsetting.xmlにつ
いてしか記述がなかったので、勝手に仕様が変わったんだと思ってた…。

やれることは全部試せ 、ってことですね。

3
7
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
3
7