maven tomcat:run指定tomcat7:
配置好下面的内容后,执行 run as -> tomcat7:run 或者tomcat6:run可以将maven的web应用在tomcat6/7里面运行 ,eclipse Indigo 版本默认tomcat:run是用tomcat6。
DelegatingFilterProxy cannot be cast to Filter
请在
settings.xml
- <pluginGroups>
- <pluginGroup>org.apache.tomcat.maven</pluginGroup>
- </pluginGroups>
pom.xml
- <repositories>
- <repository>
- <id>people.apache.snapshots</id>
- <url>http://repository.apache.org/content/groups/snapshots-group/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>apache.snapshots</id>
- <name>Apache Snapshots</name>
- <url>http://repository.apache.org/content/groups/snapshots-group/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- <plugins>
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat6-maven-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
- <configuration>
- <path>/</path>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
- <configuration>
- <path>/</path>
- </configuration>
- </plugin>
- </plugins
过程中遇到了一个情况,就是打成war包放到webapps下面运行时正常 的,但是用tomcat:run会报错:org.springframework.web.filter.DelegatingFilterProxy cannot be cast to javax.servlet.Filter;
检查一下:
pom.xml文件编辑器(一般要装插件才能看到)下面的dependency hierarchy 里面,在右边框图里面找到servlet-api.jar,选中后在左边,右键->exclude maven artifact,去除依赖关系。
maven tomcat:run指定tomcat7:的更多相关文章
- Maven Tomcat:run 使用tomcat7
<build> <finalName>service</finalName> <resources> <resource> <dire ...
- tomcat:run和tomcat7:run的区别,以及Apache Tomcat Maven Plugin 相关
起因: 同事部署的maven项目,之前使用 jetty,现在切换到 tomcat,但是他使用的命令是 tomcat:run ,而不是 tomcat7:run,能启动,但出现问题了. 于是搜索了一番,想 ...
- Eclipse使用Maven tomcat:run命令启动web项目
Eclipse安装好m2e插件,使用Maven构建项目后,启动web项目就行就非常简单了,你不再需要下载然后在eclipse中配置tomcat. 右键你的项目 -> Run As -> R ...
- Eclipse使用Maven tomcat:run命令启动web项目时修改默认端口
- Error running 'tomcat:run' Cannot run program..CreateProcess error=2,系统找不到指定的文件
Error running 'tomcat:run': Cannot run program "tomcat:run" (in directory "D:\WorkTes ...
- 使用maven的tomcat:run进行web项目热部署
近期又又一次看了一下maven的东西,事实上主要是由于去了解Jenkins,后期或许会补充jenkins的博文. 怎么在eclipse里面创建maven webproject,这边就不介绍了,參见:h ...
- Maven 运行 tomcat:run 时出现 Unable to compile class for JSP...
近来无事便去看了看神奇的 Maven , 但写第一个 Hello,World 就非常不友好的怼给我一个 500, 很是郁闷; 开发环境: JDK1.8, Maven 3.5 项目目录: \maven_ ...
- Idea 使用maven+tomcat的时候,编译指定的Profile
To build a artifact with a profile you have to create a Maven Run/Debug configuration as in the foll ...
- Maven中使用tomcat:run出现错误org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
配置是正常的.查阅资料以后说是jdk版本什么的问题.多方修改没有任何改观.换一个思路去查询tomcat:run怎么运行. 是因为他还是沿用了上一次的tomcat插件(默认是6)所以运行的时候使用 to ...
随机推荐
- 1110. Complete Binary Tree (25)
Given a tree, you are supposed to tell if it is a complete binary tree. Input Specification: Each in ...
- django的related_name
转:https://segmentfault.com/q/1010000003705677 就是一个反向关联的属性,比方说model里面定义两个class,一个是A,一个是B class A(Mode ...
- 学习动态性能表(22)V$resource_limit
学习动态性能表 第20篇--V$resource_limit 2007.6.15 就一条SQL语句供你参考: select * from V$RESOURCE_LIMIT where resourc ...
- Linux网络编程学习路线
转载自:https://blog.csdn.net/lianghe_work/article 一.网络应用层编程 1.Linux网络编程01——网络协议入门 2.Linux网络编程02——无连接和 ...
- Redis Sentinel(哨兵)主从高可用方案
环境搭建 三台服务器: 192.168.126.100(master) 192.168.126.110(slaver) 192.168.126.120(slaver) 拷贝192.168.126.10 ...
- 反射ORM 三层(for sql server/mysql)
sql server and oracle 不同之处只在于: 1·参数@和: 2·自增和序列 RPROM.cs //(写错愕,应该是RPORM) RPROM.Insert(p1); //需求:DBS中 ...
- POJ1063Cable master(二分搜索)
Cable master Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 36288 Accepted: 7743 Des ...
- java代码异常处理篇-----循环
总结:注意一个方法:nextLine();它表示:执行当前行,返回跳过的输入信息. package com.da; import java.util.InputMismatchException; i ...
- Oracle 11g oracle 用户密码过期问题 (ZT)
http://www.blogjava.net/freeman1984/archive/2013/04/23/398301.html Oracle 11g 之前默认的用户时是没有密码过期的限制的,在O ...
- 一次Mono解析Excel文档编码出错排查记录
最近在捯饬Asp.Net站点部署到Linux平台上面,在文档导入的操作中经过网上搜索采用了能够支持跨平台的ExcelDataReader组建.在本地windows上测试通过NuGet安装的组建,这货依 ...