-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pom.xml
510 lines (467 loc) · 20.4 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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
<?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>exp.crawler</groupId>
<artifactId>qzone-crawler</artifactId>
<version>2.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>QQ空间爬虫</name>
<description>可爬取QQ相册和说说的图文数据并进行归整</description>
<url>https://github.com/lyy289065406/jzone-crawler</url>
<inceptionYear>2016-06-09</inceptionYear>
<!--项目的问题管理系统(可选)-->
<issueManagement>
<system>JIAR</system>
<url>http://null</url>
</issueManagement>
<!--项目的问题追踪系统(可选)-->
<ciManagement>
<system>jenkins</system>
<url>http://127.0.0.1:8080/jenkins/</url>
</ciManagement>
<!-- 软件配置管理 -->
<scm>
<!-- 项目SVN主干目录(需保证目录已存在) -->
<connection>scm:svn:https://github.com/lyy289065406/jzone-crawler/trunk</connection>
<developerConnection>scm:svn:https://github.com/lyy289065406/jzone-crawler/trunk</developerConnection>
<url>scm:svn:https://github.com/lyy289065406/jzone-crawler/trunk</url>
</scm>
<!-- 变量定义 -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<release.dir>${project.build.directory}/${project.artifactId}-${project.version}</release.dir>
<jdk.version>1.8</jdk.version>
<explibs.version>1.2-SNAPSHOT</explibs.version>
<mrp.plugin.version>1.1-SNAPSHOT</mrp.plugin.version>
</properties>
<!-- 项目依赖 -->
<dependencies>
<!-- 经验库 -->
<dependency>
<groupId>exp.libs</groupId>
<artifactId>exp-libs</artifactId>
<version>${explibs.version}</version>
<exclusions>
<exclusion>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
</exclusion>
<exclusion>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse</groupId>
<artifactId>draw2d</artifactId>
</exclusion>
<exclusion>
<groupId>org.jgraph</groupId>
<artifactId>jGraph</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</exclusion>
<exclusion>
<groupId>com.realpersist</groupId>
<artifactId>schemaeditor</artifactId>
</exclusion>
<exclusion>
<groupId>exp.libs</groupId>
<artifactId>jvm-agent</artifactId>
</exclusion>
<exclusion>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</exclusion>
<exclusion>
<groupId>exp.libs</groupId>
<artifactId>jep</artifactId>
</exclusion>
<exclusion>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</exclusion>
<exclusion>
<groupId>jsch</groupId>
<artifactId>jsch</artifactId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ws.xmlschema</groupId>
<artifactId>xmlschema-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
</exclusion>
<exclusion>
<groupId>net.webservices.client</groupId>
<artifactId>wsdl4j</artifactId>
</exclusion>
<exclusion>
<groupId>net.webservices.client</groupId>
<artifactId>jabref</artifactId>
</exclusion>
<exclusion>
<groupId>net.webservices.client</groupId>
<artifactId>soapui</artifactId>
</exclusion>
<exclusion>
<groupId>net.webservices.client</groupId>
<artifactId>soapui-xmlbeans</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-htmlunit-driver</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.media</groupId>
<artifactId>jai-imageio</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow</artifactId>
</exclusion>
<exclusion>
<groupId>org.tensorflow</groupId>
<artifactId>libtensorflow</artifactId>
</exclusion>
<exclusion>
<groupId>org.tensorflow</groupId>
<artifactId>libtensorflow_jni</artifactId>
</exclusion>
<exclusion>
<groupId>sun.misc</groupId>
<artifactId>base64</artifactId>
</exclusion>
<exclusion>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 软件授权校验 -->
<dependency>
<groupId>exp.certificate</groupId>
<artifactId>software-certificate</artifactId>
<version>1.0</version>
</dependency>
<!-- 软件自动升级 -->
<dependency>
<groupId>exp.au</groupId>
<artifactId>auto-upgrader</artifactId>
<version>1.0</version>
</dependency>
<!-- 单元测试 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- 项目构建 -->
<build>
<plugins>
<!-- 指定项目JDK版本 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<!-- 版本打包插件,在dos跳转到项目根目录,依次执行(需保证没有引用快照、本地与SVN服务器内容完全一致):
1 发布基线到svn: mvn release:prepare
2 发布引用到私服 : mvn release:perform -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<!-- 项目的SVN基线目录(需保证目录已存在) -->
<tagBase>https://github.com/lyy289065406/jzone-crawler/tags</tagBase>
</configuration>
</plugin>
<!-- 测试插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<!-- 解决控制台输出乱码问题 -->
<forkMode>once</forkMode>
<argLine>-Dfile.encoding=UTF-8</argLine>
<systemProperties>
<property>
<name>net.sourceforge.cobertura.datafile</name>
<value>target/cobertura/cobertura.ser</value>
</property>
</systemProperties>
<!-- 项目打包时是否跳过d单元测试 -->
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- 混淆打包插件 -->
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase> <!-- 触发混淆打包的maven周期 -->
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- attach 的作用是在 install/deploy 时, 将生成的 pg 文件也安装/部署 -->
<attach>false</attach>
<attachArtifactClassifier>pg</attachArtifactClassifier>
<!-- 指定混淆处理所需要的库文件 -->
<libs>
<lib>${java.home}/lib/rt.jar</lib> <!-- 运行时库rt是必须的 -->
</libs>
<!-- 指定要做混淆处理的 应用程序jar、war、ear,或目录 -->
<injar></injar>
<!-- 指定混淆处理完后要输出的jar、war、ear,及其目录名称 -->
<outjar>${project.build.finalName}-pg</outjar>
<!-- 混淆规则: 详细配置方式参考 ProGuard 官方文档 -->
<options>
<option>-ignorewarnings</option> <!-- 忽略混淆警告 -->
<!-- option>-dontobfuscate</option --> <!-- 不混淆输入的类文件 -->
<option>-dontshrink</option> <!-- 不压缩输入的类文件 -->
<option>-dontoptimize</option> <!-- 不做代码优化 -->
<option>-dontskipnonpubliclibraryclasses</option> <!-- 不跳过私有依赖的类库 -->
<option>-dontskipnonpubliclibraryclassmembers</option> <!-- 不跳过私有依赖的类库成员 -->
<!-- option>-overloadaggressively</option --> <!-- 混淆时应用侵入式重载 -->
<!-- option>-obfuscationdictionary {filename}</option --> <!-- 使用给定文件中的关键字作为要混淆方法的名称 -->
<!-- option>-applymapping {filename}</option --> <!-- 重用映射增加混淆 -->
<!-- option>-useuniqueclassmembernames</option --> <!-- 确定统一的混淆类的成员名称来增加混淆 -->
<!-- option>-dontusemixedcaseclassnames</option --> <!-- 混淆时不会产生形形色色的类名 -->
<!-- option>-renamesourcefileattribute {string}</option --> <!-- 设置源文件中给定的字符串常量 -->
<!-- option>-flattenpackagehierarchy {package_name}</option --> <!-- 重新包装所有重命名的包并放在给定的单一包中 -->
<!-- option>-repackageclass {package_name}</option --> <!-- 重新包装所有重命名的类文件中放在给定的单一包中 -->
<!--平行包结构(重构包层次),所有混淆的代码放在 pg 包下 -->
<!-- 最好不要随便放, 若有多个项目混淆,不同jar的混淆类可能重名 -->
<!-- 建议为{project.root.package}.pg (不存在此变量,此处仅为了说明) -->
<option>-repackageclasses exp.crawler.qq.pg</option>
<!-- 保留[源码] --><!-- 按实际项目切换 -->
<!-- option>-keepattributes SourceFile</option -->
<!-- 保留[行号] --><!-- 按实际项目切换 -->
<!-- option>-keepattributes LineNumberTable</option -->
<!-- 保留[注释] --><!-- 按实际项目切换 -->
<!-- option>-keepattributes *Annotation*</option -->
<!-- 保留[注解] --><!-- 按实际项目切换 -->
<!-- option>-keepattributes Signature</option -->
<!-- 保持[入口类]不变 -->
<!-- 按实际项目修正 -->
<option>-keep class
exp.crawler.qq.Version,
exp.crawler.qq.Main
</option>
<!-- 保持[Bean类]不变(若框架对 Bean中的内容做了反射处理,则必须保持不变) -->
<!-- 按实际项目修正 -->
<!-- option>-keep class exp.crawler.qq.bean.** { *;}</option -->
<!-- 保持[所有入口方法]不变 -->
<!-- 固定不变 -->
<option>-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
</option>
<!-- 保持[对外API的类名和方法名]不变 -->
<!-- 按实际项目修正 -->
<!-- >option>-keep class exp.crawler.qq.api.** { *;}</option -->
<!-- 保持[所有本地化方法]不变 -->
<!-- 固定不变 -->
<option>-keepclasseswithmembernames class * {
native <methods>;
}
</option>
<!-- 保持[所有类成员变量]不变 -->
<!-- 按实际项目修正 -->
<!-- option>-keepclassmembers class * {
<fields>;
}
</option -->
<!-- 保持[所有枚举类必须的方法]不变 -->
<!-- 固定不变 -->
<option>-keepclassmembers class * extends java.lang.Enum {
public static **[] values();
public static ** valueOf(java.lang.String);
}
</option>
<!-- 保持[所有序列化接口]不变(若项目中不使用序列化,也可注释) -->
<!-- 固定不变 -->
<option>-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
</option>
</options>
</configuration>
</plugin>
<!-- Ant插件:项目部署文件复制 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>ant-build</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>拷贝项目配置文件</echo>
<copy todir="${release.dir}/conf">
<fileset dir="conf">
<exclude name="driver/chrome-driver.exe" />
<exclude name="account.dat" />
<exclude name="vcode.jpg" />
</fileset>
</copy>
<echo>拷贝数据文件</echo>
<copy todir="${release.dir}/data">
<fileset dir="data">
<exclude name="*" />
</fileset>
</copy>
<echo>拷贝文档</echo>
<copy todir="${release.dir}">
<fileset dir="doc">
<include name="使用说明.txt" />
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- 项目发布插件(自动生成脚本) -->
<plugin>
<groupId>exp.libs</groupId>
<artifactId>mojo-release-plugin</artifactId>
<version>${mrp.plugin.version}</version>
<executions>
<execution>
<id>mrp</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
<configuration>
<mavenRepository>D:\mavenRepository</mavenRepository>
<verClass>exp.crawler.qq.Version</verClass>
<mainClass>exp.crawler.qq.Main</mainClass>
<mainArgs></mainArgs>
<charset>UTF-8</charset>
<jdkPath>java</jdkPath>
<xms>32m</xms>
<xmx>256m</xmx>
<jdkParams></jdkParams>
<noVerJarRegex>(exp|auto|software)-.*</noVerJarRegex> <!-- 不使用版本号的依赖构件(正则式) -->
<proguard>true</proguard> <!-- 是否使用混淆包(需配置混淆打包插件) -->
</configuration>
</execution>
</executions>
</plugin>
<!-- 打包javadoc: 项目发布基线版本时会自动打包javadoc,若报错不要启用此插件 -->
<!-- javadoc插件会强制使用GBK读取pom文件的内容, 若得到的html网页标题乱码, -->
<!-- 则需要通过Run Configurations -> 自定义Maven install命令 -> Common -> Encoding:GBK 确保不会乱码 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<aggregate>true</aggregate>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<!-- 从JDK8开始, Javadoc中添加了doclint, 目的是旨在获得符合W3C HTML 4.01标准规范的HTML文档 -->
<!-- 简而言之Javadoc不允许出现html相关的元素, 若旧注释含有这些元素又不想修改, 只能关闭doclint -->
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
</additionalOptions>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- 项目发布管理 -->
<distributionManagement>
<!-- 私服地址 ,基线仓库 -->
<repository>
<id>Releases</id>
<url>http://127.0.0.1:8081/nexus/content/repositories/releases</url>
</repository>
<!-- 私服地址 ,快照仓库 -->
<snapshotRepository>
<id>Snapshots</id>
<url>http://127.0.0.1:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>