pom.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.neo</groupId>
  6. <artifactId>dockercompose-springboot-mysql-nginx</artifactId>
  7. <version>1.0</version>
  8. <packaging>jar</packaging>
  9. <name>dockercompose-springboot-mysql-nginx</name>
  10. <description>Demo project for Spring Boot</description>
  11. <parent>
  12. <groupId>org.springframework.boot</groupId>
  13. <artifactId>spring-boot-starter-parent</artifactId>
  14. <version>2.1.7.RELEASE</version>
  15. </parent>
  16. <properties>
  17. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  18. <java.version>1.8</java.version>
  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-data-jpa</artifactId>-->
  28. <!--</dependency>-->
  29. <!--<dependency>-->
  30. <!--<groupId>org.springframework.boot</groupId>-->
  31. <!--<artifactId>spring-boot-starter-oauth2-client</artifactId>-->
  32. <!--</dependency>-->
  33. <!--<dependency>-->
  34. <!--<groupId>org.springframework.boot</groupId>-->
  35. <!--<artifactId>spring-boot-starter-security</artifactId>-->
  36. <!--</dependency>-->
  37. <!--<dependency>-->
  38. <!--<groupId>org.springframework.boot</groupId>-->
  39. <!--<artifactId>spring-boot-starter-thymeleaf</artifactId>-->
  40. <!--</dependency>-->
  41. <!--<dependency>-->
  42. <!--<groupId>org.springframework.session</groupId>-->
  43. <!--<artifactId>spring-session-core</artifactId>-->
  44. <!--</dependency>-->
  45. <!--<dependency>-->
  46. <!--<groupId>mysql</groupId>-->
  47. <!--<artifactId>mysql-connector-java</artifactId>-->
  48. <!--<scope>runtime</scope>-->
  49. <!--</dependency>-->
  50. <!--配置文件处理器-->
  51. <dependency>
  52. <groupId>org.springframework.boot</groupId>
  53. <artifactId>spring-boot-configuration-processor</artifactId>
  54. <optional>true</optional>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.springframework.boot</groupId>
  58. <artifactId>spring-boot-starter-data-jpa</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>mysql</groupId>
  62. <artifactId>mysql-connector-java</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.springframework.boot</groupId>
  66. <artifactId>spring-boot-starter-test</artifactId>
  67. <scope>test</scope>
  68. </dependency>
  69. </dependencies>
  70. <build>
  71. <defaultGoal>compile</defaultGoal>
  72. <plugins>
  73. <!-- springboot打包可执行的jar包 -->
  74. <plugin>
  75. <groupId>org.springframework.boot</groupId>
  76. <artifactId>spring-boot-maven-plugin</artifactId>
  77. </plugin>
  78. <!-- Docker maven plugin -->
  79. <plugin>
  80. <groupId>com.spotify</groupId>
  81. <artifactId>docker-maven-plugin</artifactId>
  82. <version>1.0.0</version>
  83. <configuration>
  84. <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
  85. <dockerDirectory>src/main/docker</dockerDirectory>
  86. <resources>
  87. <resource>
  88. <targetPath>/</targetPath>
  89. <directory>${project.build.directory}</directory>
  90. <include>${project.build.finalName}.jar</include>
  91. </resource>
  92. </resources>
  93. </configuration>
  94. </plugin>
  95. <!-- Docker maven plugin -->
  96. </plugins>
  97. </build>
  98. </project>