参考
http://tomcat.apache.org/maven-plugin.html
http://www.tuicool.com/articles/fYRnmy
插件配置概貌:
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <!-- or if you want to use tomcat 6.x <artifactId>tomcat6-maven-plugin</artifactId> --> <version>2.3-SNAPSHOT</version> <configuration> <!-- http port --> <port>9090</port> <!-- application path always starts with /--> <path>/</path> <!-- optional path to a context file --> <contextFile>${tomcatContextXml}</contextFile> <!-- optional system propoerties you want to add --> <systemProperties> <appserver.base>${project.build.directory}/appserver-base</appserver.base> <appserver.home>${project.build.directory}/appserver-home</appserver.home> <derby.system.home>${project.build.directory}/appserver-base/logs</derby.system.home> <java.io.tmpdir>${project.build.directory}</java.io.tmpdir> </systemProperties> <!-- if you want to use test dependencies rather than only runtime --> <useTestClasspath>false</useTestClasspath> <!-- optional if you want to add some extra directories into the classloader --> <additionalClasspathDirs> <additionalClasspathDir></additionalClasspathDir> </additionalClasspathDirs> </configuration> <!-- For any extra dependencies needed when running embedded Tomcat (not WAR dependencies) add them below --> <dependencies> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>\${derbyVersion}</version> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4</version> </dependency> </dependencies> </plugin>
可以看出,如果不使用contextFile配置,插件只能配置端口,应用路径,系统属性简单的配置。如果要配置如数据源复杂的配置,需要配置自定义的server.xml了,但配置了这个后,项目的加载就只能通过context.xml的方式整合。 通过contextFile引用外部定义context.xml配置。
相关推荐
Apache Tomcat Maven Plugin - About Apache Tomcat Maven Plugin
maven-tomcat-plugin让maven与tomcat配合得很好。它可以把应用部署到Tomcat服务器,也可以把tomcat作为内嵌服务器启动,就像jetty一样。 使用JPDA启动tomcat的远程调试功能。这样就能与eclipse配合起来,轻松地实现...
Apache Tomcat Maven Plugin - Run Mojo.mht Apache Tomcat Maven Plugin - Run Mojo.mht
Maven使用tomcat8-maven-plugin插件
解决tomcat8-maven-plugin-3.0-r1655215.jar阿里云同有的问题。放到路径org\apache\tomcat\maven\tomcat8-maven-plugin\3.0-r1655215\就可以了
修改版tomcat7-maven-plugin-2.2.jar
maven plugin maven plugin scm 项目管理 构建工具 antmaven plugin maven plugin scm 项目管理 构建工具 ant
tomcat6-maven-plugin-2.1插件包
tomcat-jndi-数据源将 tomcat-maven-plugin 与 JNDI 数据源一起使用
在网上搜索一堆文章没找到解决方法,只找到了tomcat7-maven-plugin的plugin,如下: <plugin> <groupId>org.apache.tomcat.maven <artifactId>tomcat7-maven-plugin <version>2.2 </plugin> 并没有找到tomcat8-...
tomcat7-maven-plugin-2.1.jar
eclipse maven plugin 插件 安装 和 配置
maven plugin打包下载
dockerfile-maven-plugin 支持 maven 直接发布项目至 docker 镜像库
NULL 博文链接:https://zheng12tian.iteye.com/blog/1772330
xjar-maven-plugin 项目相关jar包。包括xjar-maven-plugin-4.0.2.jar loadkitv1.0.1.jar xjar-4.0.2.jar
maven plugin, download for me
java运行依赖jar包
eclipse-maven3-plugin插件 包含apache-maven-3.3.9和eclipse-maven3-plugin