日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be

發布時間:2024/4/13 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

解決 Maven 報錯 Non-resolvable parent POM ... was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM

??筆者使用 IntelliJ IDEA 對以前的項目作重構時,發現一個匪夷所思的問題:明明使用 IntelliJ IDEA 運行項目時,項目正常運行,但使用 Maven 命令進行 clean、compile、install 時,對項目中的每一個模塊,均發生如下的報錯。

筆者報錯時的運行環境:

JDK 13.0.2

Maven 3.6.3

IntelliJ IDEA 2020.1.2 (Ultimate Edition)

??這個報錯的信息如下:

"C:\Program Files\Java\jdk-13.0.2\bin\java.exe" -Dmaven.multiModuleProjectDirectory=XXX -Xms128m -Xmx512m "-Dmaven.home=XXX\plugins\maven\lib\maven3" "-Dclassworlds.conf=XXX\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=XXX\plugins\maven\lib\maven-event-listener.jar" "-javaagent:XXX\lib\idea_rt.jar=25353:XXX\bin" -Dfile.encoding=UTF-8 -classpath "XXX\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;XXX\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.versionXXXorg.apache.maven.plugins:maven-clean-plugin:2.5:clean [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [WARNING] 'artifactId' contains an expression but should be a constant. @ line 17, column 17 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.junit.jupiter:junit-jupiter:jar -> duplicate declaration of version (?) @ line 35, column 21 [WARNING] 'artifactId' contains an expression but should be a constant. @ XXX:${project_artifactId}:${project_version}, XXX\pom.xml, line 13, column 17 [WARNING] 'version' contains an expression but should be a constant. @ XXX:${project_artifactId}:${project_version}, XXX\pom.xml, line 14, column 14 [WARNING] 'parent.relativePath' of POM XXX:${project_artifactId}:XXX (XXX\XXX\pom.xml) points at XXX:${project_artifactId} instead of XXX:XXX-project, please verify your project structure @ line 9, column 13 [FATAL] Non-resolvable parent POM for XXX:${project_artifactId}:XXX: Failure to find XXX:XXX-project:pom:XXX in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 9, column 13 [WARNING] 'artifactId' contains an expression but should be a constant. @ line 17, column 17 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.junit.jupiter:junit-jupiter:jar -> duplicate declaration of version (?) @ line 29, column 21 [WARNING] 'artifactId' contains an expression but should be a constant. @ XXX:${project_artifactId}:${project_version}, XXX\pom.xml, line 13, column 17 [WARNING] 'version' contains an expression but should be a constant. @ XXX:${project_artifactId}:${project_version}, XXX\pom.xml, line 14, column 14 [WARNING] 'parent.relativePath' of POM XXX:${project_artifactId}:XXX (XXX\XXX-exception\pom.xml) points at XXX:${project_artifactId} instead of XXX:XXX-project, please verify your project structure @ line 9, column 13 [FATAL] Non-resolvable parent POM for XXX:${project_artifactId}:XXX: Failure to find XXX:XXX-project:pom:XXX in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 9, column 13 [WARNING] 'artifactId' contains an expression but should be a constant. @ XXX:${project_artifactId}:${project_version}, XXX\pom.xml, line 13, column 17 [WARNING] 'version' contains an expression but should be a constant. @ XXX:${project_artifactId}:${project_version}, XXX\pom.xml, line 14, column 14@ [ERROR] The build could not read 2 projects -> [Help 1] [ERROR] [ERROR] The project XXX:${project_artifactId}:XXX (XXX\XXX\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for XXX:${project_artifactId}:XXX: Failure to find XXX:XXX-project:pom:XXX in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 9, column 13 -> [Help 2] [ERROR] [ERROR] The project XXX:${project_artifactId}:XXX (XXX\XXX-exception\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for XXX:${project_artifactId}:XXX: Failure to find XXX:XXX-project:pom:XXX in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 9, column 13 -> [Help 2] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

??在筆者不斷地新建工程,不斷地隔離模塊的努力下,終于發現了原因所在。(當然,每個遇到這個問題的讀者可能原因不同,這里僅供參考。)

