美文网首页
Springboot自定义parent并打可执行jar

Springboot自定义parent并打可执行jar

作者: 修罗大人 | 来源:发表于2019-04-04 09:05 被阅读0次

    parent:

    定义依赖版本

    <dependencyManagement>

    .......

    <dependency>

    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-dependencies</artifactId>

    <version>2.1.3.RELEASE</version>

    <type>pom</type>

    <scope>import</scope>

    </dependency>

    .......

    </dependencyManagement>

    子项目

    <parent>

    <groupId>com.xiuluo</groupId>

    <artifactId>parent</artifactId>

    <version>1.0-SNAPSHOT</version>

    </parent>

    <build>

    <plugins>

    <plugin>

    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-maven-plugin</artifactId>

    <executions>

    <execution>

                        <id>spring-boot-repackage</id>

    <phase>package</phase>

                        <goals>

    <goal>repackage</goal>

                        </goals>

    </execution>

    </executions>

    <configuration>

    <mainClass>com.xiuluo.ApiApplication</mainClass>

    </configuration>

    </plugin>

    </plugins>

    </build>

    然后直接mvn package即可

    相关文章

      网友评论

          本文标题:Springboot自定义parent并打可执行jar

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