pom.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <artifactId>nb-root</artifactId>
  7. <groupId>com.tuoren</groupId>
  8. <version>1.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <packaging>jar</packaging>
  12. <artifactId>nb-admin</artifactId>
  13. <dependencies>
  14. <dependency>
  15. <groupId>com.tuoren</groupId>
  16. <artifactId>config-common</artifactId>
  17. </dependency>
  18. <dependency>
  19. <groupId>com.tuoren</groupId>
  20. <artifactId>web-service</artifactId>
  21. </dependency>
  22. <!-- OSS文件存储模块 -->
  23. <dependency>
  24. <groupId>com.tuoren</groupId>
  25. <artifactId>nb-oss</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>org.springframework.boot</groupId>
  29. <artifactId>spring-boot-starter-test</artifactId>
  30. </dependency>
  31. <dependency>
  32. <groupId>mysql</groupId>
  33. <artifactId>mysql-connector-java</artifactId>
  34. </dependency>
  35. <dependency>
  36. <groupId>junit</groupId>
  37. <artifactId>junit</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>com.tuoren</groupId>
  41. <artifactId>iot-service</artifactId>
  42. <scope>test</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.springframework.boot</groupId>
  46. <artifactId>spring-boot-starter-undertow</artifactId>
  47. </dependency>
  48. </dependencies>
  49. <build>
  50. <resources>
  51. <resource>
  52. <directory>src/main/resources</directory>
  53. <!--开启过滤,用指定的参数替换directory下的文件中的参数-->
  54. <filtering>true</filtering>
  55. </resource>
  56. </resources>
  57. <plugins>
  58. <plugin>
  59. <groupId>org.apache.maven.plugins</groupId>
  60. <artifactId>maven-compiler-plugin</artifactId>
  61. <configuration>
  62. <source>8</source>
  63. <target>8</target>
  64. </configuration>
  65. </plugin>
  66. <plugin>
  67. <groupId>org.apache.maven.plugins</groupId>
  68. <artifactId>maven-assembly-plugin</artifactId>
  69. <version>2.4.1</version>
  70. <configuration>
  71. <archive>
  72. <manifest>
  73. <mainClass>com.nb.AdminApplication</mainClass>
  74. </manifest>
  75. </archive>
  76. <!--打包时,包含所有依赖的jar包-->
  77. <descriptorRefs>
  78. <descriptorRef>jar-with-dependencies</descriptorRef>
  79. </descriptorRefs>
  80. </configuration>
  81. <executions>
  82. <execution>
  83. <id>make-assembly</id>
  84. <phase>package</phase>
  85. </execution>
  86. </executions>
  87. </plugin>
  88. <!--生成javadoc文件-->
  89. <plugin>
  90. <groupId>org.apache.maven.plugins</groupId>
  91. <artifactId>maven-javadoc-plugin</artifactId>
  92. <version>3.2.0</version>
  93. <configuration>
  94. <encoding>UTF-8</encoding>
  95. <charset>UTF-8</charset>
  96. <docencoding>UTF-8</docencoding>
  97. <doclint>none</doclint>
  98. </configuration>
  99. <executions>
  100. <execution>
  101. <id>attach-javadocs</id>
  102. <goals>
  103. <goal>jar</goal>
  104. </goals>
  105. </execution>
  106. </executions>
  107. </plugin>
  108. <!--生成source文件-->
  109. <plugin>
  110. <groupId>org.apache.maven.plugins</groupId>
  111. <artifactId>maven-source-plugin</artifactId>
  112. <version>2.4</version>
  113. <executions>
  114. <execution>
  115. <id>attach-sources</id>
  116. <goals>
  117. <goal>jar</goal>
  118. </goals>
  119. </execution>
  120. </executions>
  121. </plugin>
  122. </plugins>
  123. </build>
  124. <profiles>
  125. <profile>
  126. <id>dev</id>
  127. <properties>
  128. <!-- 环境标识,需要与配置文件的名称相对应 -->
  129. <profiles.active>dev</profiles.active>
  130. <logging.level>debug</logging.level>
  131. </properties>
  132. <activation>
  133. <!-- 默认环境 -->
  134. <activeByDefault>true</activeByDefault>
  135. </activation>
  136. </profile>
  137. <profile>
  138. <id>test</id>
  139. <properties>
  140. <profiles.active>test</profiles.active>
  141. <logging.level>warn</logging.level>
  142. </properties>
  143. </profile>
  144. <profile>
  145. <id>prod</id>
  146. <properties>
  147. <profiles.active>prod</profiles.active>
  148. <logging.level>warn</logging.level>
  149. </properties>
  150. </profile>
  151. </profiles>
  152. </project>