Maven 错误总结

 

错误总结系列实时更新。

1. Tomcat启动失败
错误日志:

1 SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
2 一月 06, 2019 3:13:03 下午 org.apache.catalina.core.StandardContext startInternal
3 SEVERE: Context [/tmall] startup failed due to previous errors

错误原因:
在pom.xml中,

1 <groupId>sjtu.edu</groupId>
2 <artifactId>sjtu.edu</artifactId>
3 <version>1.0-SNAPSHOT</version>
4 <packaging>war</packaging>

上述<packaging>里面的war写成了pom, 导致了启动失败。<packaging>给出的是项目的打包类型,即作为项目的发布形式,其可能的类型。在Maven 3中,其可用的打包类型如下:
jar(默认类型);war;ejb;ear;rar;par;pom;maven-plugin

另外,Maven 3支持Maven项目的多模块(multi-modules)结构。这样的Maven项目也被称为聚合项目,通常由一个父模块和若干个子模块构成。其中,父模块必须以pom打包类型,同时以<modules>给出所有的子模块。所以当时由于导入了子模块导致父模块的打包模式从原来war变成了pom。

posted @ 2019-01-06 18:07  傅蹲蹲  阅读(151)  评论(0)    收藏  举报