时间的法外狂徒

导航

在mvn构建时直接将项目jar包做成服务第三方工具

只需要在pom文件中添加:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <!-- 在打包时生成把jar包做成服务的文件 -->
            <plugin>
                <groupId>cn.joylau.code</groupId>
                <artifactId>joylau-springboot-daemon-windows</artifactId>
                <version>1.0.RELEASE</version>
                <executions>
                    <execution>
                        <id>make-win-service</id>
                        <phase>package</phase>
                        <goals>
                            <goal>make-win-service</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
        </plugins>
    </build>

 

posted on 2020-05-07 19:30  抄手砚  阅读(209)  评论(0编辑  收藏  举报