使用cargo-maven2-plugin本地部署项目的问题???求大神

xingshen100 2014-11-25 10:11:23
我在maven项目中使用cargo插件进行本地部署,dos窗口运行命令mvn cargo:start 最后访问地址:http://localhost:8082/account-web-my-0.0.1-SNAPSHOT/sinup.jsp 不能成功访问阿???我是少做了什么,还是什么地方做得不对?cargo插件配置如下:
<!-- 使用cargo自动化部署 -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.11</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<home>D:\WorkSoftWareInstall\apache-tomcat-7.0.57</home>
</container>
<configuration>
<type>standalone</type>
<home>${project.build.directory}/tomcat7x</home>
<properties>
<!-- 根据报错看哪些端口已被使用,使用则自定义另一个 -->
<cargo.servlet.port>8082</cargo.servlet.port>
<cargo.tomcat.ajp.port>8099</cargo.tomcat.ajp.port>
</properties>
</configuration>
</configuration>
</plugin>

运行mvn cargo:start 日志:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Account-Web 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cargo-maven2-plugin:1.4.11:start (default-cli) @ account-web-my ---
[INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:car
go-core-container-tomcat:jar:1.4.11 for container tomcat7x
[INFO] [talledLocalContainer] Tomcat 7.x starting...
[INFO] [stalledLocalDeployer] Deploying [E:\Work_Space\eclipse_workspace\account
-parent-my\account-web-my\target\account-web-my-0.0.1-SNAPSHOT.war] to [E:\Work_
Space\eclipse_workspace\account-parent-my\account-web-my\target/tomcat7x/webapps
]...
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:58 上午 org.apache.catalina.s
tartup.VersionLoggerListener log
[INFO] [talledLocalContainer] 信息: Server version: Apache Tomcat/7.0.57
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:58 上午 org.apache.catalina.s
tartup.VersionLoggerListener log
。。。。。。。。。。。。。。。(中间省略)
。。。。。。。。。。。。
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:58 上午 org.apache.catalina.s
tartup.HostConfig deployWAR
[INFO] [talledLocalContainer] 信息: Deploying web application archive E:\Work_Sp
ace\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\webapps\a
ccount-web-my.war
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.c
ore.ApplicationContext log
[INFO] [talledLocalContainer] 信息: Initializing Spring root WebApplicationConte
xt
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.w
eb.context.ContextLoader initWebApplicationContext
[INFO] [talledLocalContainer] 信息: Root WebApplicationContext: initialization s
tarted
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.c
ontext.support.AbstractApplicationContext prepareRefresh
[INFO] [talledLocalContainer] 信息: Refreshing org.springframework.web.context.s
upport.XmlWebApplicationContext@38ba271: display name [Root WebApplicationContex
t]; startup date [Tue Nov 25 09:44:59 CST 2014]; root of context hierarchy
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.b
eans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[INFO] [talledLocalContainer] 信息: Loading XML bean definitions from class path
resource [account-persist-my.xml]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.b
eans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[INFO] [talledLocalContainer] 信息: Loading XML bean definitions from class path
resource [account-email-my.xml]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.b
eans.factory.support.DefaultListableBeanFactory registerBeanDefinition
[INFO] [talledLocalContainer] 信息: Overriding bean definition for bean 'propert
yConfigurer': replacing [Generic bean: class [org.springframework.beans.factory.
config.PropertyPlaceholderConfigurer]; scope=singleton; abstract=false; lazyInit
=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false
; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMeth
odName=null; defined in class path resource [account-persist-my.xml]] with [Gene
ric bean: class [org.springframework.beans.factory.config.PropertyPlaceholderCon
figurer]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; depen
dencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; facto
ryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class
path resource [account-email-my.xml]]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.b
eans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[INFO] [talledLocalContainer] 信息: Loading XML bean definitions from class path
resource [account-captcha-my.xml]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.b
eans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[INFO] [talledLocalContainer] 信息: Loading XML bean definitions from class path
resource [account-service-my.xml]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.c
ontext.support.AbstractApplicationContext obtainFreshBeanFactory
[INFO] [talledLocalContainer] 信息: Bean factory for application context [org.sp
ringframework.web.context.support.XmlWebApplicationContext@38ba271]: org.springf
ramework.beans.factory.support.DefaultListableBeanFactory@5a3471cc
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.c
ore.io.support.PropertiesLoaderSupport loadProperties
[INFO] [talledLocalContainer] 信息: Loading properties file from class path reso
urce [account-service.properties]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.b
eans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
[INFO] [talledLocalContainer] 信息: Pre-instantiating singletons in org.springfr
amework.beans.factory.support.DefaultListableBeanFactory@5a3471cc: defining bean
s [propertyConfigurer,accountPersistService,javaMailSender,accountEmailService,a
ccountCaptchaService,accountService]; root of factory hierarchy
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.springframework.w
eb.context.ContextLoader initWebApplicationContext
[INFO] [talledLocalContainer] 信息: Root WebApplicationContext: initialization c
ompleted in 266 ms
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployWAR
[INFO] [talledLocalContainer] 信息: Deployment of web application archive E:\Wor
k_Space\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\webap
ps\account-web-my.war has finished in 1,065 ms
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployWAR
[INFO] [talledLocalContainer] 信息: Deploying web application archive E:\Work_Sp
ace\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\webapps\c
argocpc.war
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployWAR
[INFO] [talledLocalContainer] 信息: Deployment of web application archive E:\Wor
k_Space\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\webap
ps\cargocpc.war has finished in 35 ms
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployDirectory
[INFO] [talledLocalContainer] 信息: Deploying web application directory E:\Work_
Space\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\webapps
\host-manager
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployDirectory
[INFO] [talledLocalContainer] 信息: Deployment of web application directory E:\W
ork_Space\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\web
apps\host-manager has finished in 45 ms
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployDirectory
[INFO] [talledLocalContainer] 信息: Deploying web application directory E:\Work_
Space\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\webapps
\manager
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.HostConfig deployDirectory
[INFO] [talledLocalContainer] 信息: Deployment of web application directory E:\W
ork_Space\eclipse_workspace\account-parent-my\account-web-my\target\tomcat7x\web
apps\manager has finished in 39 ms
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.coyote.Abs
tractProtocol start
[INFO] [talledLocalContainer] 信息: Starting ProtocolHandler ["http-bio-8082"]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.coyote.Abs
tractProtocol start
[INFO] [talledLocalContainer] 信息: Starting ProtocolHandler ["ajp-bio-8099"]
[INFO] [talledLocalContainer] 十一月 25, 2014 9:44:59 上午 org.apache.catalina.s
tartup.Catalina start
[INFO] [talledLocalContainer] 信息: Server startup in 1239 ms
[INFO] [talledLocalContainer] Tomcat 7.x started on port [8082]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.722s
[INFO] Finished at: Tue Nov 25 09:44:59 CST 2014
[INFO] Final Memory: 10M/306M
[INFO] ------------------------------------------------------------------------
...全文
152 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
howsun_zh 2014-11-25
  • 打赏
  • 举报
回复
启动成功,可能是url地址有误,官方说法: context path default's to the artifact's ${artifactId} 有个类似的问题: http://bbs.csdn.net/topics/390912357
xingshen100 2014-11-25
  • 打赏
  • 举报
回复
自己顶一下,没人知道吗?不顶都要沉了!
xingshen100 2014-11-25
  • 打赏
  • 举报
回复
引用 2 楼 zhangjihao 的回复:
启动成功,可能是url地址有误,官方说法: context path default's to the artifact's ${artifactId} 有个类似的问题: http://bbs.csdn.net/topics/390912357
麻烦你有空帮我看一下这里啊,http://bbs.csdn.net/topics/390940149
xingshen100 2014-11-25
  • 打赏
  • 举报
回复
引用 2 楼 zhangjihao 的回复:
启动成功,可能是url地址有误,官方说法: context path default's to the artifact's ${artifactId} 有个类似的问题: http://bbs.csdn.net/topics/390912357
访问http://localhost:8082/account-web-my/signup.jsp 也不行, 再执行mvn cargo:run 最后再访问http://localhost:8082/account-web-my/signup.jsp就行了。

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