既使用maven编译,又使用lib下的Jar包

<build>
    <finalName>xxx</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
                <overlays>
                    <overlay>
                        <groupId>com.hjz</groupId>
                        <artifactId>cas</artifactId>
                        <excludes>
                            <exclude>WEB-INF/lib</exclude>
                        </excludes>
                    </overlay>
                </overlays>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>UTF-8</encoding>
                <compilerArguments>
                    <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs>
                </compilerArguments>
            </configuration>
        </plugin>
    </plugins>
</build>

  参考: 既使用maven编译,又使用lib下的Jar包

posted @ 2017-05-25 00:45  hjzqyx  阅读(2395)  评论(0编辑  收藏  举报