tomcat-maven-plugin在pom.xml中的配置
来源:互联网 发布:javascript小游戏代码 编辑:程序博客网 时间:2024/05/19 11:19
1、使用tomcat-maven-plugin需要在pom.xml文件中project>build节点下添加以下代码:
<pluginManagement> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> </plugin> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> </plugin> </plugins> </pluginManagement>2、添加仓库信息,保证maven可以从仓库中下载到tomcat-maven-plugin插件
(a)在project>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>
(b)在project>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>
正确的pom.xml文件为:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>MavenHelloWorld</groupId><artifactId>MavenHelloWorld</artifactId><packaging>war</packaging><version>0.0.1-SNAPSHOT</version><name>MavenHelloWorld Maven Webapp</name><url>http://maven.apache.org</url><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>3.8.1</version><scope>test</scope></dependency></dependencies><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><build><finalName>MavenHelloWorld</finalName><pluginManagement><plugins><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat6-maven-plugin</artifactId><version>2.0-SNAPSHOT</version><configuration><url>http://localhost:8080/manager/text</url><server>tomcat</server></configuration></plugin><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><version>2.0-SNAPSHOT</version><configuration><url>http://localhost:8080/manager/text</url><server>tomcat</server></configuration></plugin></plugins></pluginManagement></build></project>
0 0
- tomcat-maven-plugin在pom.xml中的配置
- pom.xml中maven-compiler-plugin插件配置的使用
- pom.xml中配置plugin
- Maven pom.xml配置
- maven pom.xml 配置
- maven-pom.xml配置
- maven pom.xml配置
- maven中的pom.xml
- maven工程中为什么要在pom.xml中配置tomcat插件
- maven tomcat plugin配置
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- maven配置tomcat-maven-plugin
- 备忘几个eclipse比较有用的快捷键
- HDU 4970 Killing Monsters 多校第九场1011
- MFC菜单、工具栏、状态栏
- 使用ADF Faces 之二:数据可视化组件 Gauge
- Linux单用户方式
- tomcat-maven-plugin在pom.xml中的配置
- UIView基本用法
- SQL函数
- Android Environment类的接口详解
- Sudoku Solver 破解数独@LeetCode - CSDN blog
- hdu 4961 Boring Sum--2014 Multi-University Training Contest 9
- WPF 调用API修改窗体风格实现真正的无边框窗体
- 使用ADF Faces 之二:数据可视化组件 Pivot Table
- 2014 Multi-University Training Contest 9小记