5

Maven Center を含むグループ タイプのリポジトリを持つ Nexus サーバーがあります。Maven Center [1]でorg.codehaus.mojo:cobertura-maven-plugin:2.5.1 成果物 (pom と jar の両方)を確認できますが、Maven を使用してこの成果物をダウンロードしようとすると、次のように表示されます。

Downloading: https://example.com/nexus/content/groups/all/org/codehaus/mojo/cobertura-maven-plugin/2.5.1/cobertura-maven-plugin-2.5.1.pom
[WARNING] The POM for org.codehaus.mojo:cobertura-maven-plugin:jar:2.5.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.523s
[INFO] Finished at: Wed May 16 16:31:24 EEST 2012
[INFO] Final Memory: 18M/219M
[INFO] ------------------------------------------------------------------------
[INFO] [16:31:24.647] Execute org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura done: 3978 ms
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] example project 1 ................................. FAILURE [10.077s]
[INFO] example project 2 ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.804s
[INFO] Finished at: Wed May 16 16:31:24 EEST 2012
[INFO] Final Memory: 17M/218M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.mojo:cobertura-maven-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:cobertura-maven-plugin:jar:2.5.1: Could not find artifact org.codehaus.mojo:cobertura-maven-plugin:pom:2.5.1 in example.com (https://example.com/nexus/content/groups/all) -> [Help 1]
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project example project 1: Can not execute Sonar: Unable to execute maven plugin: Exception during execution of org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura -> [Help 2]

アーティファクトをダウンロードできない理由はありますか?

UPD:はい、settings.xml でミラーを設定しました。はい、リポジトリは「サービス中」であり、リバース プロキシのみが使用されます。

4

2 に答える 2

1

定義した「all」グループを指す settings.xml が必要です。さらに、リポジトリと pluginRepository ( http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.htmlを参照) の「central」をオーバーライドし、central がその一部であることを確認する必要があります。あなたのすべてのグループ。

それがすべてうまくいったら、プロジェクトをもう一度試して、 -U などで強制的に更新してください。

mvn -U clean install
于 2012-11-21T16:42:28.787 に答える
0

プラグインは、「通常の」アーティファクトとは異なるリポジトリに保存されることがよくあります(ただし、私が理解しているように、そうする必要がある本当の理由はなく、しばしばそのように行われます)。

構成を再確認し、指しているグループで中央のプラグインが利用可能であることを確認してください。Nexus の設定を表示すると、問題を特定できる場合があります。

于 2012-05-20T02:57:46.750 に答える