私は私のpom.xmlにonejar-のmaven-プラグインを使用しようとしています:EclipseのMavenプラグイン経由でそれを構築しようとすると、Sonatype Nexusを強制的に更新するには?
<plugin>
<groupId>org.dstovall</groupId>
<artifactId>onejar-maven-plugin</artifactId>
<version>1.4.4</version>
<executions>
<execution>
<configuration>
<mainClass>com.exmaple.myproj.MpPort_MpSoapPort_Client</mainClass>
<onejarVersion>0.97</onejarVersion>
<attachToBuild>true</attachToBuild>
<classifier>onejar</classifier>
</configuration>
<goals>
<goal>one-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<pluginRepositories>
<pluginRepository>
<id>onejar-maven-plugin.googlecode.com</id>
<url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
</pluginRepository>
</pluginRepositories>
が、何らかの理由で(Mavenのインストール)ビルドエラーで結果:
Downloading: https://mynexus.example.com/nexus/content/repositories/central/org/dstovall/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.pom
[INFO] Unable to find resource 'org.dstovall:onejar-maven-plugin:pom:1.4.4' in repository onejar-maven-plugin.googlecode.com (http://onejar-maven-plugin.googlecode.com/svn/mavenrepo)
Downloading: https://mynexus.example.com/nexus/content/repositories/central/org/dstovall/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.pom
[INFO] Unable to find resource 'org.dstovall:onejar-maven-plugin:pom:1.4.4' in repository central (http://repo1.maven.org/maven2)
Downloading: https://mynexus.example.com/nexus/content/repositories/central/org/dstovall/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.pom
[INFO] Unable to find resource 'org.dstovall:onejar-maven-plugin:pom:1.4.4' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.dstovall:onejar-maven-plugin
Reason: POM 'org.dstovall:onejar-maven-plugin' not found in repository: Unable to download the artifact from any repository
org.dstovall:onejar-maven-plugin:pom:1.4.4
from the specified remote repositories:
Nexus (https://mynexus.example.com/nexus/content/repositories/central)
for project org.dstovall:onejar-maven-plugin
は、だから私は手動でonejar-maven-plugin.jarをダウンロードして、コマンドラインからそれをインストールし、私は、同様のエラーを取得しているようだ:
C:\Users\daniel\myproj>mvn install:install-file -Dfile=onejar-maven-plugin-1.4.4.jar -DgroupId=com.jolira -DartifactId=onejar-maven-plugin -Dversion=1.4.4 -Dpackaging=jar
[INFO] Scanning for projects...
Downloading: https://mynexus.example.com/nexus/content/repositories/central/org/dstovall/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.pom
[INFO] Unable to find resource 'org.dstovall:onejar-maven-plugin:pom:1.4.4' in repository onejar-maven-plugin.googlecode.com (http://onejar-maven-plugin.googlecode.com/svn/mavenrepo)
Downloading: https://mynexus.example.com/nexus/content/repositories/central/org/dstovall/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.pom
[INFO] Unable to find resource 'org.dstovall:onejar-maven-plugin:pom:1.4.4' in repository central (http://repo1.maven.org/maven2)
Downloading: https://mynexus.example.com/nexus/content/repositories/central/org/dstovall/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.pom
[INFO] Unable to find resource 'org.dstovall:onejar-maven-plugin:pom:1.4.4' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.dstovall:onejar-maven-plugin
Reason: POM 'org.dstovall:onejar-maven-plugin' not found in repository: Unable to download the artifact from any repository
org.dstovall:onejar-maven-plugin:pom:1.4.4
from the specified remote repositories:
Nexus (https://mynexus.example.com/nexus/content/repositories/central)
for project org.dstovall:onejar-maven-plugin
私は、特定のアーティファクトを含んでいないネクサスミラーを持っているので、物事が混乱することが理解できます。
How to force Sonatype Nexus Regenerate/Reindex its Metadataの手順に従ってみましたが、「ブラウズインデックス」タブにそのようなコンテキストメニューはありません。 Sonatype Nexusの
私は「ネクサスは、クライアントのみが要求されているアーティファクトをキャッシュします。あなたが適切なバージョンを要求するために、プロジェクトのPOMSを設定する必要がありますので」とhereをお読みください。しかし、私がをやっているのと全く同じ結果であるを変更することなく。
この「chicken & egg」の状況からどうやって取得し、このonejar-maven-plugin verを取得しますか?私のNexusミラーに1.4.4?
(また、どのように私は私の地元の.m2キャッシュにそれを得るのですか?)
私は 'settings.xml'で' '要素を一時的にコメントアウトしようとしていました(少なくともパッケージをローカルの' .m2'に入れるための回避策として)。あなたがもっと賢明な洞察力を持っていることに気付きました。彼のネクサスはcom.dotovalではなくcom.joliraを指しています。 +1! –
sfinja
誤った参照を持つpom.xmlファイルです。実際にNexusとは関係ありません。 –
彼が提供したスクリーンショットを見ると、彼のネクサスは 'nejar-maven-plugin'を指しています。' dstoval'ではなく 'jolira'からのみです。これが彼のMavenのインストールを失敗させる原因にはなりませんか? – sfinja