美文网首页
spring boot maven plugin Executa

spring boot maven plugin Executa

作者: hapjin | 来源:发表于2019-03-26 10:43 被阅读0次
    spring-boot.png

    spring-boot-starter-parent 包含了repackage goal,所以就不需要在pom.xml里面配置如下复杂的goal目标了:

    <build>
      ...
      <plugins>
        ...
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>2.1.3.RELEASE</version>
          <executions>
            <execution>
              <goals>
                <goal>repackage</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        ...
      </plugins>
      ...
    </build>
    

    因此,只需要简单地配置:

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

    就能打成Executable Jar

    参考:11.5 Creating an Executable Jar

    相关文章

      网友评论

          本文标题:spring boot maven plugin Executa

          本文链接:https://www.haomeiwen.com/subject/rdawvqtx.html