• 2019年5月5日日曜日
アリスト戦記
アリスト戦記 https://blog.aristo-solutions.net/2019/05/springbootinstallerror-failed-to.html

SpringBootのinstallでエラー [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage (repackage) on project AristJavaTemplateBatch: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage failed: Unable to find a single main class from the following candidates

「maven install」をしようとしたら、こんなエラーが出てしまった。


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.657 s
[INFO] Finished at: 2019-05-05T20:26:45+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage (repackage) on project AristJavaTemplateBatch: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage failed: Unable to find a single main class from the following candidates [net.aristo.template.batch.App, net.aristo.template.batch.exe.PropertySampleExecuter, net.aristo.template.batch.exe.SpringBootApplicationExecuter, net.aristo.template.batch.exe.SystemDateExecuter, net.aristo.template.batch.exe.ValueSampleExecuter] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException


これはSpringBootの起点となる「@SpringBootApplication」が複数あると発生するエラーのようだ。

「@SpringBootApplication」は本当の頂点となるクラス一個だけにして、それ以外は「@compornet」に差し替えると正常に動いた。

0 件のコメント:

コメントを投稿