zhangxu
2022-07-20 6d74163dc2d9675d0af367c86a0c9c70cbd18cd3
提交 | 用户 | age
707c81 1 <?xml version="1.0" encoding="UTF-8"?>
C 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
6     <properties>
7         <dist>target/build</dist>
8         <res>target/build/resources</res>
9         <dist-tmp>target/build/tmp</dist-tmp>
10         <app-name>${project.artifactId}-${project.version}</app-name>
11         <real-app-name>${project.artifactId}</real-app-name>
12     </properties>
13
14     <parent>
15         <groupId>com.hx</groupId>
16         <artifactId>phi_platform</artifactId>
17         <version>1.0-SNAPSHOT</version>
18     </parent>
19
b9da97 20     <artifactId>phi_platform_user</artifactId>
707c81 21     <version>0.0.1-SNAPSHOT</version>
C 22
23     <dependencies>
6d7416 24         <!--springCloud-nacos-->
Z 25         <dependency>
26             <groupId>com.alibaba.cloud</groupId>
27             <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
28             <exclusions>
29                 <exclusion>
30                     <groupId>org.springframework.cloud</groupId>
31                     <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
32                 </exclusion>
33             </exclusions>
34         </dependency>
35         <dependency>
36             <groupId>com.alibaba.cloud</groupId>
37             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
38         </dependency>
39
40         <dependency>
41             <groupId>com.alibaba.cloud</groupId>
42             <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
43             <exclusions>
44                 <exclusion>
45                     <groupId>org.springframework.cloud</groupId>
46                     <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
47                 </exclusion>
48             </exclusions>
49         </dependency>
50         <dependency>
51             <groupId>com.alibaba.cloud</groupId>
52             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
53         </dependency>
54
55         <!--spring cloud的支持-->
56         <dependency>
57             <groupId>org.springframework.cloud</groupId>
58             <artifactId>spring-cloud-starter-bootstrap</artifactId>
59         </dependency>
60         <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-context -->
61         <dependency>
62             <groupId>org.springframework.cloud</groupId>
63             <artifactId>spring-cloud-context</artifactId>
64         </dependency>
65         <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-commons -->
66         <dependency>
67             <groupId>org.springframework.cloud</groupId>
68             <artifactId>spring-cloud-commons</artifactId>
69         </dependency>
70
71         <!--openfeign的支持-->
72         <dependency>
73             <groupId>org.springframework.cloud</groupId>
74             <artifactId>spring-cloud-starter-openfeign</artifactId>
75         </dependency>
76         <dependency>
77             <groupId>org.springframework.cloud</groupId>
78             <artifactId>spring-cloud-starter-loadbalancer</artifactId>
79         </dependency>
80
707c81 81
C 82         <dependency>
83             <groupId>org.springframework.boot</groupId>
84             <artifactId>spring-boot-starter-log4j2</artifactId>
85         </dependency>
86
87         <dependency>
88             <groupId>com.hx.gitee</groupId>
89             <artifactId>hx-common</artifactId>
90             <version>1.0-SNAPSHOT</version>
91         </dependency>
92
93         <dependency>
94             <groupId>com.hx.gitee</groupId>
95             <artifactId>phi_platform_common</artifactId>
96             <version>1.0-SNAPSHOT</version>
97         </dependency>
98
99         <dependency>
38cba9 100             <groupId>com.hx.gitee</groupId>
c2090b 101             <artifactId>phi_platform_model</artifactId>
C 102             <version>1.0-SNAPSHOT</version>
103         </dependency>
104
105         <dependency>
106             <groupId>com.hx.gitee</groupId>
cf8e92 107             <artifactId>phi_platform_his</artifactId>
C 108             <version>1.0-SNAPSHOT</version>
109         </dependency>
110
111         <dependency>
112             <groupId>com.hx.gitee</groupId>
38cba9 113             <artifactId>phi_common</artifactId>
C 114             <version>0.0.1-SNAPSHOT</version>
115         </dependency>
14cede 116         <dependency>
Z 117             <groupId>com.hx.gitee</groupId>
118             <artifactId>phi_method_common</artifactId>
119             <version>0.0.1-SNAPSHOT</version>
120         </dependency>
38cba9 121
C 122         <dependency>
123             <groupId>com.hx.gitee</groupId>
124             <artifactId>platform-common</artifactId>
125             <version>1.0-SNAPSHOT</version>
126         </dependency>
127
128         <dependency>
707c81 129             <groupId>com.hx.gitee</groupId>
C 130             <artifactId>hx-auto</artifactId>
131             <version>2.0-SNAPSHOT</version>
132         </dependency>
133
134         <dependency>
135             <groupId>com.alibaba</groupId>
136             <artifactId>druid-spring-boot-starter</artifactId>
137             <version>1.1.23</version>
138         </dependency>
139
140         <dependency>
141             <groupId>org.springframework.boot</groupId>
142             <artifactId>spring-boot-starter-tomcat</artifactId>
143             <!--<scope>provided</scope>-->
144         </dependency>
145
146         <!--数据监控平台(sql)-->
147         <dependency>
148             <groupId>com.alibaba</groupId>
149             <artifactId>druid-spring-boot-starter</artifactId>
150         </dependency>
151
152         <!-- mybatis分页 -->
153         <dependency>
154             <groupId>com.github.pagehelper</groupId>
155             <artifactId>pagehelper-spring-boot-starter</artifactId>
156             <!--排除使用logback日志-->
157             <exclusions>
158                 <exclusion>
159                     <artifactId>logback-classic</artifactId>
160                     <groupId>ch.qos.logback</groupId>
161                 </exclusion>
162                 <exclusion>
163                     <groupId>org.springframework.boot</groupId>
164                     <artifactId>spring-boot-starter-logging</artifactId>
165                 </exclusion>
166             </exclusions>
167         </dependency>
168
169         <dependency>
170             <groupId>org.springframework.boot</groupId>
171             <artifactId>spring-boot-starter-aop</artifactId>
172             <exclusions>
173                 <exclusion>
174                     <groupId>org.springframework.boot</groupId>
175                     <artifactId>spring-boot-starter</artifactId>
176                 </exclusion>
177             </exclusions>
178         </dependency>
179
180         <dependency>
181             <groupId>com.aliyun.oss</groupId>
182             <artifactId>aliyun-sdk-oss</artifactId>
183         </dependency>
184
185         <dependency>
186             <groupId>org.apache.tomcat.embed</groupId>
187             <artifactId>tomcat-embed-jasper</artifactId>
188             <scope>provided</scope>
189         </dependency>
190
191         <dependency>
192             <groupId>javax.servlet.jsp.jstl</groupId>
193             <artifactId>jstl-api</artifactId>
194             <exclusions>
195                 <exclusion>
196                     <groupId>javax.servlet</groupId>
197                     <artifactId>servlet-api</artifactId>
198                 </exclusion>
199             </exclusions>
200         </dependency>
201
202         <dependency>
203             <groupId>javax.servlet</groupId>
204             <artifactId>jstl</artifactId>
205         </dependency>
206
207         <dependency>
208             <groupId>org.junit.jupiter</groupId>
209             <artifactId>junit-jupiter-api</artifactId>
210             <version>RELEASE</version>
211         </dependency>
212         <dependency>
213             <groupId>org.springframework.boot</groupId>
214             <artifactId>spring-boot-starter-web</artifactId>
215         </dependency>
216         <!--<dependency>
217             <groupId>net.sf.json-lib</groupId>
218             <artifactId>json-lib</artifactId>
219         </dependency>-->
220
221     </dependencies>
222
223     <profiles>
224         <profile>
225             <id>local</id>
226             <properties>
227                 <!--使用${environment}获取值-->
228                 <environment>local</environment>
c06ba7 229                 <logXml>local</logXml>
707c81 230             </properties>
C 231         </profile>
232         <profile>
233             <id>prod</id>
234             <properties>
235                 <environment>prod</environment>
c06ba7 236                 <logXml>prod</logXml>
C 237             </properties>
238         </profile>
239         <profile>
240             <id>heTest</id>
241             <properties>
242                 <environment>heTest</environment>
243                 <logXml>local</logXml>
707c81 244             </properties>
C 245         </profile>
246     </profiles>
247
248     <build>
249         <resources>
250             <resource>
251                 <directory>src/main/java</directory>
252                 <includes>
253                     <include>**/*.xml</include>
254                 </includes>
255             </resource>
256             <resource>
257                 <directory>src/main/resources</directory>
258                 <excludes>
259                     <exclude>application-*.properties</exclude>
260                     <exclude>log4j2-*.xml</exclude>
261                 </excludes>
262             </resource>
263             <resource>
264                 <directory>src/main/resources</directory>
265                 <includes>
266                     <include>application-${environment}.properties</include>
c06ba7 267                     <include>log4j2-${logXml}.xml</include>
707c81 268                 </includes>
C 269             </resource>
270         </resources>
271
272         <plugins>
273             <!--**********分离资源文件及依赖包打包配置*************-->
274             <plugin>
275                 <groupId>org.apache.maven.plugins</groupId>
276                 <artifactId>maven-dependency-plugin</artifactId>
277                 <executions>
278                     <execution>
279                         <id>copy-dependencies</id>
280                         <phase>package</phase>
281                         <goals>
282                             <goal>copy-dependencies</goal>
283                         </goals>
284                         <configuration>
285                             <outputDirectory>target/lib</outputDirectory>
286                             <excludeTransitive>false</excludeTransitive>
287                             <stripVersion>false</stripVersion>
288                             <includeScope>runtime</includeScope>
289                         </configuration>
290                     </execution>
291                 </executions>
292             </plugin>
293
294             <plugin>
295                 <groupId>org.apache.maven.plugins</groupId>
296                 <artifactId>maven-jar-plugin</artifactId>
297                 <configuration>
298                     <excludes>
299                         <exclude>**/*.properties</exclude>
300                         <exclude>**/log4j*.xml</exclude>
301                         <exclude>static/**</exclude>
302                         <exclude>templates/**</exclude>
303                     </excludes>
304                 </configuration>
305             </plugin>
306
307             <plugin>
308                 <groupId>org.springframework.boot</groupId>
309                 <artifactId>spring-boot-maven-plugin</artifactId>
310                 <configuration>
c2710a 311                     <mainClass>com.hx.phip.PhiPlatformUserApplication</mainClass>
707c81 312                     <layout>ZIP</layout>
C 313                     <includes>
314                         <include>
315                             <groupId>non-exists</groupId>
316                             <artifactId>non-exists</artifactId>
317                         </include>
318                     </includes>
319                 </configuration>
320                 <executions>
321                     <execution>
322                         <goals>
323                             <goal>repackage</goal>
324                         </goals>
325                         <configuration>
326                             <classifier>classes</classifier>
327                             <attach>false</attach>
328                         </configuration>
329                     </execution>
330                 </executions>
331             </plugin>
332             <plugin>
333                 <groupId>org.apache.maven.plugins</groupId>
334                 <artifactId>maven-antrun-plugin</artifactId>
335                 <executions>
336                     <execution>
337                         <phase>package</phase>
338                         <goals>
339                             <goal>run</goal>
340                         </goals>
341                         <configuration>
342                             <target>
343                                 <delete dir="${dist}" />
344                                 <mkdir dir="${dist}" />
345                                 <mkdir dir="${dist-tmp}" />
346                                 <mkdir dir="${res}" />
347                                 <copy file="target/${app-name}.jar" tofile="${dist-tmp}/${app-name}.jar" />
348                                 <unzip src="${dist-tmp}/${app-name}.jar" dest="${dist-tmp}" />
349                                 <delete file="${dist-tmp}/${app-name}.jar" />
350                                 <move file="target/${app-name}-classes.jar" tofile="${dist}/${real-app-name}.jar"/>
351                                 <move todir="${dist}/lib">
352                                     <fileset dir="target/lib" />
353                                 </move>
354
355                                 <delete dir="${dist-tmp}" />
356
357                                 <copy todir="${res}">
358                                     <fileset dir="target/classes">
359                                         <include name="**/static/**" />
360                                         <include name="**/templates/**" />
361                                     </fileset>
362                                 </copy>
363                                 <copy todir="${res}">
364                                     <fileset dir="target/classes">
365                                         <include name="**/*.properties" />
366                                         <include name="**/*.xml" />
367                                         <include name="**/*.yml" />
368                                         <exclude name="**/*Mapper.xml"/>
369                                     </fileset>
370                                 </copy>
371                             </target>
372                         </configuration>
373                     </execution>
374                 </executions>
375             </plugin>
376         </plugins>
377     </build>
378
379 </project>