-1

Mavenプロジェクトに休止状態のアノテーションを追加しようとしましたが、次のエラーが発生しました:

  • ArtifactDescriptorException:hibernate-commons-annotations:hibernate-commons-annotations:jar:3.0.0.GAのアーティファクト記述子の読み取りに失敗しました:ArtifactResolutionException:hibernate-commons-annotations:hibernate-commons-annotations:pom:3.0.0の転送に失敗しましたhttp://repository.jboss.com/maven2/の.GAがローカルリポジトリにキャッシュされました。JBossリポジトリの更新間隔が経過するか、更新が強制されるまで、解決は再試行されません。元のエラー:アーティファクトhibernate-> commons-annotations:hibernate-commons-annotations:pom:3.0.0.GAをJBossリポジトリ(http://repository.jboss.com/maven2/)との間で転送できませんでした:アクセスが拒否されました>http://repository.jboss.com/maven2/hibernate-commons-annotations/hibernate-commons-annotations/3.0.0.GA/hibernate-commons-annotations-3.0.0.GA.pom。エラー>コード403、

私はこのコードを使用します

<repository>
  <id>JBoss repository</id>
  <url>http://repository.jboss.com/maven2/</url>
</repository>

<!-- Hibernate annotation -->
<dependency>
    <groupId>hibernate-annotations</groupId>
    <artifactId>hibernate-annotations</artifactId>
    <version>3.3.0.GA</version>
</dependency>

<dependency>
    <groupId>hibernate-commons-annotations</groupId>
    <artifactId>hibernate-commons-annotations</artifactId>
    <version>3.0.0.GA</version>
</dependency>
4

2 に答える 2

7

JBoss Mavenリポジトリの説明によると、は http://repository.jboss.com/maven2/非推奨であり、に置き換える必要がありますhttp://repository.jboss.org/nexus/content/groups/public/

開発者がJBossリポジトリを使用するようにMavenを設定する方法を読むことができます。

したがって、POMでは次を使用します。

<repositories>
  <repository>
    <id>jboss-public-repository-group</id>
    <name>JBoss Public Repository Group</name>
    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
  </repository>
</repositories>

依存関係についてはhibernate-annotations:hibernate-annotations:3.3.0.GA、Maven Centralリポジトリーがホストされていないため、MavenCentralリポジトリーを使用しても役に立ちません。ただし、 JBossDeprecatedのJBossリポジトリによってホストされています。
ただし、Maven Centralので(名前が変更されて)見つかりますorg.hibernate:hibernate-annotations:3.3.0.ga

非推奨のリポジトリを本当に使用したい場合:

<repositories>
  <repository>
    <id>jboss-deprecated</id>
    <name>JBoss Deprecated</name>
    <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
  </repository>
</repositories>

さまざまなJBossMavenリポジトリ/グループがそこで説明されています。

も参照してください:

JBossに関しては、非推奨のgroupIds(のようなhibernate-annotations)がそこで公開されています。

于 2012-10-24T15:55:50.620 に答える
0

代わりにMavenCentralリポジトリを使用してください。こちらをご覧ください。

于 2012-10-24T11:42:51.163 に答える