idea打包问题
每次点击package后控制台就会打印出Process terminated,包也没有打出来,点击lifecycle中的其他选项也是Process terminated
48
收起
正在回答 回答被采纳积分+1
10回答
猫以自闭
2019-12-26 14:49:06
猫以自闭
2019-12-24 20:00:14
通过terminal窗口mvn clean package
命令打包
G:\works\idea\web>mvn clean package [WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<mirrors>\r\n <mirror>\r\n\ua0 \ua0 \ua0 <i... @148:9) @ G:\works\Java Tool Package\apa che-maven-3.6.3\bin\..\conf\settings.xml, line 148, column 9 [WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<mirrors>\r\n <mirror>\r\n\ua0 \ua0 \ua0 <i... @148:9) @ C:\Users\TR\.m2\settings.xml, line 148, column 9 [WARNING] [INFO] Scanning for projects... [INFO] [INFO] --------------------------< org.example:web >--------------------------- [INFO] Building web 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ web --- [INFO] Deleting G:\works\idea\web\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ web --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ web --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent! [INFO] Compiling 1 source file to G:\works\idea\web\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[3,21] 程序包javax.servlet不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[4,32] 程序包javax.servlet.annotation不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[5,26] 程序包javax.servlet.http不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[6,26] 程序包javax.servlet.http不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[7,26] 程序包javax.servlet.http不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[11,26] 找不到符号 符号: 类 HttpServlet [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[10,2] 找不到符号 符号: 类 WebServlet [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[12,27] 找不到符号 符号: 类 HttpServletRequest 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[12,55] 找不到符号 符号: 类 HttpServletResponse 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[12,92] 找不到符号 符号: 类 ServletException 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[16,26] 找不到符号 符号: 类 HttpServletRequest 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[16,54] 找不到符号 符号: 类 HttpServletResponse 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[16,91] 找不到符号 符号: 类 ServletException 位置: 类 com.zwb.web [INFO] 13 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.022 s [INFO] Finished at: 2019-12-24T19:59:09+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project web: Compilation failure: Compilation failure : [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[3,21] 程序包javax.servlet不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[4,32] 程序包javax.servlet.annotation不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[5,26] 程序包javax.servlet.http不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[6,26] 程序包javax.servlet.http不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[7,26] 程序包javax.servlet.http不存在 [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[11,26] 找不到符号 [ERROR] 符号: 类 HttpServlet [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[10,2] 找不到符号 [ERROR] 符号: 类 WebServlet [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[12,27] 找不到符号 [ERROR] 符号: 类 HttpServletRequest [ERROR] 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[12,55] 找不到符号 [ERROR] 符号: 类 HttpServletResponse [ERROR] 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[12,92] 找不到符号 [ERROR] 符号: 类 ServletException [ERROR] 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[16,26] 找不到符号 [ERROR] 符号: 类 HttpServletRequest [ERROR] 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[16,54] 找不到符号 [ERROR] 符号: 类 HttpServletResponse [ERROR] 位置: 类 com.zwb.web [ERROR] /G:/works/idea/web/src/main/java/com/zwb/web.java:[16,91] 找不到符号 [ERROR] 符号: 类 ServletException [ERROR] 位置: 类 com.zwb.web [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 G:\works\idea\web>
3. Java 数据库开发与实战应用
- 参与学习 人
- 提交作业 357 份
- 解答问题 8016 个
本阶段将带你学习MySQL数据库,JDBC接口,MyBatis框架等,带你掌握的数据的存放和管理。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星