Skip to content

Commit 7f08a9e

Browse files
committed
优化pom,尽量减少不必要的依赖
1 parent c017278 commit 7f08a9e

File tree

5 files changed

+164
-86
lines changed

5 files changed

+164
-86
lines changed

pom.xml

Lines changed: 82 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -103,86 +103,90 @@
103103
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
104104
<downloadJavadocs>true</downloadJavadocs>
105105
<downloadSources>true</downloadSources>
106-
<httpclient.version>4.5</httpclient.version>
107-
<slf4j.version>1.7.10</slf4j.version>
108-
<logback.version>1.1.2</logback.version>
109-
<gson.version>2.7</gson.version>
110-
<guava.version>19.0</guava.version>
111-
<commons-lang3.version>3.5</commons-lang3.version>
112-
<commons-io.version>2.5</commons-io.version>
113-
<commons-codec.version>1.10</commons-codec.version>
106+
<httpclient.version>4.5.3</httpclient.version>
114107
<jetty.version>9.3.0.RC0</jetty.version>
115-
<jedis.version>2.9.0</jedis.version>
116-
<!-- 由于较新的3.8版本需要jdk8,故而此处采用较低版本 -->
117-
<jodd-http.version>3.7</jodd-http.version>
118108
</properties>
119109

120-
<dependencies>
121-
<dependency>
122-
<groupId>org.jodd</groupId>
123-
<artifactId>jodd-http</artifactId>
124-
<version>${jodd-http.version}</version>
125-
</dependency>
126-
<dependency>
127-
<groupId>com.squareup.okhttp3</groupId>
128-
<artifactId>okhttp</artifactId>
129-
<version>3.7.0</version>
130-
</dependency>
131-
<dependency>
132-
<groupId>org.slf4j</groupId>
133-
<artifactId>slf4j-api</artifactId>
134-
<version>${slf4j.version}</version>
135-
</dependency>
136-
<dependency>
137-
<groupId>com.thoughtworks.xstream</groupId>
138-
<artifactId>xstream</artifactId>
139-
<version>1.4.9</version>
140-
</dependency>
141-
<dependency>
142-
<groupId>ch.qos.logback</groupId>
143-
<artifactId>logback-classic</artifactId>
144-
<version>${logback.version}</version>
145-
<scope>test</scope>
146-
</dependency>
147-
<dependency>
148-
<groupId>org.apache.httpcomponents</groupId>
149-
<artifactId>httpclient</artifactId>
150-
<version>${httpclient.version}</version>
151-
</dependency>
152-
<dependency>
153-
<groupId>org.apache.httpcomponents</groupId>
154-
<artifactId>httpmime</artifactId>
155-
<version>${httpclient.version}</version>
156-
</dependency>
157-
<dependency>
158-
<groupId>com.google.code.gson</groupId>
159-
<artifactId>gson</artifactId>
160-
<version>${gson.version}</version>
161-
</dependency>
162-
<dependency>
163-
<groupId>commons-codec</groupId>
164-
<artifactId>commons-codec</artifactId>
165-
<version>${commons-codec.version}</version>
166-
</dependency>
167-
<dependency>
168-
<groupId>commons-io</groupId>
169-
<artifactId>commons-io</artifactId>
170-
<version>${commons-io.version}</version>
171-
</dependency>
172-
<dependency>
173-
<groupId>org.apache.commons</groupId>
174-
<artifactId>commons-lang3</artifactId>
175-
<version>${commons-lang3.version}</version>
176-
</dependency>
177-
<dependency>
178-
<groupId>com.google.guava</groupId>
179-
<artifactId>guava</artifactId>
180-
<version>${guava.version}</version>
181-
</dependency>
182-
</dependencies>
183-
184110
<dependencyManagement>
185111
<dependencies>
112+
<dependency>
113+
<groupId>com.github.binarywang</groupId>
114+
<artifactId>qrcode-utils</artifactId>
115+
<version>1.1</version>
116+
</dependency>
117+
<!-- 由于jodd-http较新的3.8版本需要jdk8,故而此处采用较低版本 -->
118+
<dependency>
119+
<groupId>org.jodd</groupId>
120+
<artifactId>jodd-http</artifactId>
121+
<version>3.7.1</version>
122+
<scope>provided</scope>
123+
</dependency>
124+
<dependency>
125+
<groupId>com.squareup.okhttp3</groupId>
126+
<artifactId>okhttp</artifactId>
127+
<version>3.7.0</version>
128+
<scope>provided</scope>
129+
</dependency>
130+
131+
<dependency>
132+
<groupId>org.apache.httpcomponents</groupId>
133+
<artifactId>httpclient</artifactId>
134+
<version>${httpclient.version}</version>
135+
</dependency>
136+
<dependency>
137+
<groupId>org.apache.httpcomponents</groupId>
138+
<artifactId>httpmime</artifactId>
139+
<version>${httpclient.version}</version>
140+
</dependency>
141+
<dependency>
142+
<groupId>commons-codec</groupId>
143+
<artifactId>commons-codec</artifactId>
144+
<version>1.10</version>
145+
</dependency>
146+
<dependency>
147+
<groupId>commons-io</groupId>
148+
<artifactId>commons-io</artifactId>
149+
<version>2.5</version>
150+
</dependency>
151+
<dependency>
152+
<groupId>org.apache.commons</groupId>
153+
<artifactId>commons-lang3</artifactId>
154+
<version>3.5</version>
155+
</dependency>
156+
<dependency>
157+
<groupId>org.slf4j</groupId>
158+
<artifactId>slf4j-api</artifactId>
159+
<version>1.7.24</version>
160+
</dependency>
161+
<dependency>
162+
<groupId>com.thoughtworks.xstream</groupId>
163+
<artifactId>xstream</artifactId>
164+
<version>1.4.9</version>
165+
</dependency>
166+
<dependency>
167+
<groupId>com.google.guava</groupId>
168+
<artifactId>guava</artifactId>
169+
<version>22.0</version>
170+
</dependency>
171+
<dependency>
172+
<groupId>com.google.code.gson</groupId>
173+
<artifactId>gson</artifactId>
174+
<version>2.8.0</version>
175+
</dependency>
176+
177+
<!-- 测试所用依赖 -->
178+
<dependency>
179+
<groupId>joda-time</groupId>
180+
<artifactId>joda-time</artifactId>
181+
<version>2.9.7</version>
182+
<scope>test</scope>
183+
</dependency>
184+
<dependency>
185+
<groupId>ch.qos.logback</groupId>
186+
<artifactId>logback-classic</artifactId>
187+
<version>1.1.11</version>
188+
<scope>test</scope>
189+
</dependency>
186190
<dependency>
187191
<groupId>com.google.inject</groupId>
188192
<artifactId>guice</artifactId>
@@ -192,7 +196,7 @@
192196
<dependency>
193197
<groupId>org.testng</groupId>
194198
<artifactId>testng</artifactId>
195-
<version>6.8.7</version>
199+
<version>6.10</version>
196200
<scope>test</scope>
197201
</dependency>
198202
<dependency>
@@ -216,7 +220,8 @@
216220
<dependency>
217221
<groupId>redis.clients</groupId>
218222
<artifactId>jedis</artifactId>
219-
<version>${jedis.version}</version>
223+
<version>3.0</version>
224+
<scope>provided</scope>
220225
</dependency>
221226
</dependencies>
222227
</dependencyManagement>

weixin-java-common/pom.xml

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
22
<project
33
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" 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+
xmlns="http://maven.apache.org/POM/4.0.0">
56
<modelVersion>4.0.0</modelVersion>
67
<parent>
78
<groupId>com.github.binarywang</groupId>
@@ -14,6 +15,59 @@
1415
<description>微信公众号、企业号Java SDK Common</description>
1516

1617
<dependencies>
18+
<dependency>
19+
<groupId>org.jodd</groupId>
20+
<artifactId>jodd-http</artifactId>
21+
<scope>provided</scope>
22+
</dependency>
23+
<dependency>
24+
<groupId>com.squareup.okhttp3</groupId>
25+
<artifactId>okhttp</artifactId>
26+
<scope>provided</scope>
27+
</dependency>
28+
29+
<dependency>
30+
<groupId>org.slf4j</groupId>
31+
<artifactId>slf4j-api</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>com.thoughtworks.xstream</groupId>
35+
<artifactId>xstream</artifactId>
36+
</dependency>
37+
<dependency>
38+
<groupId>org.apache.httpcomponents</groupId>
39+
<artifactId>httpclient</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.apache.httpcomponents</groupId>
43+
<artifactId>httpmime</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>com.google.code.gson</groupId>
47+
<artifactId>gson</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>commons-codec</groupId>
51+
<artifactId>commons-codec</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>commons-io</groupId>
55+
<artifactId>commons-io</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.apache.commons</groupId>
59+
<artifactId>commons-lang3</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.google.guava</groupId>
63+
<artifactId>guava</artifactId>
64+
</dependency>
65+
66+
<dependency>
67+
<groupId>ch.qos.logback</groupId>
68+
<artifactId>logback-classic</artifactId>
69+
<scope>test</scope>
70+
</dependency>
1771
<dependency>
1872
<groupId>org.testng</groupId>
1973
<artifactId>testng</artifactId>
@@ -39,11 +93,6 @@
3993
<artifactId>jetty-servlet</artifactId>
4094
<scope>test</scope>
4195
</dependency>
42-
<dependency>
43-
<groupId>org.jodd</groupId>
44-
<artifactId>jodd-http</artifactId>
45-
<version>3.7</version>
46-
</dependency>
4796
</dependencies>
4897

4998
<build>

weixin-java-cp/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@
2020
<artifactId>weixin-java-common</artifactId>
2121
<version>${project.version}</version>
2222
</dependency>
23+
<dependency>
24+
<groupId>org.jodd</groupId>
25+
<artifactId>jodd-http</artifactId>
26+
<scope>provided</scope>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.squareup.okhttp3</groupId>
30+
<artifactId>okhttp</artifactId>
31+
<scope>provided</scope>
32+
</dependency>
2333
<dependency>
2434
<groupId>redis.clients</groupId>
2535
<artifactId>jedis</artifactId>
2636
</dependency>
37+
2738
<dependency>
2839
<groupId>org.testng</groupId>
2940
<artifactId>testng</artifactId>

weixin-java-mp/pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
1919
<artifactId>weixin-java-common</artifactId>
2020
<version>${project.version}</version>
2121
</dependency>
22+
23+
<dependency>
24+
<groupId>org.jodd</groupId>
25+
<artifactId>jodd-http</artifactId>
26+
<scope>provided</scope>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.squareup.okhttp3</groupId>
30+
<artifactId>okhttp</artifactId>
31+
<scope>provided</scope>
32+
</dependency>
33+
2234
<dependency>
2335
<groupId>org.testng</groupId>
2436
<artifactId>testng</artifactId>
@@ -42,7 +54,6 @@
4254
<dependency>
4355
<groupId>joda-time</groupId>
4456
<artifactId>joda-time</artifactId>
45-
<version>2.9.4</version>
4657
<scope>test</scope>
4758
</dependency>
4859
<dependency>

weixin-java-pay/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
<dependency>
2323
<groupId>com.github.binarywang</groupId>
2424
<artifactId>qrcode-utils</artifactId>
25-
<version>1.1</version>
2625
</dependency>
27-
26+
<dependency>
27+
<groupId>org.jodd</groupId>
28+
<artifactId>jodd-http</artifactId>
29+
</dependency>
2830
<dependency>
2931
<groupId>org.testng</groupId>
3032
<artifactId>testng</artifactId>

0 commit comments

Comments
 (0)