springboot项目打war包pom设置

<build>
        <finalName>PayManager</finalName><!--打包后的名字PayManager.war-->
        <plugins>
            <!-- <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin> -->
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-surefire-plugin</artifactId>  
                <configuration>  
                  <skipTests>true</skipTests>  
                </configuration>  
            </plugin>
            <!--设置maven-war-plugins插件,否则外部依赖无法打进war包 ,libs项目路径下的jar包-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>libs</directory>
                            <targetPath>WEB-INF/lib/</targetPath>
                            <includes>
                                <include>**/*.jar</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

 

posted @ 2019-03-25 17:15  云晴  阅读(545)  评论(0编辑  收藏  举报