1. 程式人生 > >Springboot | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin

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

"D:\Program Files\Java\jdk1.8.0_66\bin\java" -Dmaven.multiModuleProjectDirectory=D:\Repository\Git\Eshare_practices\SpringBootDemo -DarchetypeCatalog=internal -Dmaven.home=D:\Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3 -Dclassworlds.conf=D:\Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3\bin\m2.conf -Didea.launcher.port=7535 "-Didea.launcher.bin.path=D:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.3\bin" -Dfile.encoding=UTF-8 -classpath "D:\Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3\boot\plexus-classworlds-2.5.2.jar;D:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.1.3 -s D:\Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3\conf\settings.xml -Dmaven.repo.local=D:\Users\10856214\.m2\repository install
[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'repository' (position: START_TAG seen ...<profile>\n\t<repository>... @281:14)  @ D:\Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3\conf\settings.xml, line 281, column 14
[WARNING] Unrecognised tag: 'repository' (position: START_TAG seen ...<profile>\n\t<repository>... @281:14)  @ D:\Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3\conf\settings.xml, line 281, column 14
[WARNING] 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building springBootDemo 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ springBootDemo ---
[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) @ springBootDemo ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ springBootDemo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Repository\Git\Eshare_practices\SpringBootDemo\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ springBootDemo ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ springBootDemo ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-war-plugin:2.6:war (default-war) @ springBootDemo ---
[INFO] Packaging webapp
[INFO] Assembling webapp [springBootDemo] in [D:\Repository\Git\Eshare_practices\SpringBootDemo\target\springBootDemo-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\Repository\Git\Eshare_practices\SpringBootDemo\src\main\webapp]
[INFO] Webapp assembled in [133 msecs]
[INFO] Building war: D:\Repository\Git\Eshare_practices\SpringBootDemo\target\springBootDemo-1.0-SNAPSHOT.war
[INFO] 
[INFO] --- spring-boot-maven-plugin:1.4.0.RELEASE:repackage (default) @ springBootDemo ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.576 s
[INFO] Finished at: 2016-09-10T23:08:14+08:00
[INFO] Final Memory: 20M/315M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.RELEASE:repackage (default) on project springBootDemo: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.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

Process finished with exit code 1

解決方案