欢迎来到天天文库
浏览记录
ID:34739665
大小:51.40 KB
页数:4页
时间:2019-03-10
《使用maven自动部署tomcat6和tomcat7下web应用》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、使用Maven自动部署Tomcat6和Tomcat7下Web应用1.开启Tomcat远程管理权限在tomcat的config目录下的tomcat-users.xml文件,2、min"password="admin"roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>不多说,此处多给些权限,别小气,否则容易没有权限进行部署(tomcat给的原始配置示例都被注释掉了)。配置是否成功的验证方法是重启Tomcatà登陆tomcat管理控制台à输入用户名密码后(admin/admin)à部署一个war应用试试,成功则OK,不成功就不要往下走了。2.配置tomcat6-maven-plugin或tomcat3、7-maven-plugin工程POM中,配置插件:Tomcat6的配置示例如下:org.apache.tomcat.maventomcat6-maven-plugin2.2http://16.158.165.0:8080/manageradmin4、ssword>admin/BizServiceTomcat7的配置示例如下:(注意红色高亮部分差异)org.apache.tomcat.maventomcat7-maven-plugin2.2http://16.158.165.0:8080/man5、ager/textadminadmin/BizService1.部署相关命令Tomcat6部署及重新部署命令mvntomcat6:deploymvntomcat6:redeployTomcat7部署及重新部署命令mvntomcat7:deploymvntomcat7:redeploy2.备注m2eclipse也是如此配置。6、ord>也可以用方式配置,就是在setting文件中配置用户名密码,POM中只是指定serverid,此处不详述。3.详细信息(来自官网2.3版本)GoalDescriptiontomcat6:deployDeployaWARtoTomcat.tomcat6:deploy-onlyDeployaWARtoTomcatwithoutforkingthepackagelifecycle.tomcat6:explodedDeployanexplodedWARtoTomcat.tomcat6:helpDisplayhelpinformationon7、tomcat6-maven-plugin.Call mvntomcat6:help-Ddetail=true-Dgoal= todisplayparameterdetails.tomcat6:infoListsinformationabouttheTomcatversion,OS,andJVMproperties.tomcat6:inplaceDeployaWARin-placetoTomcat.tomcat6:listListsallthecurrentlydeployedwebapplicationsinTomcat.tomcat8、6:redeployRedeployaWARinTomcat.(A
2、min"password="admin"roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>不多说,此处多给些权限,别小气,否则容易没有权限进行部署(tomcat给的原始配置示例都被注释掉了)。配置是否成功的验证方法是重启Tomcatà登陆tomcat管理控制台à输入用户名密码后(admin/admin)à部署一个war应用试试,成功则OK,不成功就不要往下走了。2.配置tomcat6-maven-plugin或tomcat
3、7-maven-plugin工程POM中,配置插件:Tomcat6的配置示例如下:org.apache.tomcat.maventomcat6-maven-plugin2.2http://16.158.165.0:8080/manageradmin4、ssword>admin/BizServiceTomcat7的配置示例如下:(注意红色高亮部分差异)org.apache.tomcat.maventomcat7-maven-plugin2.2http://16.158.165.0:8080/man
4、ssword>admin/BizService
5、ager/textadminadmin/BizService1.部署相关命令Tomcat6部署及重新部署命令mvntomcat6:deploymvntomcat6:redeployTomcat7部署及重新部署命令mvntomcat7:deploymvntomcat7:redeploy2.备注m2eclipse也是如此配置。6、ord>也可以用方式配置,就是在setting文件中配置用户名密码,POM中只是指定serverid,此处不详述。3.详细信息(来自官网2.3版本)GoalDescriptiontomcat6:deployDeployaWARtoTomcat.tomcat6:deploy-onlyDeployaWARtoTomcatwithoutforkingthepackagelifecycle.tomcat6:explodedDeployanexplodedWARtoTomcat.tomcat6:helpDisplayhelpinformationon7、tomcat6-maven-plugin.Call mvntomcat6:help-Ddetail=true-Dgoal= todisplayparameterdetails.tomcat6:infoListsinformationabouttheTomcatversion,OS,andJVMproperties.tomcat6:inplaceDeployaWARin-placetoTomcat.tomcat6:listListsallthecurrentlydeployedwebapplicationsinTomcat.tomcat8、6:redeployRedeployaWARinTomcat.(A
6、ord>也可以用方式配置,就是在setting文件中配置用户名密码,POM中只是指定serverid,此处不详述。3.详细信息(来自官网2.3版本)GoalDescriptiontomcat6:deployDeployaWARtoTomcat.tomcat6:deploy-onlyDeployaWARtoTomcatwithoutforkingthepackagelifecycle.tomcat6:explodedDeployanexplodedWARtoTomcat.tomcat6:helpDisplayhelpinformationon
7、tomcat6-maven-plugin.Call mvntomcat6:help-Ddetail=true-Dgoal= todisplayparameterdetails.tomcat6:infoListsinformationabouttheTomcatversion,OS,andJVMproperties.tomcat6:inplaceDeployaWARin-placetoTomcat.tomcat6:listListsallthecurrentlydeployedwebapplicationsinTomcat.tomcat
8、6:redeployRedeployaWARinTomcat.(A
此文档下载收益归作者所有