无法在项目spring-boot-keycloak上执行目标org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean(default-clean)

问题描述 投票:0回答:1

我的应用程序运行正常,我能够使用<packaging>jar</packaging>进行mvn全新安装,并且能够执行jar文件,但将其更改为war文件,而我却无法执行mvn clean install

这些之间也有什么区别吗?我在寻找更多解决方案,但是没有运气

错误:

无法在项目spring-boot-keycloak上执行目标org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean(默认清理):无法清理项目:无法删除C:\ Users \ user \ Documents \ New文件夹\ E.Services \ target

我的POM文件:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.baeldung.keycloak</groupId>
    <artifactId>spring-boot-keycloak</artifactId>
    <version>0.0.1</version>
    <name>spring-boot-keycloak</name>
    <packaging>war</packaging>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.keycloak.bom</groupId>
                <artifactId>keycloak-adapter-bom</artifactId>
                <version>3.3.0.Final</version>
                <type>pom</type>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>


<-- Many dependencies -->

    </dependencies>
    <repositories>
        <repository>
            <id>central</id>
            <name>Maven Plugin Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </repository>

    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
java maven pom.xml war
1个回答
0
投票

无法删除目标-这实际上是一个文件系统问题-您可能在$ {project.home} / target目录中打开了文件或打开了Windows资源管理器...

© www.soinside.com 2019 - 2024. All rights reserved.