pom.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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-job</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. <!-- xxl-job -->
  38. <dependency>
  39. <groupId>com.xuxueli</groupId>
  40. <artifactId>xxl-job-core</artifactId>
  41. <version>2.2.0</version>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.projectlombok</groupId>
  45. <artifactId>lombok</artifactId>
  46. <optional>true</optional>
  47. </dependency>
  48. <!-- AMQP-->
  49. <dependency>
  50. <groupId>org.springframework.boot</groupId>
  51. <artifactId>spring-boot-starter-amqp</artifactId>
  52. </dependency>
  53. <!--http client-->
  54. <dependency>
  55. <groupId>commons-httpclient</groupId>
  56. <artifactId>commons-httpclient</artifactId>
  57. <version>3.1</version>
  58. </dependency>
  59. <!-- Swagger -->
  60. <dependency>
  61. <groupId>io.springfox</groupId>
  62. <artifactId>springfox-swagger2</artifactId>
  63. <version>2.7.0</version>
  64. </dependency>
  65. <dependency>
  66. <groupId>io.springfox</groupId>
  67. <artifactId>springfox-swagger-ui</artifactId>
  68. <version>2.7.0</version>
  69. </dependency>
  70. </dependencies>
  71. <build>
  72. <finalName>
  73. ${project.artifactId}-${project.version}-${maven.build.timestamp}
  74. </finalName>
  75. <plugins>
  76. <plugin>
  77. <groupId>org.springframework.boot</groupId>
  78. <artifactId>spring-boot-maven-plugin</artifactId>
  79. </plugin>
  80. <!-- 1、设置jar的入口类 -->
  81. <plugin>
  82. <groupId>org.apache.maven.plugins</groupId>
  83. <artifactId>maven-jar-plugin</artifactId>
  84. <configuration>
  85. <archive>
  86. <manifest>
  87. <addClasspath>true</addClasspath>
  88. <classpathPrefix>lib/</classpathPrefix>
  89. <mainClass>com.huaxu.zoniot.MeterReadingJobApplication</mainClass>
  90. </manifest>
  91. </archive>
  92. </configuration>
  93. </plugin>
  94. <!--2、把附属的jar打到jar内部的lib目录中 -->
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-dependency-plugin</artifactId>
  98. <executions>
  99. <execution>
  100. <id>copy-dependencies</id>
  101. <phase>package</phase>
  102. <goals>
  103. <goal>copy-dependencies</goal>
  104. </goals>
  105. <configuration>
  106. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  107. </configuration>
  108. </execution>
  109. </executions>
  110. </plugin>
  111. <!-- 3、打包过程忽略Junit测试 -->
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-surefire-plugin</artifactId>
  115. <configuration>
  116. <skip>true</skip>
  117. </configuration>
  118. </plugin>
  119. </plugins>
  120. </build>
  121. </project>