Springboot:添加依赖项时出错

时间:2018-06-09 16:49:05

标签: maven spring-boot

我正在尝试为springboot运行一个简单的程序,所以我在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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>springboot</groupId>
  <artifactId>firstprogram</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.2.RELEASE</version>
    </parent>
  <name>firstprogram Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>  
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
  </dependencies>
  <build>
    <finalName>firstprogram</finalName>
  </build>
</project>

但是在添加上述依赖关系时,我面临以下错误,请帮助

Archive for required library: 'C:/Users/sparsh/.m2/repository/org/springframework/spring-web/5.0.6.RELEASE/spring-web-5.0.6.RELEASE.jar' in project 'firstprogram' cannot be read or is not a valid ZIP file

0 个答案:

没有答案