综合技术 --pom.xml文件理解

<!-- 第一行是xml头,指定了该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  

<!-- 制定了当前pom模型的版本 -->
<modelVersion>4.0.0</modelVersion>

<!--groupId、artifactId和version这三个元素定义了一个项目的基本坐标  -->
<!-- groupId,指明项目属于哪个组-->
<groupId>com.readygo</groupId>
<!-- artifactId,指明当前maven项目在组中唯一的id-->
<artifactId>meetingcooperation</artifactId>
<!-- packaging,指明打包类型,可以是war、jar、pom、ear等格式-->
<packaging>war</packaging>
<!-- version,指明了该项目当前的版本-->
<version>0.0.1-SNAPSHOT</version>
<!-- name,项目的名称,maven产生的文档用-->
<name>meetingcooperation Maven Webapp</name>
<!-- url,项目主页的url,maven产生的文档用-->
<url> 

<!-- dependencies,该元素下可以打包多个dependency元素以声明该项目的依赖包 -->
<dependencies>
<!-- dependency,每个dependency里面都包含groupId、artifactId 、version -->
<dependency>
<!-- groupId,指明jar包名字  -->
<groupId>org.apache.maven.plugins</groupId>
    <!-- artifactId,有时候jar包里面有多个文件夹,我们只需要其中某个文件夹里面的xx.class,就用artifactId来标注选择那     个文件夹,唯一标识 -->
    <artifactId>maven-resources-plugin</artifactId>
    <!-- 这个很明显,jar包版本号-->
    <version>2.5</version>
</dependency>

<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
    </dependency>
    
    <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
    </dependency>
    
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!--hibernate的引用 -->
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.8</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.1.0.7.0</version>
</dependency>
<!-- <dependency> -->
<!--   <groupId>org.aspectj</groupId>  -->
<!--   <artifactId>aspectjweaver</artifactId>  -->
<!--   <version>1.7.4</version> -->
<!-- </dependency> -->
<dependency>  
    <groupId>org.springframework</groupId>  
    <artifactId>spring-aspects</artifactId>  
    <version>4.0.6.RELEASE</version>  
</dependency>  
<!-- aspectJ dependencies --> 
        <dependency> 
            <groupId>org.aspectj</groupId> 
            <artifactId>aspectjrt</artifactId> 
            <version>1.6.5</version> 
        </dependency> 
        <dependency> 
            <groupId>org.aspectj</groupId> 
            <artifactId>aspectjweaver</artifactId> 
            <version>1.6.5</version> 
        </dependency> 
        <dependency> 
            <groupId>org.aspectj</groupId> 
            <artifactId>aspectjtools</artifactId> 
            <version>1.6.5</version> 
        </dependency> 
 <dependency>  
            <groupId>org.codehaus.jackson</groupId>  
            <artifactId>jackson-mapper-asl</artifactId>  
            <version>1.9.2</version>  
        </dependency>  
        <dependency>  
            <groupId>org.codehaus.jackson</groupId>  
            <artifactId>jackson-core-asl</artifactId>  
            <version>1.9.2</version>  
        </dependency>  
        
        <dependency>      
    <groupId>net.sf.json-lib</groupId>     
    <artifactId>json-lib</artifactId>      
    <version>2.4</version>   
    <classifier>jdk15</classifier>       
</dependency>  
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<!-- log4j -->
<dependency>  
            <groupId>org.slf4j</groupId>  
            <artifactId>slf4j-api</artifactId>  
            <version>1.6.6</version>  
        </dependency>  
        <dependency>  
            <groupId>org.slf4j</groupId>  
            <artifactId>jcl-over-slf4j</artifactId>  
            <version>1.6.6</version>  
            <scope>runtime</scope>  
        </dependency>  
        <dependency>  
            <groupId>org.slf4j</groupId>  
            <artifactId>slf4j-log4j12</artifactId>  
            <version>1.6.6</version>  
            <scope>runtime</scope>  
        </dependency>
<!-- servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>

<!--功能集标签,在此标签下可以定义一系列的插件以及实现功能,
主要用于编译设置,一般包含两种标签:resources和plugins,
前者用于排除或包含某些资源文件,后者用于设置插件。 -->
<build>
<!-- 当前项目的名字,和<artifactId>标识应该一致 -->
<finalName>meetingcooperation</finalName>
<!-- maven的编译插件默认是JDK1.4的编译级别,为了让maven的编译插件使用jdk1.5的编译级别,需要对编译插件做如下配置 -->
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0</version>
        <configuration>
            <source>1.5</source>
            <target>1.5</target>
        </configuration>
    </plugin>
</plugins>
</build>

</project>



你可能感兴趣的:(综合技术 --pom.xml文件理解)