商城專案隨記
阿新 • • 發佈:2019-07-09
[INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.zfsoft:shoping-web:0.0.1-SNAPSHOT: Could not find artifact com.zfsoft:shoping-parent:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 11 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.zfsoft:shoping-web:0.0.1-SNAPSHOT (E:\eclipseWorkspace\shoping-web\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for com.zfsoft:shoping-web:0.0.1-SNAPSHOT: Could not find artifact com.zfsoft:shoping-parent:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 11 -> [Help 2] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
解決辦法:
Non-resolvable parent POM for com.zfsoft:shoping-web:0.0.1-SNAPSHOT: Could not find artifact com.zfsoft:shoping-parent:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 11 -> [Help 2]
本地倉庫中沒有shoping-parent,右鍵parent---maven install
2.執行繼續報錯
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building shoping-web 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for com.zfsoft:shoping-interface:jar:0.0.1-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.524 s [INFO] Finished at: 2019-07-08T23:45:55+08:00 [INFO] Final Memory: 8M/154M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project shoping-web: Could not resolve dependencies for project com.zfsoft:shoping-web:war:0.0.1-SNAPSHOT: Could not find artifact com.zfsoft:shoping-interface:jar:0.0.1-SNAPSHOT -> [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/DependencyResolutionException
解決:多添加了interface的依賴
3.使用maven tomcat7外掛執行報錯:The ServletContentInitializer [org.springframework.web.SpringServletContainerInitializer] could not be created
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ taotao-manager-web ---
[INFO] Running war on http://localhost:8080/
[INFO] Creating Tomcat server configuration at F:\eclipse-workspace-7-24\taotao-manager\taotao-manager-web\target\tomcat
[INFO] create webapp with contextPath:
八月 11, 2017 4:14:41 下午 org.apache.coyote.AbstractProtocol init
資訊: Initializing ProtocolHandler ["http-bio-8080"]
八月 11, 2017 4:14:41 下午 org.apache.catalina.core.StandardService startInternal
資訊: Starting service Tomcat
八月 11, 2017 4:14:41 下午 org.apache.catalina.core.StandardEngine startInternal
資訊: Starting Servlet Engine: Apache Tomcat/7.0.47
八月 11, 2017 4:14:42 下午 org.apache.catalina.startup.ContextConfig getServletContainerInitializer
嚴重: The ServletContentInitializer [org.springframework.web.SpringServletContainerInitializer] could not be created
java.lang.ClassNotFoundException: org.springframework.web.SpringServletContainerInitializer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1668)
at org.apache.catalina.startup.ContextConfig.getServletContainerInitializers(ContextConfig.java:1652)
at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1562)
解決:
jar包不完整,刪除倉庫中的jar包,然後重啟專案,右鍵專案--