pom.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?xml version="1.0" encoding="UTF-8"?>
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.1.1.RELEASE</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>mooctest.org.backend</groupId>
  12. <artifactId>mooctest-org-backend</artifactId>
  13. <version>1.0-SNAPSHOT</version>
  14. <name>site</name>
  15. <description>Demo project for Spring Boot</description>
  16. <properties>
  17. <java.version>1.8</java.version>
  18. <docker.image.prefix>guochaodocker</docker.image.prefix>
  19. </properties>
  20. <dependencies>
  21. <dependency>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter-web</artifactId>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.springframework.boot</groupId>
  27. <artifactId>spring-boot-starter-test</artifactId>
  28. <scope>test</scope>
  29. <exclusions>
  30. <exclusion>
  31. <groupId>org.junit.vintage</groupId>
  32. <artifactId>junit-vintage-engine</artifactId>
  33. </exclusion>
  34. </exclusions>
  35. </dependency>
  36. <dependency>
  37. <groupId>mysql</groupId>
  38. <artifactId>mysql-connector-java</artifactId>
  39. <scope>runtime</scope>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-starter-data-jpa</artifactId>
  44. </dependency>
  45. <dependency>
  46. <groupId>com.google.code.gson</groupId>
  47. <artifactId>gson</artifactId>
  48. </dependency>
  49. <dependency>
  50. <groupId>com.google.guava</groupId>
  51. <artifactId>guava</artifactId>
  52. <version>18.0</version>
  53. </dependency>
  54. <dependency>
  55. <groupId>com.aliyun.oss</groupId>
  56. <artifactId>aliyun-sdk-oss</artifactId>
  57. <version>3.5.0</version>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-tomcat</artifactId>
  62. </dependency>
  63. <!-- Nacos Client -->
  64. <!-- 允许服务注册到nacos中 -->
  65. <dependency>
  66. <groupId>org.springframework.cloud</groupId>
  67. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  68. <version>0.9.0.RELEASE</version>
  69. <exclusions>
  70. <exclusion>
  71. <artifactId>guava</artifactId>
  72. <groupId>com.google.guava</groupId>
  73. </exclusion>
  74. <exclusion>
  75. <artifactId>archaius-core</artifactId>
  76. <groupId>com.netflix.archaius</groupId>
  77. </exclusion>
  78. <exclusion>
  79. <artifactId>servo-core</artifactId>
  80. <groupId>com.netflix.servo</groupId>
  81. </exclusion>
  82. </exclusions>
  83. </dependency>
  84. <!-- 允许服务向nacos拉取配置-->
  85. <!-- <dependency>-->
  86. <!-- <groupId>org.springframework.cloud</groupId>-->
  87. <!-- <artifactId>spring-cloud-alibaba-nacos-config</artifactId>-->
  88. <!-- <version>0.9.0.RELEASE</version>-->
  89. <!-- <exclusions>-->
  90. <!-- <exclusion>-->
  91. <!-- <artifactId>guava</artifactId>-->
  92. <!-- <groupId>com.google.guava</groupId>-->
  93. <!-- </exclusion>-->
  94. <!-- </exclusions>-->
  95. <!-- </dependency>-->
  96. <!-- actuator -->
  97. <dependency>
  98. <groupId>org.springframework.boot</groupId>
  99. <artifactId>spring-boot-starter-actuator</artifactId>
  100. </dependency>
  101. <dependency>
  102. <groupId>org.projectlombok</groupId>
  103. <artifactId>lombok</artifactId>
  104. <version>1.16.6</version>
  105. </dependency>
  106. </dependencies>
  107. <dependencyManagement>
  108. <dependencies>
  109. <!--整合Spring Cloud Alibaba-->
  110. <dependency>
  111. <groupId>com.alibaba.cloud</groupId>
  112. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  113. <version>2.1.0.RELEASE</version>
  114. <type>pom</type>
  115. <scope>import</scope>
  116. </dependency>
  117. </dependencies>
  118. </dependencyManagement>
  119. <build>
  120. <plugins>
  121. <plugin>
  122. <groupId>org.springframework.boot</groupId>
  123. <artifactId>spring-boot-maven-plugin</artifactId>
  124. </plugin>
  125. <!-- Docker maven plugin -->
  126. <plugin>
  127. <groupId>com.spotify</groupId>
  128. <artifactId>docker-maven-plugin</artifactId>
  129. <version>1.0.0</version>
  130. <configuration>
  131. <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
  132. <dockerDirectory>src/main/docker</dockerDirectory>
  133. <resources>
  134. <resource>
  135. <targetPath>/</targetPath>
  136. <directory>${project.build.directory}</directory>
  137. <include>${project.build.finalName}.jar</include>
  138. </resource>
  139. </resources>
  140. </configuration>
  141. </plugin>
  142. </plugins>
  143. </build>
  144. </project>