Skip to content

Commit e9cb1b7

Browse files
committed
规范package,为发布到maven central repository做准备
1 parent fef9f82 commit e9cb1b7

94 files changed

Lines changed: 466 additions & 449 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ target
1818

1919
src/test/resources/test-config.xml
2020
sw-pom.xml
21+
*.iml

pom.xml

Lines changed: 121 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,128 @@
11
<?xml version="1.0"?>
22
<project
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4-
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5-
<modelVersion>4.0.0</modelVersion>
6-
<groupId>chanjarster.weixin</groupId>
7-
<artifactId>weixin-java-tools</artifactId>
8-
<version>1.0.0-SNAPSHOT</version>
9-
<name>WeiXin Java Toolset</name>
10-
<url>https://github.com/chanjarster/weixin-java</url>
11-
<properties>
12-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13-
<downloadJavadocs>true</downloadJavadocs>
14-
<downloadSources>true</downloadSources>
15-
<httpclient.version>4.3.5</httpclient.version>
16-
</properties>
17-
<dependencies>
18-
<dependency>
19-
<groupId>junit</groupId>
20-
<artifactId>junit</artifactId>
21-
<version>4.11</version>
22-
<scope>test</scope>
23-
</dependency>
24-
<dependency>
25-
<groupId>org.apache.httpcomponents</groupId>
26-
<artifactId>fluent-hc</artifactId>
27-
<version>${httpclient.version}</version>
28-
</dependency>
29-
<dependency>
30-
<groupId>org.apache.httpcomponents</groupId>
31-
<artifactId>httpmime</artifactId>
32-
<version>${httpclient.version}</version>
33-
</dependency>
34-
<dependency>
35-
<groupId>javax.xml.bind</groupId>
36-
<artifactId>jaxb-api</artifactId>
37-
<version>2.2.7</version>
38-
</dependency>
39-
<dependency>
40-
<groupId>com.sun.xml.bind</groupId>
41-
<artifactId>jaxb-impl</artifactId>
42-
<version>2.2.7</version>
43-
</dependency>
44-
<dependency>
45-
<groupId>org.apache.oltu.oauth2</groupId>
46-
<artifactId>org.apache.oltu.oauth2.client</artifactId>
47-
<version>1.0.0</version>
48-
</dependency>
49-
<dependency>
50-
<groupId>com.google.code.gson</groupId>
51-
<artifactId>gson</artifactId>
52-
<version>2.2.2</version>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.testng</groupId>
56-
<artifactId>testng</artifactId>
57-
<version>6.8.7</version>
58-
<scope>test</scope>
59-
</dependency>
60-
<dependency>
61-
<groupId>org.mockito</groupId>
62-
<artifactId>mockito-all</artifactId>
63-
<version>1.9.5</version>
64-
<scope>test</scope>
65-
</dependency>
66-
<dependency>
67-
<groupId>com.google.inject</groupId>
68-
<artifactId>guice</artifactId>
69-
<version>3.0</version>
70-
<scope>test</scope>
71-
</dependency>
72-
<dependency>
73-
<groupId>org.apache.commons</groupId>
74-
<artifactId>commons-lang3</artifactId>
75-
<version>3.1</version>
76-
</dependency>
77-
</dependencies>
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4+
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>me.chanjar</groupId>
7+
<artifactId>weixin-java-tools</artifactId>
8+
<version>1.0.0</version>
9+
<name>WeiXin Java Tools</name>
10+
<url>https://github.com/chanjarster/weixin-java</url>
11+
<description>用于开发微信公众号的Java工具</description>
7812

79-
<build>
80-
<plugins>
81-
<plugin>
82-
<groupId>org.apache.maven.plugins</groupId>
83-
<artifactId>maven-surefire-plugin</artifactId>
84-
<version>2.17</version>
85-
<configuration>
86-
<suiteXmlFiles>
87-
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
88-
</suiteXmlFiles>
89-
</configuration>
90-
</plugin>
91-
<plugin>
92-
<groupId>org.apache.maven.plugins</groupId>
93-
<artifactId>maven-source-plugin</artifactId>
94-
<version>2.1.2</version>
95-
<executions>
96-
<execution>
97-
<id>attach-sources</id>
98-
<goals>
99-
<goal>jar</goal>
100-
</goals>
101-
</execution>
102-
</executions>
103-
</plugin>
104-
<plugin>
105-
<groupId>org.apache.maven.plugins</groupId>
106-
<artifactId>maven-javadoc-plugin</artifactId>
107-
<version>2.9.1</version>
108-
<executions>
109-
<execution>
110-
<id>attach-javadocs</id>
111-
<goals>
112-
<goal>jar</goal>
113-
</goals>
114-
</execution>
115-
</executions>
116-
<configuration>
117-
<charset>UTF-8</charset>
118-
<locale>zh_CN</locale>
119-
</configuration>
120-
</plugin>
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<downloadJavadocs>true</downloadJavadocs>
16+
<downloadSources>true</downloadSources>
17+
<httpclient.version>4.3.5</httpclient.version>
18+
</properties>
19+
<dependencies>
20+
<dependency>
21+
<groupId>junit</groupId>
22+
<artifactId>junit</artifactId>
23+
<version>4.11</version>
24+
<scope>test</scope>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.apache.httpcomponents</groupId>
28+
<artifactId>fluent-hc</artifactId>
29+
<version>${httpclient.version}</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.apache.httpcomponents</groupId>
33+
<artifactId>httpmime</artifactId>
34+
<version>${httpclient.version}</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>javax.xml.bind</groupId>
38+
<artifactId>jaxb-api</artifactId>
39+
<version>2.2.7</version>
40+
</dependency>
41+
<dependency>
42+
<groupId>com.sun.xml.bind</groupId>
43+
<artifactId>jaxb-impl</artifactId>
44+
<version>2.2.7</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.apache.oltu.oauth2</groupId>
48+
<artifactId>org.apache.oltu.oauth2.client</artifactId>
49+
<version>1.0.0</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>com.google.code.gson</groupId>
53+
<artifactId>gson</artifactId>
54+
<version>2.2.2</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.testng</groupId>
58+
<artifactId>testng</artifactId>
59+
<version>6.8.7</version>
60+
<scope>test</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.mockito</groupId>
64+
<artifactId>mockito-all</artifactId>
65+
<version>1.9.5</version>
66+
<scope>test</scope>
67+
</dependency>
68+
<dependency>
69+
<groupId>com.google.inject</groupId>
70+
<artifactId>guice</artifactId>
71+
<version>3.0</version>
72+
<scope>test</scope>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.apache.commons</groupId>
76+
<artifactId>commons-lang3</artifactId>
77+
<version>3.1</version>
78+
</dependency>
79+
</dependencies>
12180

122-
</plugins>
123-
</build>
81+
<build>
82+
<plugins>
83+
<plugin>
84+
<groupId>org.apache.maven.plugins</groupId>
85+
<artifactId>maven-surefire-plugin</artifactId>
86+
<version>2.17</version>
87+
<configuration>
88+
<suiteXmlFiles>
89+
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
90+
</suiteXmlFiles>
91+
</configuration>
92+
</plugin>
93+
<plugin>
94+
<groupId>org.apache.maven.plugins</groupId>
95+
<artifactId>maven-source-plugin</artifactId>
96+
<version>2.1.2</version>
97+
<executions>
98+
<execution>
99+
<id>attach-sources</id>
100+
<goals>
101+
<goal>jar</goal>
102+
</goals>
103+
</execution>
104+
</executions>
105+
</plugin>
106+
<plugin>
107+
<groupId>org.apache.maven.plugins</groupId>
108+
<artifactId>maven-javadoc-plugin</artifactId>
109+
<version>2.9.1</version>
110+
<executions>
111+
<execution>
112+
<id>attach-javadocs</id>
113+
<goals>
114+
<goal>jar</goal>
115+
</goals>
116+
</execution>
117+
</executions>
118+
<configuration>
119+
<charset>UTF-8</charset>
120+
<locale>zh_CN</locale>
121+
</configuration>
122+
</plugin>
123+
124+
</plugins>
125+
</build>
124126

125127

126128
</project>

src/main/java/chanjarster/weixin/api/WxConfigStorage.java renamed to src/main/java/me/chanjar/weixin/api/WxConfigStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

3-
import chanjarster.weixin.bean.WxAccessToken;
3+
import me.chanjar.weixin.bean.WxAccessToken;
44

55
/**
66
* 微信客户端配置存储

src/main/java/chanjarster/weixin/api/WxConsts.java renamed to src/main/java/me/chanjar/weixin/api/WxConsts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

33
import java.util.HashMap;
44
import java.util.Map;

src/main/java/chanjarster/weixin/api/WxInMemoryConfigStorage.java renamed to src/main/java/me/chanjar/weixin/api/WxInMemoryConfigStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

3-
import chanjarster.weixin.bean.WxAccessToken;
3+
import me.chanjar.weixin.bean.WxAccessToken;
44

55
/**
66
* 基于内存的微信配置provider,在实际生产环境中应该将这些配置持久化

src/main/java/chanjarster/weixin/api/WxMessageHandler.java renamed to src/main/java/me/chanjar/weixin/api/WxMessageHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

33
import java.util.Map;
44

5-
import chanjarster.weixin.bean.WxXmlMessage;
6-
import chanjarster.weixin.bean.WxXmlOutMessage;
5+
import me.chanjar.weixin.bean.WxXmlMessage;
6+
import me.chanjar.weixin.bean.WxXmlOutMessage;
77

88
/**
99
* 处理微信推送消息的处理器接口

src/main/java/chanjarster/weixin/api/WxMessageInterceptor.java renamed to src/main/java/me/chanjar/weixin/api/WxMessageInterceptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

33
import java.util.Map;
44

5-
import chanjarster.weixin.bean.WxXmlMessage;
5+
import me.chanjar.weixin.bean.WxXmlMessage;
66

77

88
/**

src/main/java/chanjarster/weixin/api/WxMessageRouter.java renamed to src/main/java/me/chanjar/weixin/api/WxMessageRouter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

33
import java.util.ArrayList;
44
import java.util.HashMap;
@@ -8,8 +8,8 @@
88
import java.util.concurrent.Executors;
99
import java.util.regex.Pattern;
1010

11-
import chanjarster.weixin.bean.WxXmlMessage;
12-
import chanjarster.weixin.bean.WxXmlOutMessage;
11+
import me.chanjar.weixin.bean.WxXmlMessage;
12+
import me.chanjar.weixin.bean.WxXmlOutMessage;
1313

1414
/**
1515
* <pre>

src/main/java/chanjarster/weixin/api/WxService.java renamed to src/main/java/me/chanjar/weixin/api/WxService.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
package chanjarster.weixin.api;
1+
package me.chanjar.weixin.api;
22

33
import java.io.File;
44
import java.io.IOException;
55
import java.io.InputStream;
66
import java.util.List;
77

8-
import chanjarster.weixin.bean.WxCustomMessage;
9-
import chanjarster.weixin.bean.WxGroup;
10-
import chanjarster.weixin.bean.WxMassGroupMessage;
11-
import chanjarster.weixin.bean.WxMassNews;
12-
import chanjarster.weixin.bean.WxMassOpenIdsMessage;
13-
import chanjarster.weixin.bean.WxMassVideo;
14-
import chanjarster.weixin.bean.WxMenu;
15-
import chanjarster.weixin.bean.result.WxMassSendResult;
16-
import chanjarster.weixin.bean.result.WxMassUploadResult;
17-
import chanjarster.weixin.bean.result.WxMediaUploadResult;
18-
import chanjarster.weixin.bean.result.WxQrCodeTicket;
19-
import chanjarster.weixin.bean.result.WxUser;
20-
import chanjarster.weixin.bean.result.WxUserList;
21-
import chanjarster.weixin.exception.WxErrorException;
8+
import me.chanjar.weixin.bean.WxCustomMessage;
9+
import me.chanjar.weixin.bean.WxGroup;
10+
import me.chanjar.weixin.bean.WxMassGroupMessage;
11+
import me.chanjar.weixin.bean.WxMassNews;
12+
import me.chanjar.weixin.bean.WxMassOpenIdsMessage;
13+
import me.chanjar.weixin.bean.WxMassVideo;
14+
import me.chanjar.weixin.bean.WxMenu;
15+
import me.chanjar.weixin.bean.result.WxMassSendResult;
16+
import me.chanjar.weixin.bean.result.WxMassUploadResult;
17+
import me.chanjar.weixin.bean.result.WxMediaUploadResult;
18+
import me.chanjar.weixin.bean.result.WxQrCodeTicket;
19+
import me.chanjar.weixin.bean.result.WxUser;
20+
import me.chanjar.weixin.bean.result.WxUserList;
21+
import me.chanjar.weixin.exception.WxErrorException;
2222

2323
/**
2424
* 微信API的Service

0 commit comments

Comments
 (0)