maven war project complete configuration

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <!--<parent>
        <artifactId>mywebservice</artifactId>
        <groupId>com.lzyy.mine.webservice</groupId>
        <version>1.0</version>
        <relativePath>../MyWebService/pom.xml</relativePath>
    </parent>-->
    <modelVersion>4.0.0</modelVersion>

    < artifactId >my api </ artifactId > 
    < packaging > war </ packaging > 
    < description > my external API platform </ description >

    <properties>
        <jdk.version>1.7</jdk.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- junit等-->
        <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!--https://www.eclipse.org/jetty/documentation/9.3.0.v20150612/jetty-maven-plugin.html -->
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.17.v20160517</version>
                <configuration>
                    <httpConnector>
                        <port>9097</port>
                    </httpConnector>
                    <webApp>
                        <contextPath>/myapi</contextPath>
                    </webApp>
                    <stopPort>9966</stopPort>
                    <stopKey>myapi</stopKey>
                    <!-- <stopKey>gzapi</stopKey> <scanIntervalSeconds>5</scanIntervalSeconds> 
                        <reload>automatic</reload> -->
                </configuration>
            </plugin>
        </plugins>

    </build>


</project>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325067697&siteId=291194637