ssm整合,maven 执行install出错
当我把ssm项目的父模块和子模块整合完成后,我尝试给父模块clear,运行没有报错,但是当我install时maven报错,如下所示
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] hm_ssm [pom]
[INFO] hm_ssm_domain [jar]
[INFO] hm_ssm_dao [jar]
[INFO] hm_ssm_service [jar]
[INFO] hm_ssm_utils [jar]
[INFO] hm_ssm_web [war]
[INFO]
[INFO] -------------------------< con.itheima:hm_ssm >-------------------------
[INFO] Building hm_ssm 1.0-SNAPSHOT [1/6]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ hm_ssm ---
[INFO] Installing D:ProgramDataIdeaProjectshm_ssmpom.xml to D:Program Filesrepositoryconitheimahm_ssm1.0-SNAPSHOThm_ssm-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for hm_ssm 1.0-SNAPSHOT:
[INFO]
[INFO] hm_ssm ............................................. FAILURE [ 0.613 s]
[INFO] hm_ssm_domain ...................................... SKIPPED
[INFO] hm_ssm_dao ......................................... SKIPPED
[INFO] hm_ssm_service ..................................... SKIPPED
[INFO] hm_ssm_utils ....................................... SKIPPED
[INFO] hm_ssm_web ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.994 s
[INFO] Finished at: 2019-08-06T20:22:28+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project hm_ssm: Failed to install artifact con.itheima:hm_ssm:pom:1.0-SNAPSHOT: D:Program Filesrepositoryconitheimahm_ssm1.0-SNAPSHOThm_ssm-1.0-SNAPSHOT.pom (系统找不到指定的路径。) -> [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/MojoExecutionException
这是我的项目结构
这是我在执行install的操作
当我不install直接启动项目时报了如下错误
Failed to execute goal on project hm_ssm_web: Could not resolve dependencies for project con.itheima:hm_ssm_web:war:1.0-SNAPSHOT: Could not find artifact con.itheima:hm_ssm_service
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
具体原因是:
不能创建的文件包括 CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9。
早期 Windows 设计 CreateFile("CON")打开 console,COMx 串口,LPTx 并口,NUL 相当于 UNIX 的 /dev/null,到现在一直向下兼容
所以,当我们在执行install的时候maven会做什么呢?
install 会执行 编译——打包——然后在把 jar 放到我们自己本地的 maven 库里面
所以当我以con命名时,maven就install失败。因为win不给创建con的目录
解决了,太坑了