Maven appears when packaging spring boot with the package: unable-Find a single main class from the following candidates problem solving

Source: Internet
Author: User

The problem is as follows:

[ERROR] Failed to execute goal org.springframework. Boot : Spring-boot-maven-plugin:1.3.5.release: Repackage on project information: Execution default of goal org.springframework. Boot : Spring-boot-maven-plugin:1.3.5.release: Repackagefind a single main class from The following candidates [Com.hhly.InformationApplication, Com.hhly.test.Application]--[help 1]

Workaround:

This error is due to the fact that MAVEN looks for the main method in the project when it executes the package and sets the boot entry for the spring boot build jar package, but there are multiple main methods that the MAVEN plugin cannot confirm. Therefore, this exception occurs.

1. Comment out other useless main methods to resolve this problem.

2. Specify the entry on the command:

-dstart-class=Com.jsoft.MainClass

Reference:

Http://www.cnblogs.com/xingzc/p/5972488.html

http://blog.csdn.net/yuechang5/article/details/52489911

1190000007462351

Maven appears when packaging spring boot with the package: unable-Find a single main class from the following candidates problem solving

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.