maven-webapp項目pom.xml配置

來源:互聯網
上載者:User

標籤:管理   pom.xml   www.   外掛程式   host   path   pac   includes   1.5   

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fz</groupId>
<artifactId>oa</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>oa Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<java-version>1.7</java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies></dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<!--預設的主代碼目錄-->
<sourceDirectory>src/main/java</sourceDirectory>
<!--預設的測試代碼目錄-->
<testSourceDirectory>src/test/java</testSourceDirectory>
  

  <!--處理無法載入資源設定檔-->
    <resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
     <--編譯外掛程式compiler配置-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
  
<!--tomcat外掛程式-->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<!--tomcat管理路徑-->
<url>http://localhost:80/manager/text</url>
<!--與settings.xml檔案中Server的id相同-->
<server>tomcat7</server>
<uriEncoding>utf-8</uriEncoding>
<port>80</port><!--伺服器連接埠號碼80可以省略-->
<path>/</path><!--應用的部署位置-->
<contextReloadable>true</contextReloadable>
<systemProperties>
<java.util.logging.SimpleFormatter.format>[%4$s] %1$tF %1$tT %3$s %5$s %n</java.util.logging.SimpleFormatter.format>
</systemProperties>
</configuration>
</plugin>

</plugins>
</build>
</project>

maven-webapp項目pom.xml配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.