maven 项目 pom.xml文件中配置的jar包下载报错

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-core:jar must be a valid version but is '${spring.version}'. @ line 28, column 13
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-beans:jar must be a valid version but is '${spring.version}'. @ line 34, column 13
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-context:jar must be a valid version but is '${spring.version}'. @ line 40, column 13
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-tx:jar must be a valid version but is '${spring.version}'. @ line 46, column 13
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-web:jar must be a valid version but is '${spring.version}'. @ line 52, column 13
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-test:jar must be a valid version but is '${spring.version}'. @ line 58, column 13
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-orm:jar must be a valid version but is '${spring.version}'. @ line 66, column 13
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar must be a valid version but is '${hibernate.version}'. @ line 73, column 13
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-ehcache:jar must be a valid version but is '${hibernate.version}'. @ line 79, column 13
[ERROR] 'dependencies.dependency.version' for org.apache.struts:struts2-core:jar must be a valid version but is '${struts2.version}'. @ line 86, column 13
[ERROR] 'dependencies.dependency.version' for org.apache.struts:struts2-spring-plugin:jar must be a valid version but is '${struts2.version}'. @ line 100, column 13
[ERROR] 'dependencies.dependency.version' for org.apache.struts:struts2-convention-plugin:jar must be a valid version but is '${struts2.version}'. @ line 106, column 13
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.core:jackson-annotations:jar must be a valid version but is '${jackson.version}'. @ line 140, column 13
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.core:jackson-core:jar must be a valid version but is '${jackson.version}'. @ line 146, column 13
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.core:jackson-databind:jar must be a valid version but is '${jackson.version}'. @ line 152, column 13

 

Q:下载jar包时报错

A:我的pom.xml中使用了

  <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>

但是没有给${spring.version}配置value,导致下载时找不到jar的具体版本

 

 

解决:添加

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring.version>4.1.1.RELEASE</spring.version>
        <spring.data.jpa.version>1.7.0.RELEASE</spring.data.jpa.version>
        <hibernate.version>4.3.0.Beta4</hibernate.version>
 </properties>

用到那个配置那个就行

 

posted @ 2016-11-24 14:52  liangxinxin  阅读(7133)  评论(0编辑  收藏  举报