zoukankan      html  css  js  c++  java
  • springMVC+Mybatis的maven-web项目的pom.xml文件内容

    pom.xml文件内容

      1 <!-- 第一行是XML头,指定了该xml文档的版本和编码方式 -->
      2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      3   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      4   <modelVersion>4.0.0</modelVersion><!-- 指定了当前POM模型的版本,对于Maven2及Maven 3来说,它只能是4.0.0。 -->
      5   
      6   <!-- groupId,artifactId和version三行。这三个元素定义了一个项目基本的坐标 -->
      7   <groupId>com.yeepay.test</groupId><!--定义了项目属于哪个组 -->
      8   <artifactId>TestSM</artifactId><!--定义了当前Maven项目在组中唯一的ID -->
      9   <packaging>war</packaging><!--指定打包类型,可以是war,jar,pom,ear等形式 -->
     10   <version>0.0.1-SNAPSHOT</version><!--指定了项目当前的版本 SNAPSHOT意为快照,说明该项目还处于开发中,是不稳定的版本。 -->
     11   
     12   <name>TestSM Maven Webapp</name><!--项目的名称, Maven产生的文档用 -->
     13   <url>http://maven.apache.org</url> <!--项目主页的URL, Maven产生的文档用-->
     14   
     15   
     16   <!-- 
     17      合成多个模块:一个项目有多个模块,也叫做多重模块,或者合成项目
     18   <modules>
     19         <module>nonbankcard-common</module>
     20         <module>nonbankcard-facade</module>
     21         <module>nonbankcard-core</module>
     22         <module>nonbankcard-hessian</module>
     23     </modules>
     24   --> 
     25   <!-- 
     26       父项目的坐标。如果项目中没有规定某个元素的值.父项目的packaging节点值是pom
     27   <parent>
     28       <groupId></groupId>
     29       <artifactId></artifactId>
     30       <version></version>
     31       父项目的pom.xml文件的相对路径。相对路径允许你选择一个不同的路径。
     32       默认值是../pom.xml。Maven首先在构建当前项目的地方寻找父项目的pom,
     33       其次在文件系统的这个位置(relativePath位置),
     34       然后在本地仓库
     35       最后在远程仓库寻找父项目的pom。
     36       <relativePath></relativePath>
     37   </parent>
     38    -->
     39    
     40   <!-- 该元素下可以包含多个dependency元素以声明项目的依赖,前面我们提到groupId、artifactId和version是任何一个Maven项目最基本的坐标 -->
     41   <dependencies>
     42        <dependency>
     43           <groupId>junit</groupId>
     44           <artifactId>junit</artifactId>
     45           <version>3.8.1</version>
     46           <scope>test</scope>
     47        </dependency>
     48        <dependency>
     49           <groupId>org.springframework</groupId>
     50           <artifactId>spring-web</artifactId>
     51           <version>3.2.0.RELEASE</version>
     52        </dependency>
     53        <dependency>
     54           <groupId>org.springframework</groupId>
     55           <artifactId>spring-webmvc</artifactId>
     56           <version>3.2.0.RELEASE</version>
     57        </dependency>
     58        <dependency>
     59           <groupId>org.springframework</groupId>
     60           <artifactId>spring-orm</artifactId>
     61           <version>3.2.0.RELEASE</version>
     62        </dependency>
     63        <dependency>
     64             <groupId>commons-fileupload</groupId>
     65             <artifactId>commons-fileupload</artifactId>
     66             <version>1.3.1</version>
     67        </dependency>
     68        <dependency>
     69             <groupId>javax.servlet</groupId>
     70             <artifactId>jstl</artifactId>
     71             <version>1.2</version>
     72        </dependency>
     73        <dependency>
     74             <groupId>taglibs</groupId>
     75             <artifactId>standard</artifactId>
     76             <version>1.1.2</version>
     77        </dependency>
     78        <dependency>
     79             <groupId>org.mybatis</groupId>
     80             <artifactId>mybatis</artifactId>
     81             <version>3.2.7</version>
     82        </dependency>
     83        <dependency>
     84           <groupId>org.mybatis</groupId>
     85           <artifactId>mybatis-spring</artifactId>
     86           <version>1.2.2</version>
     87        </dependency>
     88        <dependency>
     89               <groupId>mysql</groupId>
     90               <artifactId>mysql</artifactId>
     91               <version>1</version>
     92           </dependency>
     93           <dependency>
     94             <groupId>javax.servlet</groupId>
     95             <artifactId>servlet-api</artifactId>
     96             <version>2.4</version>
     97             <scope>provided</scope>
     98            </dependency>
     99            <dependency>
    100             <groupId>com.alibaba</groupId>
    101             <artifactId>fastjson</artifactId>
    102             <version>1.1.25</version>
    103         </dependency>
    104         <dependency>
    105             <groupId>cglib</groupId>
    106             <artifactId>cglib</artifactId>
    107             <version>3.0</version>
    108         </dependency>
    109         
    110         <dependency>
    111             <groupId>org.aspectj</groupId>
    112             <artifactId>aspectjrt</artifactId>
    113             <version>1.6.11</version>
    114         </dependency>
    115  
    116         <dependency>
    117             <groupId>org.aspectj</groupId>
    118             <artifactId>aspectjweaver</artifactId>
    119             <version>1.6.11</version>
    120         </dependency>
    121         <dependency>    
    122             <groupId>org.slf4j</groupId>    
    123             <artifactId>slf4j-api</artifactId>    
    124             <version>1.6.6</version>    
    125         </dependency>    
    126         <dependency>    
    127             <groupId>org.slf4j</groupId>    
    128             <artifactId>jcl-over-slf4j</artifactId>    
    129             <version>1.6.6</version>    
    130             <scope>runtime</scope>    
    131           </dependency>    
    132         <dependency>    
    133             <groupId>org.slf4j</groupId>    
    134             <artifactId>slf4j-log4j12</artifactId>    
    135             <version>1.6.6</version>    
    136             <scope>runtime</scope>    
    137         </dependency> 
    138         
    139   </dependencies>
    140   
    141   <!-- 功能集标签,在此标签下面可以定义一系列的插件以实现功能 
    142         主要用于编译设置,一般包含两种标签:resource和plugins,前者用于排除或包含某些资源文件,后者用来设置插件。
    143         例如:在用Junit4写测试程序,用到了@test等注解,
    144         但是由于Maven的核心插件之一compiler插件默认只支持编译java1.3,因此需要配置该插件使其支持java5,需要修改pom文件如下:
    145   -->
    146   <build>
    147     <finalName>TestSM</finalName><!-- 当前项目的 <artifactId>标示-->
    148     <!-- Maven的编译插件默认是JDK 1.4的编译级别,为了让Maven的编译插件使用JDK5.0的编译级别,需要对编译插件作如下配置 -->
    149     <plugins>
    150         <plugin>
    151             <groupId>org.apache.maven.plugins</groupId>
    152             <artifactId>maven-compiler-plugin</artifactId>
    153             <version>2.0</version>
    154             <configuration>
    155                 <source>1.5</source>
    156                 <target>1.5</target>
    157             </configuration>
    158         </plugin>
    159     </plugins>
    160   </build>
    161 </project>
    View Code
  • 相关阅读:
    开源一个常用的小软件的源码——系统数据库服务管理软件
    MySql Windws 下自动备份脚本
    ubuntu-14.04-server配置Jexus --安装步骤记录
    Jumony快速抓取网页 --- Jumony使用笔记--icode
    视频教程--ASP.NET MVC 使用 Petapoco 微型ORM框架+NpgSql驱动连接 PostgreSQL数据库
    收录.NET跨平台及跨数据库的博文...
    ASP.NET MVC 使用 Petapoco 微型ORM框架+NpgSql驱动连接 PostgreSQL数据库
    Windbg程序调试系列
    QCY蓝牙耳机 左右两只耳机配对 方法
    wpf 的 Window或UserControl绑定自己后台属性
  • 原文地址:https://www.cnblogs.com/shangxiaofei/p/4180376.html
Copyright © 2011-2022 走看看