欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

no main manifest attribute, in /app.jar (jar中没有主清单属性 )

程序员文章站 2022-04-28 08:05:59
...

眼瞎了。。。

原来pom文件是这样的:

居然放在了 pluginManagement中!!!

<build>
        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <configuration>
                        <imageName>${imageName}</imageName>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

改成 plugins 节点:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <configuration>
                    <imageName>${imageName}</imageName>
                </configuration>
            </plugin>
        </plugins>
    </build>