maven-3.5.0 multi-project build (spring4mvc molecular project)

 

maven-3.5.0 multi-project build (spring4mvc molecular project)

  

 

Build multi-module project with maven. One way to use multiple modules in a project is to add the module as a dependency, normally we would add an external module as a dependency

The project is imported by the Eclipse environment, I use Eclipse4.7

Main project shushuang-project

Sub WEB project shuang-project-web

public works shuang-project-util

service layer

 

The main pom.xml is configured as follows:

 

<?xml version="1.0" encoding="UTF-8"?>
<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>com.mote</groupId>
    <artifactId>shushang</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <modules>
        <module>shuang-project-dao</module>
        <module>shuang-project-domain</module>
        <module>shuang-project-service</module>
        <module>shuang-project-util</module>
        <module>shuang-project-web</module>
    </modules>

    <dependencies>
        <!-- The jar package required by spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>
        <dependency>
             <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.26</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.8.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework/spring-context-support -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>


        <!-- mybatis core package-->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.3.0</version>
        </dependency>


        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>1.2.2</version>
        </dependency>


        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.20</version>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>3.1</version>
        </dependency>


        <!-- Log file management package -->
        <!-- log start -->
        <!--  <dependency>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
              <version>${log4j.version}</version>
          </dependency>-->


        <!-- Format the object for easy log output -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.1.41</version>
        </dependency>


        <!--  <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
              <version>${slf4j.version}</version>
          </dependency>

          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-log4j12</artifactId>
              <version>${slf4j.version}</version>
          </dependency>-->
        <!-- log end -->
        <!-- Alibaba connection pool -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.26</version>
        </dependency>
    </dependencies>



    <build>


        <!--  <finalName>shushang-project</finalName>-->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <source>1.8</source><!-- The development version used by the source code-->
                    <target>1.8</target><!-- The development version used by the source code-->
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
            </plugin>
        </plugins>
    </build>

</project>

 

 


 

maven-3.5.0 multi-project build (spring4mvc molecular project)

maven-3.5.0 multi-project build (spring4mvc molecular project) Use maven to build multi-module projects. One way to use multiple modules in a project is to add the module as a dependency. Normally, we will add an external module as a dependency project to be imported by the Eclipse environment. I use Eclipse4.7 main project shushuang-project sub-W

 

 
Build multi-module project with maven. One way to use multiple modules in a project is to add the module as a dependency, normally we would add an external module as a dependency
The project is imported by the Eclipse environment, I use Eclipse4.7
Main project shushuang-project
Sub WEB project shuang-project-web
public works shuang-project-util
service layer


Download address: http://download.csdn.net/download/atgoingguoat/9988160

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326456159&siteId=291194637