首页 > 代码库 > 一份MAVEN的POM.XML文件样板
一份MAVEN的POM.XML文件样板
<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.tetlife.jms</groupId>
< artifactId>b2c_jms</artifactId>
< packaging>war</packaging>
< version>1.0-SNAPSHOT</version>
< name>b2c_jms Maven Webapp</name>
< url>http://maven.apache.org</url>
<properties>
< !-- 常量属性-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
< project.spring.version>3.0.5.RELEASE</project.spring.version>
< /properties>
<build>
< finalName>b2c_jms</finalName>
< sourceDirectory>${basedir}/src/main/java</sourceDirectory>
< outputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</outputDirectory>
< resources>
< resource>
< directory>${basedir}/src/main/java</directory>
< excludes>
< exclude>***.properties</include>
< include>**/*.xml</include>
< /includes>
< /resource>
< /resources>
< plugins>
< !-- 打war包插件-->
<plugin>
< artifactId>maven-war-plugin</artifactId>
< configuration>
< webappDirectory>${basedir}/src/main/webapp</webappDirectory>
< warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>
< /configuration>
< /plugin>
< !-- 编译插件-->
<plugin>
< artifactId>maven-compiler-plugin</artifactId>
< configuration>
< source>1.5</source>
< target>1.5</target>
< encoding>utf-8</encoding>
< /configuration>
< /plugin>
< !-- 资源插件-->
<plugin>
< groupId>org.apache.maven.plugins</groupId>
< artifactId>maven-resources-plugin</artifactId>
< configuration>
< encoding>UTF-8</encoding>
< /configuration>
< /plugin>
< !-- Jetty容器-->
<plugin>
< groupId>org.mortbay.jetty</groupId>
< artifactId>maven-jetty-plugin</artifactId>
< version>6.1.9</version>
< configuration>
< contextPath>/b2c_jms</contextPath>
< overrideWebXml>
conf/jetty-web.xml
< /overrideWebXml>
< scanIntervalSeconds>0</scanIntervalSeconds>
< stopKey>foo</stopKey>
< stopPort>9999</stopPort>
< connectors>
< connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
< port>8080</port>
< maxIdleTime>60000</maxIdleTime>
< /connector>
< /connectors>
< /configuration>
< /plugin>
< /plugins>
< /build>
< dependencies>
< dependency>
< groupId>junit</groupId>
< artifactId>junit</artifactId>
< version>3.8.1</version>
< scope>test</scope>
< /dependency>
< dependency>
< groupId>javax.servlet</groupId>
< artifactId>servlet-api</artifactId>
< version>2.4</version>
< scope>provided</scope>
< /dependency>
< dependency>
< groupId>javax.servlet</groupId>
< artifactId>jstl</artifactId>
< version>1.2</version>
< scope>provided</scope>
< /dependency>
< dependency>
< groupId>javax.servlet.jsp</groupId>
< artifactId>jsp-api</artifactId>
< version>2.1</version>
< scope>provided</scope>
< /dependency>
< dependency>
< groupId>com.oracle</groupId>
< artifactId>ojdbc14</artifactId>
< version>10.1.0.2.0</version>
< /dependency>
< dependency>
< groupId>log4j</groupId>
< artifactId>log4j</artifactId>
< version>1.2.13</version>
< /dependency>
< dependency>
< groupId>c3p0</groupId>
< artifactId>c3p0</artifactId>
< version>0.9.1.2</version>
< /dependency>
< dependency>
< groupId>org.quartz</groupId>
< artifactId>quartz-all</artifactId>
< version>1.7.3</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-core</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-asm</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-aop</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-beans</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-context</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-context-support</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-jdbc</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-tx</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-expression</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< dependency>
< groupId>org.springframework</groupId>
< artifactId>spring-web</artifactId>
< version>${project.spring.version}</version>
< /dependency>
< /dependencies>
< /project>