maven 打包 war 包含 WEB-INF/lib 目录

<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>utf-8</encoding>
                    <compilerArguments>
                        <extdirs>WebRoot\WEB-INF\lib</extdirs>
                    </compilerArguments>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>WebRoot</directory>         
                            <targetPath>/</targetPath>         
                            <includes>             
                                <include>**/*</include>         
                            </includes>
                        </resource>
                        <resource>
                            <directory>WebRoot/WEB-INF/lib</directory>         
                            <targetPath>WEB-INF/lib/</targetPath>         
                            <includes>             
                                <include>**/*.jar</include>         
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>

 

posted on 2019-04-30 08:43  正义的伙伴!  阅读(3039)  评论(0编辑  收藏  举报

导航

//增加一段JS脚本,为目录生成使用