运行 mvn clean install 后没有生成目标文件夹

No target folder generated after running mvn clean install

我在 运行 mvn clean install 后无法看到目标文件夹 这是我的父 pom.Traget 文件夹结构中缺少的文件夹。虽然构建消息成功

 <?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.6.3</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>
        <groupId>abc.def.ghi.jkl.ABCservice</groupId>
        <artifactId>abc-def-service</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <name>Abc Def Service</name>
        <description>Abc Def Service</description>
        <packaging>pom</packaging>
        <properties>
            <java.version>11</java.version>
            <flyway.version>6.4.4</flyway.version>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
        </properties>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <inherited>false</inherited>
                        <configuration>
                            <configFiles>${project.basedir}/../flyway/flyway.conf</configFiles>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.microsoft.sqlserver</groupId>
                                <artifactId>mssql-jdbc</artifactId>
                                <version>7.4.1.jre8</version>
                            </dependency>
                        </dependencies>
                    </plugin>
            </plugins>
        </build>
    
    </project>

下面是我的子 pom,我想创建 jar 文件以用于我的 Docker 图像构建。不知何故没有创建目标文件夹

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>abc.def.ghi.jkl.app</groupId>
        <artifactId>abc-def-service</artifactId>
        <relativePath>../../pom.xml</relativePath>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <artifactId>abc-def-application</artifactId>
    <name>abc-def-application</name>
    
    <properties>
        <java.version>11</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

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

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.6.3</version>
                <configuration>
                    <mainClass>abc.def.ghi.MainApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

在父 pom 中,我使用的是不应该使用的 pom。它应该是 jar 或者根本不应该指定。

https://github.com/eugenp/tutorials/issues/2414