java - svn maven項目的依賴不起作用
問題描述
當(dāng)我引用一個svn的maven項目時,我么maven projects下沒有maven依賴,項目中也沒有對應(yīng)的jar。

pom.xml文件代碼
<project xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'> <parent><artifactId>meetmecarv2</artifactId><groupId>com.meetmecar</groupId><version>1.0</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>meetmecar_test</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>meetmecar_test Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies><dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope></dependency><dependency> <groupId>junit</groupId> <artifactId>junit</artifactId></dependency><dependency> <groupId>com.meetmecar</groupId> <artifactId>meetmecar-service</artifactId></dependency><dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <scope>provided</scope></dependency><dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <scope>provided</scope></dependency><dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId></dependency><dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId></dependency> </dependencies> <build><finalName>meetmecar_test</finalName> </build></project>請問我改怎么修改?
問題解答
回答1:可能是你parent項目沒導(dǎo)入到idea里面, idea會去.m2/repository里面找parent的pom, 如果你沒有把parent install到本地倉庫的話, 會找不到parent的pom, 所以會找不到你依賴的jar包吧
回答2:包怎么都不寫版本號的<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>6.0.0.Alpha2</version></dependency>回答3:
version沒寫
回答4:首先補完版本號,然后點擊 “Maven Projects” 下面的左邊第一個按鈕刷新依賴關(guān)系。
相關(guān)文章:
1. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~4. 實現(xiàn)bing搜索工具urlAPI提交5. vue.js - Vue 如何像Angular.js watch 一樣監(jiān)聽數(shù)據(jù)變化6. javascript - nodejs關(guān)于進程間發(fā)送句柄的一點疑問7. 配置Apache時,添加對PHP的支持時語法錯誤8. phpstudy8.1支持win11系統(tǒng)嗎?9. javascript - vue-router 地址改變數(shù)據(jù)未改變10. javascript - 移動端上不能實現(xiàn)拖拽布局嗎?

網(wǎng)公網(wǎng)安備