自动化脚本发布失败

来源:13-9 服务端项目自动化发布、验证、故障排查与解决

坐在IT浪尖的小强

2018-01-27

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project mmall: Compilation failure: Compilation failure:
[ERROR] /developer/git-repository/mmalllearning/src/main/java/com/mmall/vo/cartProductVo.java:[9,7] 错误: 类CartProductVo是公共的, 应在名为 CartProductVo.java 的文件中声明
[ERROR] /developer/git-repository/mmalllearning/src/main/java/com/mmall/vo/cartVo.java:[9,7] 错误: 类CartVo是公共的, 应在名为 CartVo.java 的文件中声明
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
============删除旧的ROOT.war===================
rm: 无法删除"/developer/apache-tomcat-7.0.73/webapps/ROOT.war": 没有那个文件或目录
======拷贝编译出来的war包到tomcat下-ROOT.war=======
cp: 无法获取"/developer/git-repository/mmall_learning/target/mmall.war" 的文件状态(stat): 没有那个文件或目录
============删除tomcat下旧的ROOT文件夹=============
====================关闭tomcat=====================
Using CATALINA_BASE:   /developer/apache-tomcat-7.0.73
Using CATALINA_HOME:   /developer/apache-tomcat-7.0.73
Using CATALINA_TMPDIR: /developer/apache-tomcat-7.0.73/temp
Using JRE_HOME:        /usr/java/jdk1.7.0_80
Using CLASSPATH:       /developer/apache-tomcat-7.0.73/bin/bootstrap.jar:/developer/apache-tomcat-7.0.73/bin/tomcat-juli.jar
一月 27, 2018 11:00:53 下午 org.apache.catalina.startup.Catalina stopServer
严重: Could not contact localhost:8005. Tomcat may not be running.
一月 27, 2018 11:00:53 下午 org.apache.catalina.startup.Catalina stopServer
严重: Catalina.stop:
java.net.ConnectException: 拒绝连接
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:343)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)

写回答

1回答

Geely

2018-01-28

你好,同学,你的这个问题简单

首先看这里

/developer/git-repository/mmalllearning/src/main/java/com/mmall/vo/cartProductVo.java:[9,7] 错误: 类CartProductVo是公共的, 应在名为 CartProductVo.java 的文件中声明
[ERROR] /developer/git-repository/mmalllearning/src/main/java/com/mmall/vo/cartVo.java:[9,7] 错误: 类CartVo是公共的, 应在名为 CartVo.java 的文件中声明


先编译失败,后边的错误我们先不看。先按照这个提示解决编译失败的问题


0
4
Geely
回复
坐在IT浪尖的小强
嗯嗯解决了就好,,不用客气,等你学好了,课程记得给个10分好评 我就开心啦。
2018-01-28
共4条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程