自动化发布时,maven编译报错
来源:13-9 服务端项目自动化发布、验证、故障排查与解决
慕斯0312332
2018-04-10
===========编译并跳过单元测试====================
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.220s
[INFO] Finished at: Tue Apr 10 19:38:55 CST 2018
[INFO] Final Memory: 3M/28M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/developer/git-repository/mmall). Please verify you invoked Maven from the correct directory. -> [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 followingarticles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
4回答
-
慕斯0312332
提问者
2018-04-11
已解决!!!
122018-04-24 -
慕斯0312332
提问者
2018-04-10
经过排查,发现是自动化发布脚本的路径有误,经过修改后能正常发布maven未报错,但是查看tomcat webapps 下,并没有root文件夹,请问老师我该如何排查解决?
10 -
慕斯0312332
提问者
2018-04-10
===========进入git项目mmall目录=============
==========git切换分之到mmall-v1.0===============
D pom.xml
Already on 'mmall'
Your branch is up-to-date with 'origin/mmall'.
==================git fetch======================
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From gitee.com:Dreammall/mmall
bf6ba27..6d3d4d9 mmall -> origin/mmall
==================git pull======================
Updating bf6ba27..6d3d4d9
Fast-forward
pom.xml | 15 ---------------
1 file changed, 15 deletions(-)
===========编译并跳过单元测试====================
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com:mmall:war:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 264, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mmall Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mmall ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mmall ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 15 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mmall ---
[INFO] Compiling 58 source files to /developer/git-repository/mmall/mmall/target/classes
[WARNING] /developer/git-repository/mmall/mmall/src/main/java/com/mmall/controller/portal/UserController.java:[8,38] Server is internal proprietary API and may be removed in a future release
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mmall ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /developer/git-repository/mmall/mmall/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mmall ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ mmall ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mmall ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mmall] in [/developer/git-repository/mmall/mmall/target/mmall]
[INFO] Processing war project
[INFO] Copying webapp resources [/developer/git-repository/mmall/mmall/src/main/webapp]
[INFO] Webapp assembled in [260 msecs]
[INFO] Building war: /developer/git-repository/mmall/mmall/target/mmall.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.518s
[INFO] Finished at: Tue Apr 10 23:29:56 CST 2018
[INFO] Final Memory: 16M/38M
[INFO] ------------------------------------------------------------------------
============删除旧的ROOT.war===================
rm: cannot remove `/developer/apache-tomcat-7.0.73/webapps/ROOT.war': No such file or directory
======拷贝编译出来的war包到tomcat下-ROOT.war=======
cp: cannot stat `/developer/git-repository/mmall/target/mmall.war': No such file or directory
============删除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
================sleep 10s=========================
00 -
慕斯0312332
提问者
2018-04-10
学生是前端部分过来的,服务器上门户已经成功部署,但是后台部分搞了大半天也没解决,请老师解答,谢谢!
00
相似问题