LinkNemo





Nemo博客

路漫漫其修远兮,吾将上下而求索。

  1. 博客主页
  2. 最新文章
  3. Springboot | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin

Springboot | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin

在整理springboot的基本架构时,某一个层在build的时候发生了如下异常:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building entity 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.hibernate:hibernate-validator:jar:5.3.4.Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for log4j:log4j:jar:1.2.16 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ entity ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ entity ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ entity ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/nemo/workspace/trunk/entity/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ entity ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ entity ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ entity ---
[INFO] 
[INFO] --- spring-boot-maven-plugin:1.5.2.RELEASE:repackage (default) @ entity ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.393 s
[INFO] Finished at: 2017-03-20T19:37:22+08:00
[INFO] Final Memory: 27M/347M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.2.RELEASE:repackage (default) on project entity: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.2.RELEASE:repackage failed: Unable to find main class -> [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

异常提示找不到main方法。

遂在该module的根包下新建了一个MailMudule.java,其中添加了main方法...

问题就没了。

暂时不明所以,先记录下来。。

评论

About ME

Nemo

Nemo

欢迎使用这个博客!如果您在使用的过程中有好的建议或者遇到问题,欢迎给我留言~

Other ME

性别:男

生日:1993-01-01

所在城市:深圳市

工作职务:菜鸟工程师

创建时间:2015/12/31 02:13:14

My SUMMARY

我的文章:370

我的留言:44

我的粉丝:45

我的关注:123

我的点击:343963

么么哒