forked from mumuyinxin/martin-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
370 lines (354 loc) · 15.9 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.java2e</groupId>
<artifactId>martin</artifactId>
<version>1.0.8</version>
<packaging>pom</packaging>
<description>Martin微服务开发脚手架</description>
<url>https://martin.java2e.com</url>
<organization>
<name>martin of java2e</name>
<url>https://www.zerocode.net.cn</url>
</organization>
<licenses>
<license>
<name>GNU AFFERO GENERAL PUBLIC LICENSE Version 3</name>
<url>https://www.gnu.org/licenses</url>
</license>
</licenses>
<scm>
<tag>main</tag>
<connection>https://github.com/www-zerocode-net-cn/martin-framework.git</connection>
<developerConnection>https://github.com/www-zerocode-net-cn</developerConnection>
<url>https://github.com/www-zerocode-net-cn/martin-framework.git</url>
</scm>
<developers>
<developer>
<id>martin</id>
<name>martin</name>
<email>[email protected]</email>
<organization>martin of java2e</organization>
<organizationUrl>https://www.zerocode.net.cn</organizationUrl>
<roles>
<role>Project lead</role>
</roles>
</developer>
</developers>
<modules>
<module>martin-common</module>
<module>martin-cloud</module>
<module>martin-biz</module>
<module>martin-extension</module>
<module>martin-spring-boot-starter</module>
</modules>
<properties>
<spring-boot.version>2.3.2.RELEASE</spring-boot.version>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version>
<spring-platform.version>Cairo-SR7</spring-platform.version>
<spring-cloud-alibaba-dependencies>2.2.3.RELEASE</spring-cloud-alibaba-dependencies>
<java.version>1.8</java.version>
<resource.delimiter>@</resource.delimiter>
<maven.compiler.source>${java.version}</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.encoding>${project.build.sourceEncoding}</maven.compiler.encoding>
<file-extension>yml</file-extension>
<docker.url>http://192.168.227.133:2375</docker.url>
<docker.repostory>192.168.227.133</docker.repostory>
<docker.registry.name>martin</docker.registry.name>
<proguard.version>7.2.1</proguard.version>
<proguard-maven-plugin.version>2.5.3</proguard-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.java2e</groupId>
<artifactId>martin-common-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>${spring-platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba-dependencies}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- provider=true支持使用容器自己的lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.target}</source>
<target>${maven.compiler.source}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<!--proguard混淆插件-->
<!-- <plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<!– 打包的时候开始混淆–>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<injar>classes</injar>
<injarNotExistsSkip>true</injarNotExistsSkip>
<!–输出的jar–>
<outjar>${project.build.finalName}.jar</outjar>
<!– 是否混淆–>
<obfuscate>true</obfuscate>
<options>
<!–指定java版本号–>
<option>-target 1.8</option>
<!–默认开启,不做收缩(删除注释、未被引用代码)–>
<option>-dontshrink</option>
<!–默认是开启的,这里关闭字节码级别的优化–>
<option>-dontoptimize</option>
<!–混淆类名之后,对使用Class.forName('className')之类的地方进行相应替代–>
<option>-adaptclassstrings</option>
<!–忽略警告–>
<option>-ignorewarnings</option>
<option>-keep class org.apache.logging.log4j.util.* { *; }</option>
<option>-dontwarn org.apache.logging.log4j.util.**</option>
<!–对异常、注解信息在runtime予以保留,不然影响springboot启动–>
<option>-keepattributes
Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
</option>
<!–保留枚举成员及方法–>
<option>-keepclassmembers enum * { *; }</option>
<option>-keepparameternames</option>
<!–打包时候忽略note消息,如果提示那些有问题,那就加入以下note提示的那些类–>
<option>-dontnote org.apache.ibatis.**</option>
<option>-dontnote javax.annotation.**</option>
<option>-dontnote sun.applet.**</option>
<option>-dontnote sun.tools.jar.**</option>
<option>-dontnote org.apache.commons.logging.**</option>
<option>-dontnote javax.inject.**</option>
<option>-dontnote org.aopalliance.intercept.**</option>
<option>-dontnote org.aopalliance.aop.**</option>
<option>-dontnote org.apache.logging.log4j.**</option>
<!–对主函数不进行混淆处理(否则springboot启动会异常)–>
<option>-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);}
</option>
<!–入口程序类不能混淆,混淆会导致springboot启动不了–>
<option>-keep class **.*Application</option>
<option>-keepclassmembers public class *{void set*(***);*** get*();}</option>
<!–由于使用了mybaits-plus因此entity和mapper不能混淆 *只扫描一层包,**会扫描子级的包内容–>
<option>-keep class com.java2e.martin.common.security.util.** {*;}</option>
<option>-keep class com.java2e.martin.common.feign.** {*;}</option>
<option>-keep class com.java2e.martin.common.core.** {*;}</option>
<option>-keep class com.java2e.**.exception.** {*;}</option>
<option>-keep class com.java2e.**.api.** {*;}</option>
<option>-keep class com.java2e.**.bean.** {*;}</option>
<option>-keep class com.java2e.**.constant.** {*;}</option>
<option>-keep class com.java2e.**.entity.** {*;}</option>
<option>-keep class com.java2e.**.mapper.** {*;}</option>
<option>-keep class com.java2e.**.service.** {*;}</option>
<option>-keep class com.java2e.**.dao.* {*;}</option>
<option>-keep interface * extends * { *; }</option>
<!–不混淆所有类,保存原始定义的注释–>
<option>-keepclassmembers class * {
@org.springframework.beans.factory.annotation.Autowired *;
@org.springframework.beans.factory.annotation.Value *;
}
</option>
</options>
<libs>
<!– 添加依赖 java8–>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/jce.jar</lib>
</libs>
</configuration>
<dependencies>
<!– https://mvnrepository.com/artifact/net.sf.proguard/proguard-base –>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>6.1.1</version>
</dependency>
</dependencies>
</plugin>-->
<plugin>
<groupId>com.github.core-lib</groupId>
<artifactId>xjar-maven-plugin</artifactId>
<version>4.0.1</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
<phase>install</phase>
<configuration>
<password>ERDOnline.xJar</password>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- 本地开发环境 -->
<id>dev</id>
<properties>
<profiles.active>dev</profiles.active>
</properties>
<activation>
<!-- 设置默认激活这个配置 -->
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<!-- SIT环境 -->
<id>sit</id>
<properties>
<profiles.active>sit</profiles.active>
</properties>
</profile>
<profile>
<!-- UAT环境 -->
<id>uat</id>
<properties>
<profiles.active>uat</profiles.active>
</properties>
</profile>
<profile>
<!-- 生产环境 -->
<id>release</id>
<properties>
<profiles.active>release</profiles.active>
</properties>
</profile>
</profiles>
<!-- 指定阿里云仓库,加快下载速度 -->
<repositories>
<repository>
<id>aliyun</id>
<name>aliyun</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>maven</id>
<name>maven</name>
<url>http://repo1.maven.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<!-- <distributionManagement>-->
<!-- <snapshotRepository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>-->
<!-- </snapshotRepository>-->
<!-- <repository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>-->
<!-- </repository>-->
<!-- </distributionManagement>-->
<!-- omitted xml -->
<distributionManagement>
<repository>
<!--必须与 settings.xml 的 id 一致-->
<id>erdonline-erd-online-martin</id>
<name>martin</name>
<url>https://erdonline-maven.pkg.coding.net/repository/erd-online/martin/</url>
</repository>
</distributionManagement>
</project>