spring-boot-maven-plugin >= 1.4.0 jar structure changes

て烟熏妆下的殇ゞ 提交于 2019-12-02 02:01:33

A solution for how to use a Spring Boot application as a dependency can be found here.

Essentially, in your maven build, add this:

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

This will cause your primary jar artifact (the one which would be built in a standard maven build) to be structured normally, so you can depend on it, and the spring-boot-maven-plugin will repackage the jar into a second artifact, this one executable, with the exec classifier.

Hm, there've been plenty of changes in testing recently, so did you check the upgrade notes for 1.4.0?

There is a nice documentation to change the Class and package names https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.4-Release-Notes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!