大家好,又见面了,我是你们的朋友全栈君。
tomcat7-maven-plugin-2.2.jar
,比如我的本地仓库在:D:\M2REPO\org\apache\tomcat\maven\tomcat7-maven-plugin\2.2
下,那么我们只需要解压并此目录下的
tomcat7-maven-plugin-2.2.jar
覆盖此文件就ok.
pom.xml
配置
<plugins>
<!-- 指定jdk1.7编译,否则maven update 可能调整jdk -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- tomcat7插件。使用方式:tomcat7:run -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<update>true</update>
<port>8080</port>
<uriEncoding>UTF-8</uriEncoding>
<server>tomcat7</server>
<!-- tomcat虚拟映射路径 -->
<staticContextPath>/store</staticContextPath>
<staticContextDocbase>d:/file/store/</staticContextDocbase>
<contextReloadable>false</contextReloadable>
<useTestClasspath>true</useTestClasspath>
</configuration>
</plugin>
</plugins>
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/107050.html原文链接:https://javaforall.cn
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有