Java:Maven:Eclipseでmavenプロジェクトが使えるようになるまで の変更点
Top / Java:Maven:Eclipseでmavenプロジェクトが使えるようになるまで
- 追加された行はこの色です。
- 削除された行はこの色です。
- Java:Maven:Eclipseでmavenプロジェクトが使えるようになるまで へ行く。
- Java:Maven:Eclipseでmavenプロジェクトが使えるようになるまで の差分を削除
*Java:Maven:Eclipseでmavenプロジェクトが使えるようになるまで [#g6e2c4f1] この記事はPleiadesの4.3 Keplerをダウンロードしてきてから発生したエラーとその対象をまとめたものです。 ***最初にやったこと [#k5dba536] ダウンロード直後には、mavenの設定ファイルが存在しないため、空の設定ファイルを作成しました。 やり方は +【メニュー】→【ウィンドウ】→【設定】 +【Maven】→【ユーザ設定】 +ユーザ設定ファイルがありません的なメッセージが出力されているため、表示されているパスにsertting.xmlを作成し、指定。 setting.xmlのひな形は以下のURLよりゲット。 -http://maven.apache.org/settings.html ちなみに、コピペするとこれです。 ><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 > http://maven.apache.org/xsd/settings-1.0.0.xsd"> > <localRepository/> > <interactiveMode/> > <usePluginRegistry/> > <offline/> > <pluginGroups/> > <servers/> > <mirrors/> > <proxies/> > <profiles/> > <activeProfiles/> ></settings> まあ、設定が必要な項目を設定します。 ※小生はプロキシの設定を入れてます。 ***「Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved」が発生 [#x223b43a] まず、Pleiadesを起動して、mavenプロジェクトを作成しようとしたら、以下のようなエラーが発生しました。 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved 意味不明でしたが、mavenのキャッシュファイルをすべて削除し、再度実行することで問題が解消しました。 削除ディレクトリ:[ホームディレクトリ]\.m2\repository\* -削除ディレクトリ:[ホームディレクトリ]\.m2\repository\* ***JavaDocとソースコードを自動でダウンロードするようにする。 [#o91cbb3c] pomに以下の内容を追記することでできます。 <build> <plugins> <plugin> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </configuration> </plugin> </plugins> </build> ***参考サイト [#a4584865] キャッシュクリアについてのstackoverflow -http://stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources JavaDocとかをダウンロード -http://onestopinfolink.wordpress.com/2009/05/17/maven%E3%81%A7dependency%E3%81%AE%E3%82%BD%E3%83%BC%E3%82%B9%E3%81%A8javadoc%E3%82%92%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89%E3%81%99%E3%82%8B/