Quantcast
Channel: プログラム の個人的なメモ
Viewing all articles
Browse latest Browse all 860

【トラブル】Maven の トラブルシューティング

$
0
0

■ 「mvn package」を入力すると、以下のようなエラーが表示される場合がある

 * コマンドプロンプトで、「mvn package」を入力すると、以下のようなエラーが表示される場合がある

エラー内容

Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one.

原因

 * 有効な pom.xml があるフォルダで、ビルドする必要がある

解決策

 * おかしいなっと思ったら...

 - プロジェクトを右クリックし、[Maven]-[Update Dependency]をして、アップデータを掛ける
 - 一旦、Eclipseを再起動


■ 「Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin」が表示される

エラー内容

その1
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
その2
Failure to find org.apache.maven.plugins:maven-shade-plugin:jar:3.2
 in https://repo.maven.apache.org/maven2 was cached in the local repository,
 resolution will not be reattempted until the update interval of central has elapsed or updates are forced

解決策

 * Windowsの場合、C:\Users\YourUserName\.m2 配下の「repository」を削除

参考文献

https://qiita.com/gishi_yama/items/67e4c12ae90ad34e652b


関連記事

Maven ~ 入門編 ~

http://blogs.yahoo.co.jp/dk521123/19372494.html

Maven ~ あれこれ編 ~

https://blogs.yahoo.co.jp/dk521123/9082090.html

Viewing all articles
Browse latest Browse all 860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>