springboot-maven-plugin打包可执行jar包留存原jar包

  <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>demo.api.Application</mainClass>
                    <layout>ZIP</layout>
                    <-- exec做为可执行jar包前缀 -->
                    <classifier>exec</classifier>
                </configuration>
                <executions>
                    <execution>
                        <id>repackage</id>
                        <goals>
                            <!--打包可执行-->
                            <goal>repackage</goal>
                        </goals>

                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
posted @ 2022-04-21 19:31  linkanyway  阅读(126)  评论(0编辑  收藏  举报