Maven打war包

<dependencies>
    <!-- 本地包 -->
    <dependency>
        <groupId>com.qq</groupId>
        <artifactId>qq_connect</artifactId>
        <version>2.0</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/QQSdk4J.jar</systemPath>
    </dependency>
</dependencies>
<build>
    <finalName>AuthServer</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <!--JDK版本-->
                <source>1.7</source>
                <target>1.7</target>
                <!--编译使用的字符集-->
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <plugin>
            <!--http://maven.apache.org/plugins/maven-war-plugin/-->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <!--war包文件名-->
                <warName>authServer</warName>
                <!--指定web.xml文件位置-->
                <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
                <!--指定各种资源文件-->
                <webResources>
                    <resource>
                        <directory>${project.basedir}/src/main/resources</directory>
                        <targetPath>WEB-INF/classes</targetPath>
                    </resource>
                </webResources>
            </configuration>
        </plugin>
    </plugins>
</build>


你可能感兴趣的:(maven)