??為了偷懶,筆者編寫了一個愚蠢的代碼。這段代碼類似如下:

<properties><project_artifactId>demo-project</project_artifactId><project_version>1.2</project_version></properties><groupId>org.demo</groupId><artifactId>${project_artifactId}</artifactId><version>${project_version}</version><packaging>pom</packaging><name>{project_artifactId}</name>

??上述代碼的問題在于,對 Maven 項目的坐標使用了 <properties/...> 中的元素來代替。但實際上,<properties/...> 應該在依賴(<dependencies/...>)中使用。Maven 并未在坐標中識別出 <properties/...>,因為坐標解析發生在解析 <properties/...> 之前。同樣地,對于子 pom,雖然父 pom 中的 <properties/...> 可以被子 pom 繼承,不過在子 pom 中的 <parent/...> 坐標里同樣不能解析父 pom 中的 <properties/...>,因為必須要先明確地指定它的父 pom 坐標,然后繼承才會發生。終于知道真相的筆者眼淚掉下來。希望讀者引以為戒。

總結

以上是生活随笔為你收集整理的解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产成人在线电影 | 超碰午夜 | 色拍拍视频 | 男人午夜网站 | 无码av免费精品一区二区三区 | 久久四虎 | 久久天天躁狠狠躁夜夜躁2014 | 国产黄在线 | 欧美成人精品三级网站 | 人妻精品久久久久中文 | 欧日韩一区二区三区 | 久久久久久久久99 | 婷婷久久久久 | 国产欧美一区二区精品久久久 | 亚洲精品aaaaa | 亚洲人成在线免费观看 | 色偷偷综合 | av一区二区在线播放 | 午夜在线一区二区三区 | 99久久免费看精品国产一区 | 亚洲国产精品区 | 亚洲hhh| 色噜噜狠狠一区二区三区 | 在线看一区 | 91成人精品一区在线播放 | 精品美女在线观看 | 日日不卡av | 国产婷婷色一区二区三区在线 | 欧美中文字幕 | 嫩草在线观看视频 | 成年人黄色一级片 | 日韩中文字幕不卡 | 国产不卡视频在线观看 | 久久99免费 | 性欧美大战久久久久久久久 | 亚洲欧美乱综合图片区小说区 | 国产精品久久久久久久一区探花 | 五月天激情丁香 | 好看的毛片 | 国产手机av| 欧美一区二区三区成人精品 | 国产成人三级在线观看 | 中国一级片黄色一级片黄 | 国内精品久久久久久久久久久 | 韩国av免费在线 | av大全免费 | 久久中文字幕高清 | 午夜影院毛片 | 都市豪门艳霸淫美妇 | 超碰日日夜夜 | www国产成人 | 一级成人毛片 | 思思久久精品 | 特级大胆西西4444人体 | 五月天开心网 | 日韩在线不卡一区 | 天天射天天干天天舔 | 日本在线观看一区二区 | 激情小说亚洲图片 | 蜜桃av成人 | 欧美激情一区二区在线 | 亚洲九九热 | 色妹av| 最新黄色av网站 | 男女啪啪网站 | 久久成人在线视频 | 成人精品黄段子 | 国产黄色免费视频 | www.-级毛片线天内射视视 | 亚洲一区二区国产 | 99视频在线播放 | 草草影院地址 | 亚洲欧美一区二区三区不卡 | 在线一区二区三区视频 | 欧美日韩人妻精品一区二区 | 一级免费片 | 欧美专区在线播放 | 欧美激情在线播放 | 国产chinese| 岛国免费av | 国产一区二区三区欧美 | jizz视频在线观看 | 影音先锋久久久久av综合网成人 | 美女扒开内裤让男人桶 | 欧美日韩国产一区二区 | 麻豆入口 | 小sao货cao死你 | 动漫av网站 | 91香蕉在线看 | 国产suv精品一区二区33 | 亚洲中文字幕久久无码 | 黄网在线看 | 欧美久久成人 | 成人试看120秒体验区 | 波多野结衣高清视频 | 日本久草视频 | 九九免费视频 | 亚洲成人www | 手机成人av |