springboot引入jsp聚合项目,3个模块,父模块打pom包,子模块中->工具模块打jar包,另外一个模块是web模块打war包

是不是入错行了 2020-07-22 11:58:48
工具模块打jar包没问题,但是那个web模块(就是启动类在的那个模块)打war包的时候报错:
(网上看得到的帖子都试了一次,还是不行)
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.jt.1902:jt-manage >------------------------
[INFO] Building jt-manage 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.130 s
[INFO] Finished at: 2020-07-22T23:52:46+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jt-manage: Could not resolve dependencies for project com.jt.1902:jt-manage:war:1.0-SNAPSHOT: Failed to collect dependencies at com.jt.1902:jt-common:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for com.jt.1902:jt-common:jar:1.0-SNAPSHOT: Could not find artifact com.jt.1902:jt:pom:1.0-SNAPSHOT -> [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/DependencyResolutionException
...全文
3227 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
我直接把父模块打包,然后父模块打包了会有子模块的war包,可以直接用dos窗口启动,但是单独打包为什么不行?
  • 打赏
  • 举报
回复
https://blog.csdn.net/publicv/article/details/104087496 类似上面的那种帖子好多我都试了,都不行
Forevermark993 2020-07-23
  • 打赏
  • 举报
回复
在聚合模块jt中执行clean install 命令,会清理,然后打包,然后安装到maven私库,最后你单独打包的也会包含另外一个子模块的包了、
阿萨德由 2020-07-23
  • 打赏
  • 举报
回复
报错信息很清楚啊。找不到common包。 maven打包会查找当前目录和maven本地仓库获取引用的包,单独打包就找不到common包了,除非你先编译好common包并放入maven仓库中
瘦死的黑骆驼 2020-07-23
  • 打赏
  • 举报
回复
在父模块下install之后或者单独在common模块上单独install之后,成功的话会在maven仓库下生成common的jar,此时你再对manage打包就可以了

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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