0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

mvnコマンドを走らせたときにエラーが出る

Posted at

現象

SpringBootプロジェクトをビルドしようとmvn packageコマンドを走らせたときに次のようなエラーが発生した。

.bash
Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-jar-plugin:2.6:jar: java.lang.ExceptionInInitializerError: null

解決方法

このリンクに解決方法が紹介されていた。

どうやらmavenプラグインのバージョンが古いことが問題らしい。
やることは単純で、pom.xml中のmaven-jar-pluginのバージョン指定を3.0.0とする。

pom.xml
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>3.0.0</version>
</plugin>

参考

maven-jar-plugin 2.6 has an incompatability issue with Big Sur M1 macs

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?