- <spanstyle="font-family:SimSun;"><projectxmlns="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.0http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.Yangcl.org</groupId>
- <artifactId>FrameModel</artifactId>
- <packaging>war</packaging> <!--这里定义了你项目的打包方式,有war/bundle等-->
- <name>FrameModel</name>
- <version>1.0.0-SNAPSHOT</version> <!--证明这是一个快照版本-->
- <properties> <!--为pom定义一些常量,在pom中的其它地方可以直接引用-->
- <spring.version>3.1.1.RELEASE</spring.version>
- <struts.version>2.3.4</struts.version>
- <hibernate.version>3.6.9.Final</hibernate.version>
- <axis2.version>1.6.2</axis2.version>
- <MysqL.version>5.1.9</MysqL.version>
- <aspectj.version>1.6.9</aspectj.version>
- <slf4j.version>1.6.4</slf4j.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <!-- 一个项目所依赖的全部Jar文件信息定义描述,这里不一一列出-->
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- <version>${spring.version}</version>
- </dependency>
- </dependencies>
- <!--针对一个项目的编译环节-->
- <build>
- <!--finalName属性是你项目的名字-->
- <finalName>FrameModel</finalName>
- <plugins>
- <!--编译操作的定义-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <!--Maven的打包部署与Debug行为描述-->
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1.1</version>
- <configuration><!--有这个定义,则你调试的时候不会进入target目录下,你就不用总去重启服务,尤其在页面调试的时候很方便-->
- <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
- <warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>
- </configuration>
- </plugin>
- <!--maven-surefire-plugin支持JUnit和TestNG-->
<!--默认情况下,maven-surefire-plugin的test目标会自动执行测试源码-->
<!--路径下所有以Test开头、Test或TestCase结尾的的Java类。--> - <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.7.1</version>
- <configuration>
- <skipTests>true</skipTests><!--这里选择跳过测试>
- </configuration>
- </plugin>
- <!--MavenClean操作-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
- <configuration>
- <filesets>
- <fileset>
- <directory>${basedir}/src/main/webapp/WEB-INF/</directory>
- <excludes><!--排除哪些内容不被清除-->
- <excluse>**/web.xml</excluse>
- </excludes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>