2017-06-13 8 views
0

私はMavenを使い慣れています。私はjava/maven2のpom.xmlファイルにorg.mapdbへの参照を追加しようとしていますが、mavenはリモートリポジトリからmapdbアーティファクトをダウンロードできないようです。org.mapdbとmaven2のトラブル

私がやった: まず最初:settings.xml内の構成されたリモートのMavenリポジトリ

第二:用に設定されたプロキシ設定達人

第三:私のPOMファイルに次の行を追加

<dependency> 
    <groupId>org.mapdb</groupId> 
    <artifactId>mapdb</artifactId> 
    <version>3.0.4</version> 
    <type>bundle</type> 
</dependency> 

プロキシとリポジトリ関連のデータは大丈夫です:私は自分のプロジェクトに他の依存関係(org.osgi.coreやjunitなど)をダウンロードできます。

ビルドには、次のメッセージで失敗します。

Downloading: http://repo1.maven.org/maven2/org/mapdb/mapdb/3.0.4/mapdb-3.0.4.bundle 
[INFO] Unable to find resource 'org.mapdb:mapdb:bundle:3.0.4' in repository central (http://repo1.maven.org/maven2) 
[INFO]  ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO]  ------------------------------------------------------------------------ 
[INFO] Failed to resolve artifact. 

Missing: 
---------- 
1) org.mapdb:mapdb:bundle:3.0.4 

    Try downloading the file manually from the project website. 

    Then, install it using the command: 
    mvn install:install-file -DgroupId=org.mapdb -DartifactId=mapdb -Dversion=3.0.4 -Dpackaging=bundle -Dfile=/path/to/file 

    Alternatively, if you host your own repository you can deploy the file there: 
    mvn deploy:deploy-file -DgroupId=org.mapdb -DartifactId=mapdb -Dversion=3.0.4 -Dpackaging=bundle -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 

    Path to dependency: 
1) com.sirti.NOC.acc_gw:DB_writer:jar:0.0 
2) org.mapdb:mapdb:bundle:3.0.4 

---------- 
1 required artifact is missing. 

for artifact: 
    com.sirti.NOC.acc_gw:DB_writer:jar:0.0 

from the specified remote repositories: 
    central (http://repo1.maven.org/maven2) 

私はすでに手動でリポジトリを閲覧しようとしました、と私はもちろんhttp://repo1.maven.org/maven2/org/mapdb/mapdb/3.0.4/

でて、mapdb瓶を見てきました、私は手動でダウンロードし、jarファイルをインストールすることができしかし、もし私がそれをしなければならない場合、メイヴンを使用する際のポイントは何ですか?

答えて

0

最後に、mapdbパッケージをダウンロードできました。

のみ依存関係の宣言から

<type>bundle</type> 

タグを削除する必要がありました。

+0

私はまだなぜかと思っています.... – jazzter

関連する問題