企業プロキシの背後に Nexus 2.2-01 をインストールしました。Maven は、Central リポジトリに直接アクセスすると動作しますが、構成する<mirror>
と単純なor%M2_HOME%\conf\settings.xml
を実行できません。mvn archetype:create
mvn clean
Nexus Web UI から、次のことができます。
- Central の「Browse Remote」。
- 「ブラウズインデックス」
- そして、「(ローカルにキャッシュされていない)」と表示されている「アーティファクト情報」タブから、jarをダウンロードできます
- 次に、「http://127.0.0.1:8081/nexus/content/groups/public/」および「\nexus\sonatype-work\nexus\storage\central」で .jar および .jar.sha1 ファイルを確認します。
.pom
...しかし、何らかの理由でファイルをダウンロードしません
Nexus 2.2 には事前設定された Central 用のプロキシ リポジトリが付属しており、Web UI から手動でインデックスを参照してファイルをダウンロードできますが、Maven からは機能しないのはなぜですか?
認証付きのデフォルトの HTTP プロキシ設定で Nexus を構成しましたが、次のようなエラーが引き続き発生します。
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1
or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to nexus
(http://myserver:8081/nexus/content/groups/public):
Failed to transfer file:
http://myserver:8081/nexus/content/groups/public/
org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom.
Return code is: 504, ReasonPhrase:Gateway Timeout. -> [Help 1]
と
[INFO] Scanning for projects...
Downloading: http://myserver:8081/nexus/content/groups/public/
org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] Failed to retrieve plugin descriptor for
org.apache.maven.plugins:maven-clean-plugin:2.4.1:
Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1
or one of its dependencies could not be resolved:
Failed to read artifact descriptor for
org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
Downloading: http://myserver:8081/nexus/content/groups/public/
org/codehaus/mojo/maven-metadata.xml
Downloading: http://myserver:8081/nexus/content/groups/public/
org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml
from/to nexus (http://myserver:8081/nexus/content/groups/public):
Failed to transfer file: http://myserver:8081/nexus/content/groups/public/org/
apache/maven/plugins/maven-metadata.xml.
Return code is: 504, ReasonPhrase:Gateway Timeout.