maven使用内嵌tomcat7
2016-06-22 16:35
225 查看
在web项目的pom.xml中添加如下:
然后项目右键--run as -- maven build -- 输入参数 tomcat7:run。需要的构件下载完成后即可通过http://localhost:8080/web访问项目
该插件可以远程部署web项目,常用命令有:
<build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>8080</port> <path>/web</path> <uriEncoding>UTF-8</uriEncoding> <finalName>web</finalName> <server>tomcat7</server> </configuration> </plugin> </plugins> </build>
然后项目右键--run as -- maven build -- 输入参数 tomcat7:run。需要的构件下载完成后即可通过http://localhost:8080/web访问项目
该插件可以远程部署web项目,常用命令有:
命令 | 描述 |
tomcat7:deploy | 部署一个web war包 |
tomcat7:reload | 重新加载web war包 |
tomcat7:start | 启动tomcat |
tomcat7:stop | 停止tomcat |
tomcat7:undeploy | 停止一个war包 |
tomcat7:run | 启动嵌入式tomcat ,并运行当前项目 |
相关文章推荐
- Tomcat 调优及 JVM 参数优化
- Eclipse学习总结-(02-动态项目部署到到本地Tomcat
- tomcat安装APR本地库不兼容问题的解决 APR based Apache Tomcat Native library is installed
- Tomcat是如何启动及运行—对tomcat的源码解析(转载)
- Linux服务器安装jdk+tomcat
- 使用MAVEN动态生成配置文件
- Java Tomcat SSL 服务端/客户端双向认证(一)
- Mac下安装Tomcat7
- Eclipse中web项目部署至Tomcat步骤
- 安装tomcat的native-1.2.7遇到openssl版本提示问题
- java 基础安装和Tomcat8配置
- Tomcat容器管理安全的几种验证方式
- tomcat动态部署和静态部署
- tomcat连接数设置
- tomcat优化
- Tomcat如何修改执行窗口的标题
- nginx+tomcat实现单ip,多域名,多项目配置,session有效
- solr5.5以上版本在tomcat8下运行
- tomcat开机启动和服务
- tomcat内存配置