要被这个 BUG 整疯了

2021-05-24 16:59:43 +08:00
 Zhancha

涉及技术:Maven 多模块, Springboot 。

前提:每次都是直接选择一个模块进行 package,然而每次都能成功,即使添加模块。

现在:添加了一个模块之后,已经无法成功 package 了,删除这个模块也不行了,感觉可能是出了什么新的问题。

自行排查:发现找 module 时根本没有去本地查找,直接去了阿里云库,肯定是没有的。

报错内容:

/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/x/Project/piaolin-platform/ruoyi-admin -Dmaven.home=/usr/local/maven/apache-maven-3.6.3 -Dclassworlds.conf=/usr/local/maven/apache-maven-3.6.3/bin/m2.conf -Dmaven.ext.class.path=/Users/x/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/211.7142.45/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Users/x/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/211.7142.45/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=50423:/Users/x/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/211.7142.45/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /usr/local/maven/apache-maven-3.6.3/boot/plexus-classworlds.license:/usr/local/maven/apache-maven-3.6.3/boot/plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2021.1.1 -s /usr/local/maven/apache-maven-3.6.3/conf/settings.xml -Dmaven.repo.local=/Users/x/.m2/repository package
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< com.ruoyi:ruoyi-admin >------------------------
[INFO] Building ruoyi-admin 3.2.1
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.ruoyi:ruoyi-framework:jar:3.2.1 is missing, no dependency information available
[WARNING] The POM for com.ruoyi:ruoyi-quartz:jar:3.2.1 is missing, no dependency information available
[WARNING] The POM for com.ruoyi:ruoyi-generator:jar:3.2.1 is missing, no dependency information available
[WARNING] The POM for com.ruoyi:piaolin-location:jar:3.2.1 is missing, no dependency information available
[WARNING] The POM for com.ruoyi:piaolin-love:jar:3.2.1 is missing, no dependency information available
[WARNING] The POM for com.ruoyi:piaolin-shot:jar:3.2.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.672 s
[INFO] Finished at: 2021-05-24T16:50:14+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ruoyi-admin: Could not resolve dependencies for project com.ruoyi:ruoyi-admin:jar:3.2.1: The following artifacts could not be resolved: com.ruoyi:ruoyi-framework:jar:3.2.1, com.ruoyi:ruoyi-quartz:jar:3.2.1, com.ruoyi:ruoyi-generator:jar:3.2.1, com.ruoyi:piaolin-location:jar:3.2.1, com.ruoyi:piaolin-love:jar:3.2.1, com.ruoyi:piaolin-shot:jar:3.2.1: Failure to find com.ruoyi:ruoyi-framework:jar:3.2.1 in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of public has elapsed or updates are forced -> [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

Process finished with exit code 1

分开进行编译时:最底层成功编译,然而对上一层编译时就找不到刚刚编译的内容了。

求大佬提供思路。

1824 次点击
所在节点    Java
6 条回复
zongren
2021-05-24 17:02:53 +08:00
root project install 了嘛
Zhancha
2021-05-24 17:11:59 +08:00
@zongren install 了,但是上一层显示找不到 root project
Macolor21
2021-05-24 17:18:37 +08:00
父 POM 发上来
nc4697
2021-05-24 21:12:14 +08:00
父级也要 install
Zhancha
2021-05-25 12:26:08 +08:00
@Macolor21 已经解决了,感谢大家,是我点错了
Zhancha
2021-05-25 12:26:13 +08:00
@nc4697 已经解决了,感谢大家,是我点错了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/778897

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX