pom.xml 4.8 KB
Newer Older
武汉红喜's avatar
武汉红喜 已提交
1 2 3 4 5
<?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">

武汉红喜's avatar
武汉红喜 已提交
6
    <parent>
武汉红喜's avatar
武汉红喜 已提交
7
        <groupId>org.hongxi</groupId>
武汉红喜's avatar
武汉红喜 已提交
8 9
        <artifactId>whatsmars-parent</artifactId>
        <version>1.0-SNAPSHOT</version>
武汉红喜's avatar
武汉红喜 已提交
10 11
    </parent>

武汉红喜's avatar
武汉红喜 已提交
12 13 14 15 16 17 18
    <modelVersion>4.0.0</modelVersion>

    <artifactId>whatsmars-spring-boot</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <url>http://maven.apache.org</url>

S
shenhongxi 已提交
19 20
    <properties>
        <!-- The main class to start by executing java -jar -->
武汉红喜's avatar
武汉红喜 已提交
21
        <start-class>org.hongxi.whatsmars.spring.boot.App</start-class>
S
shenhongxi 已提交
22 23
    </properties>

武汉红喜's avatar
武汉红喜 已提交
24 25 26 27 28 29 30 31 32 33 34 35
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

武汉红喜's avatar
武汉红喜 已提交
36 37 38 39 40
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
S
pom  
shenhongxi 已提交
41 42 43 44
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
武汉红喜's avatar
pom  
武汉红喜 已提交
45

武汉红喜's avatar
武汉红喜 已提交
46
        <dependency>
S
shenhongxi 已提交
47 48 49
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
武汉红喜's avatar
pom  
武汉红喜 已提交
50

S
shenhongxi 已提交
51 52 53 54 55
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
武汉红喜's avatar
pom  
武汉红喜 已提交
56

S
shenhongxi 已提交
57 58 59
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
武汉红喜's avatar
武汉红喜 已提交
60
        </dependency>
武汉红喜's avatar
武汉红喜 已提交
61

武汉红喜's avatar
pom  
武汉红喜 已提交
62 63 64
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
武汉红喜's avatar
武汉红喜 已提交
65
            <version>1.3.1</version>
武汉红喜's avatar
武汉红喜 已提交
66
        </dependency>
S
shenhongxi 已提交
67 68 69 70 71 72 73 74
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
        </dependency>
S
shenhongxi 已提交
75

S
shenhongxi 已提交
76 77
        <dependency>
            <groupId>com.alibaba</groupId>
武汉红喜's avatar
pom  
武汉红喜 已提交
78
            <artifactId>fastjson</artifactId>
S
shenhongxi 已提交
79 80
        </dependency>

S
swagger  
shenhongxi 已提交
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
        <!-- Swagger-ui -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
        </dependency>

        <!-- google -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
武汉红喜's avatar
武汉红喜 已提交
96 97 98 99
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
S
shenhongxi 已提交
100 101 102
        <resources>
            <resource>
                <directory>src/main/resources</directory>
S
shenhongxi 已提交
103
                <!--<includes>
S
shenhongxi 已提交
104 105
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
S
shenhongxi 已提交
106 107
                    <include>**/*.html</include>
                </includes>-->
S
shenhongxi 已提交
108 109 110 111 112 113 114 115 116 117 118 119 120
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <!-- 该插件会使package打出一个可直接运行的jar包,即该jar包包含了依赖的所有jar包 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <dependencies>
                    <!-- 使用SpringLoaded热部署 -->
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>springloaded</artifactId>
121
                        <version>${springloaded.version}</version>
S
shenhongxi 已提交
122 123 124
                    </dependency>
                </dependencies>
                <!-- POM不是继承spring-boot-starter-parent的话,需要下面的指定 -->
武汉红喜's avatar
武汉红喜 已提交
125
                <configuration>
S
shenhongxi 已提交
126 127 128 129 130 131 132 133 134
                    <mainClass>${start-class}</mainClass>
                    <layout>ZIP</layout>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
武汉红喜's avatar
武汉红喜 已提交
135
                </executions>
S
shenhongxi 已提交
136 137
            </plugin>
        </plugins>
武汉红喜's avatar
武汉红喜 已提交
138 139 140 141
    </build>


</project>