pom.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-parent</artifactId>
  9. <version>2.2.6.RELEASE</version>
  10. <relativePath/> <!-- lookup parent from repository -->
  11. </parent>
  12. <groupId>com.huaxu.zoniot</groupId>
  13. <artifactId>meter-reading-data-migrate</artifactId>
  14. <version>1.0</version>
  15. <description>抄表数据迁移程序</description>
  16. <properties>
  17. <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
  18. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  19. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  20. <java.version>1.8</java.version>
  21. </properties>
  22. <dependencies>
  23. <dependency>
  24. <groupId>com.huaxu.zoniot</groupId>
  25. <artifactId>meter-reading-common</artifactId>
  26. <version>1.0</version>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.springframework.boot</groupId>
  30. <artifactId>spring-boot-starter-web</artifactId>
  31. </dependency>
  32. <dependency>
  33. <groupId>org.springframework.boot</groupId>
  34. <artifactId>spring-boot-starter-test</artifactId>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.projectlombok</groupId>
  39. <artifactId>lombok</artifactId>
  40. <optional>true</optional>
  41. </dependency>
  42. <!-- Swagger -->
  43. <dependency>
  44. <groupId>io.springfox</groupId>
  45. <artifactId>springfox-swagger2</artifactId>
  46. <version>2.7.0</version>
  47. </dependency>
  48. <dependency>
  49. <groupId>io.springfox</groupId>
  50. <artifactId>springfox-swagger-ui</artifactId>
  51. <version>2.7.0</version>
  52. </dependency>
  53. </dependencies>
  54. <build>
  55. <finalName>
  56. ${project.artifactId}-${project.version}-${maven.build.timestamp}
  57. </finalName>
  58. <plugins>
  59. <plugin>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-maven-plugin</artifactId>
  62. </plugin>
  63. <!-- 1、设置jar的入口类 -->
  64. <plugin>
  65. <groupId>org.apache.maven.plugins</groupId>
  66. <artifactId>maven-jar-plugin</artifactId>
  67. <configuration>
  68. <archive>
  69. <manifest>
  70. <addClasspath>true</addClasspath>
  71. <classpathPrefix>lib/</classpathPrefix>
  72. <mainClass>com.huaxu.zoniot.MeterReadingJobApplication</mainClass>
  73. </manifest>
  74. </archive>
  75. </configuration>
  76. </plugin>
  77. <!--2、把附属的jar打到jar内部的lib目录中 -->
  78. <plugin>
  79. <groupId>org.apache.maven.plugins</groupId>
  80. <artifactId>maven-dependency-plugin</artifactId>
  81. <executions>
  82. <execution>
  83. <id>copy-dependencies</id>
  84. <phase>package</phase>
  85. <goals>
  86. <goal>copy-dependencies</goal>
  87. </goals>
  88. <configuration>
  89. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  90. </configuration>
  91. </execution>
  92. </executions>
  93. </plugin>
  94. <!-- 3、打包过程忽略Junit测试 -->
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-surefire-plugin</artifactId>
  98. <configuration>
  99. <skip>true</skip>
  100. </configuration>
  101. </plugin>
  102. </plugins>
  103. </build>
  104. </project>