maven-tomcat7插件部署,始终部署到localhost:8080

xiaozhaolh 发布于 2016/11/25 16:39
阅读 663
收藏 0

各位大神,我公司一个环境,用maven的tomcat7插件部署代码到远程服务器,但始终不会按自己的意思部署到远程服务器而是采用了默认的部署地址。这事折腾了好几天一直没找到原因,请各位大神帮看下。如下为我环境信息,命令行执行命令,pom相关配置文件及调试日志(重点信息已用红色标注)

软件运行环境:maven 3.0.5+jdk1.7.0_25

命令行调用:D:\SPROC4GD\08_branches\sproc4gd_2.1>mvn tomcat7:redeploy -Pweb-build -Ptomcat -Dmaven.test.skip=true -Dmaven.tomcat.url=http://10.10.5.48:6006/manage
r/text -X > debuginfo.log

pom插件配置片段:

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://10.10.5.48:6006/manager/text</url>
<username>tomcat</username>
<password>****</password>
<port>6006</port>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin>

调试日志信息

参数信息中相关的信息

env.MAVEN_CMD_LINE_ARGS=tomcat7:redeploy -Pweb-build -Ptomcat -Dmaven.test.skip=true -Dmaven.tomcat.url=http://10.10.5.48:6006/manager/text -X, 

部署及其前相关信息

[INFO] <<< tomcat7-maven-plugin:2.2:redeploy (default-cli) @ sproc4gd-web <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:redeploy (default-cli) @ sproc4gd-web ---
[DEBUG] Configuring mojo org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy from plugin realm ClassRealm[plugin>org.apache.tomcat.maven:tomcat7-maven-plugin:2.2, parent: sun.misc.Launcher$AppClassLoader@76ea7776]
[DEBUG] Configuring mojo 'org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy' with basic configurator -->
[DEBUG]   (f) charset = ISO-8859-1
[DEBUG]   (f) contextFile = D:\SPROC4GD\08_branches\sproc4gd_2.1\sproc4gd-web\sproc4gd-web\src\main\tomcatconf\context.xml
[DEBUG]   (f) ignorePackaging = false
[DEBUG]   (f) mode = war
[DEBUG]   (f) packaging = war
[DEBUG]   (f) password = tomcat
[DEBUG]   (f) path = /web
[DEBUG]   (f) server = tomcat
[DEBUG]   (f) update = true
[DEBUG]   (f) url = http://localhost:8080/manager/html
[DEBUG]   (f) username = tomcat
[DEBUG]   (f) version = 2.2
[DEBUG]   (f) warFile = D:\SPROC4GD\08_branches\sproc4gd_2.1\sproc4gd-web\sproc4gd-web\target\web.war
[DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@199bd995
[DEBUG] -- end configuration --
[INFO] Deploying war to http://localhost:8080/web  

加载中
0
wuweiwuwei
wuweiwuwei
“用maven的tomcat7插件部署代码到远程服务器”是什么意思?部署项目不是把打好的包放到tomcat的webapps下?
0
百世经纶之傲笑红尘
百世经纶之傲笑红尘
6006是你上传war的端口了吧
返回顶部
顶部