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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>cn.itcast.babasport</groupId>
    <artifactId>parent2017</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <modules>
        <module>babasport-portal</module>
        <module>babasport-console</module>
        <module>babasport-login</module>
        <module>babasport-pojo</module>
        <module>babasport-interface</module>
        <module>babasport-dao</module>
        <module>babasport-service-product</module>
        <module>babasport-service-cms</module>
        <module>babasport-service-buyer</module>
        <module>babasport-service-solr</module>
        <module>babasport-common</module>
    </modules>

    <!-- jdk 1.7 -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- 设置统一控制版本 -->
    <properties>
        <java-version>1.7</java-version>
        <junit-version>4.12</junit-version>
        <spring.version>4.1.3.RELEASE</spring.version>
        <jackson.version>2.4.2</jackson.version>
        <mysql-connector-java-version>5.1.8</mysql-connector-java-version>
        <org.mybatis-version>3.2.7</org.mybatis-version>
        <org.mybatis-spring-version>1.2.2</org.mybatis-spring-version>
        <opensymphony-version>2.4.2</opensymphony-version>
        <freemarker-version>2.3.18</freemarker-version>
        <druid.version>1.0.9</druid.version>
        <commons-collections-version>1.0</commons-collections-version>
        <commons-fileupload-version>1.2.2</commons-fileupload-version>
        <org.apache.commons-version>3.1</org.apache.commons-version>
        <commons-codec-version>1.6</commons-codec-version>
        <dom4j-version>1.6.1</dom4j-version>
        <javax.servlet-version>1.2</javax.servlet-version>
        <aspectjweaver-version>1.6.6</aspectjweaver-version>
        <slf4j-log4j12-version>1.6.6</slf4j-log4j12-version>
        <log4j-version>1.2.16</log4j-version>
        <javax.servlet-jsp-version>2.0</javax.servlet-jsp-version>
        <cglib-version>2.2.2</cglib-version>
        <slf4j-api-version>1.6.6</slf4j-api-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <!-- 依赖管理 版本号 -->
    <!-- 设置统一依赖管理、不强行依赖 -->
    
        <dependencies>
            <!-- with junit4.8.2 -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit-version}</version>
                <type>jar</type>
            </dependency>
            <!-- Spring -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</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-webmvc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aspects</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jms</artifactId>
                <version>${spring.version}</version>
            </dependency>


            <!-- Jackson Json处理工具包 -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <!--freemarker -->
            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>2.3.18</version>
            </dependency>
            <!-- with mybatis-spring -->
            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis</artifactId>
                <version>${org.mybatis-version}</version>
            </dependency>
            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis-spring</artifactId>
                <version>${org.mybatis-spring-version}</version>
            </dependency>
            <!-- jdbc driver -->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql-connector-java-version}</version>
            </dependency>
            <!-- 连接池 -->
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${druid.version}</version>
            </dependency>
            <!-- apache commons jar -->
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>${commons-collections-version}</version>
            </dependency>

            <dependency>
                <groupId>commons-fileupload</groupId>
                <artifactId>commons-fileupload</artifactId>
                <version>${commons-fileupload-version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${org.apache.commons-version}</version>
            </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons-codec-version}</version>
            </dependency>
            <!-- analyze xml use dom4j -->
            <dependency>
                <groupId>dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>${dom4j-version}</version>
            </dependency>

            <!-- jstl标签 -->
            <dependency>
                <groupId>jstl</groupId>
                <artifactId>jstl</artifactId>
                <version>1.2</version>
            </dependency>
            <dependency>
                <groupId>taglibs</groupId>
                <artifactId>standard</artifactId>
                <version>1.1.2</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.6.6</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.6</version>
            </dependency>
            <dependency>
                <groupId>javax.activation</groupId>
                <artifactId>activation</artifactId>
                <version>1.1.1</version>
            </dependency>

            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>${cglib-version}</version>
            </dependency>

            <dependency>
                <groupId>net.fckeditor</groupId>
                <artifactId>java-core</artifactId>
                <version>2.6</version>
            </dependency>

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20131018</version>
            </dependency>

            <!--page -->
            <dependency>
                <groupId>com.babasport</groupId>
                <artifactId>page</artifactId>
                <version>1.0</version>
            </dependency>
            <!-- solrJ -->
            <dependency>
                <groupId>org.apache.solr</groupId>
                <artifactId>solr-solrj</artifactId>
                <version>4.10.3</version>
            </dependency>

            <!-- jedis Java接口 -->
            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>2.6.2</version>
                <type>jar</type>
            </dependency>

            <!-- FastDFS client -->
            <dependency>
                <groupId>fastdfs_client</groupId>
                <artifactId>fastdfs_client</artifactId>
                <version>1.20</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.netty</groupId>
                <artifactId>netty</artifactId>
                <version>3.2.5.Final</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>dubbo</artifactId>
                <version>2.5.3</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>1.1.41</version>
            </dependency>

            <!-- Zookeeper 用于分布式服务管理 -->
            <dependency>
                <groupId>com.github.sgroschupf</groupId>
                <artifactId>zkclient</artifactId>
                <version>0.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.zookeeper</groupId>
                <artifactId>zookeeper</artifactId>
                <version>3.4.6</version>
            </dependency>
            
            <!-- Zookeeper 用于分布式服务管理 end -->
            <!-- Active MQ 开始 -->
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-all</artifactId>
                <version>5.8.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-pool</artifactId>
                <version>5.8.0</version>
            </dependency>
            <!-- Active MQ 结束 -->
            <!-- Tomcat7 servlet-api -->
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-jsp-api</artifactId>
                <version>7.0.47</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    

</project>

 

posted @ 2017-03-23 21:19  风止雨歇  阅读(447)  评论(0编辑  收藏  举报