无法构建 war 文件:无法删除目标目录中的验证-api-2.0.1.Final.jar

Unable to build war file: Failed to delete validation-api-2.0.1.Final.jar in target directory

我正在尝试使用命令 "mvn clean install -D spring.profiles.active=prod -P prod" 在控制台中构建 war 文件,但在启动此命令时出现问题:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on project web_importer: Failed to clean project: Failed to delete C:\Users\sbrezhne\pr\kddb_fly\kddb-webimporter\target\web_importer\WEB-INF\lib\validation-api-2.0.1.Final.jar -> [Help 1]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

当我在带有嵌入式 Tomcat 的 Eclipse 中构建应用程序时 - 一切正常。但是当我尝试构建 war 文件时出现错误。我不知道为什么我的验证有问题-api-2.0.1.Final.jar,因为几天前一切正常,没有任何问题这个我的 pom.xml:

<dependencies>  
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>

    <!-- For Working with Json Web Tokens (JWT) -->
    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt</artifactId>
        <version>${jjwt.version}</version>
    </dependency>

    <!-- For Java 8 Date/Time Support -->
    <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
    </dependency>

     <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
     </dependency>  

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>           
    </dependency>   

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
    </dependency>

    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>5.2.4</version>
    </dependency>
</dependencies>

@Egeo解决这个问题:关闭Eclipse一切正常。