java - svn maven項目的依賴不起作用
問題描述
當我引用一個svn的maven項目時,我么maven projects下沒有maven依賴,項目中也沒有對應的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項目沒導入到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” 下面的左邊第一個按鈕刷新依賴關系。
相關文章:
1. boot2docker無法啟動2. node.js - antdesign怎么集合react-redux對input控件進行初始化賦值3. 關于docker下的nginx壓力測試4. MYSQL中如何把SELECT A AS B中的B作為WHERE篩選條件5. mysql - InnoDB中的鎖6. MySQL客戶端吃掉了SQL注解?7. mysql - 對同一個表同時更新2條記錄,但更新不同字段,會不會造成數據丟失?8. node.js mysql Cannot find module "net" 和 "tls"和"fs" 的問題9. mysql 一條語句多種count如何寫10. 數據庫 - Mysql的存儲過程真的是個坑!求助下面的存儲過程哪里錯啦,實在是找不到哪里的問題了。

網公網安備