使用 tomcat:run 命令运行maven项目时出现以下错误:
[INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ sampleproject ---
[INFO] Running war on http://localhost:8080/sampleproject
[INFO] Using existing Tomcat server configuration at D:\Projects\Projects\OpenRoads\Code\Unpublished\sample1project\target\tomcat
Oct 11, 2018 8:37:26 PM org.apache.catalina.startup.Embedded start
INFO: Starting tomcat server
Oct 11, 2018 8:37:28 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Oct 11, 2018 8:37:29 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter compressionFilter
java.lang.ClassCastException: com.googlecode.webutilities.filters.CompressionFilter cannot be cast to javax.servlet.Filter
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
.........
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
我尝试了following post中提到的步骤,但没有帮助。 以下是我的项目设置的屏幕截图: