出现这样的问题就是jar包版本问题,每个人的解决方式都不一样。
问题如下:
[ERROR] The project XXX (/home/×××/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.version' for xxx:jar is missing. @ line xx, column xx
<dependencies>
<dependency>
<groupId>com.taotao</groupId>
<artifactId>taotao-mapper</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- solr客户端 -->
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
</dependency>
</dependencies>
尝试多次,子项目加载时总是报如上缺少jar包版本信息的错误,
最后想着试试添加上
<dependencyManagement>
<dependencyManagement>
这个标签试试,没想到好了。这个是jar版本控制声明,缺少它还不行。
解决问题~~~