[重要]更新pom的package问题
This commit is contained in:
parent
ff436b6f03
commit
ef39c25f66
25
pom.xml
25
pom.xml
@ -73,6 +73,31 @@
|
|||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-jar</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<classesDirectory>target/classes</classesDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>*.properties</exclude>
|
||||||
|
<exclude>*.xml</exclude>
|
||||||
|
<exclude>*.txt</exclude>
|
||||||
|
</excludes>
|
||||||
|
<archive>
|
||||||
|
<addMavenDescriptor>false</addMavenDescriptor>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -103,10 +103,5 @@
|
|||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
<version>${commons.codec.version}</version>
|
<version>${commons.codec.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jsoup</groupId>
|
|
||||||
<artifactId>jsoup</artifactId>
|
|
||||||
<version>${jsoup.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@ -33,8 +33,6 @@ import org.apache.http.impl.conn.PoolingClientConnectionManager;
|
|||||||
import org.apache.http.params.CoreConnectionPNames;
|
import org.apache.http.params.CoreConnectionPNames;
|
||||||
import org.apache.http.params.CoreProtocolPNames;
|
import org.apache.http.params.CoreProtocolPNames;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.jsoup.Jsoup;
|
|
||||||
import org.jsoup.nodes.Document;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONException;
|
import com.alibaba.fastjson.JSONException;
|
||||||
import com.foxinmy.weixin4j.exception.WeixinException;
|
import com.foxinmy.weixin4j.exception.WeixinException;
|
||||||
@ -198,8 +196,7 @@ public class HttpRequest {
|
|||||||
if (contentType.getValue().contains(
|
if (contentType.getValue().contains(
|
||||||
ContentType.TEXT_HTML.getMimeType())) {
|
ContentType.TEXT_HTML.getMimeType())) {
|
||||||
response.setText(new String(data, "gbk"));
|
response.setText(new String(data, "gbk"));
|
||||||
Document doc = Jsoup.parse(response.getAsString());
|
throw new WeixinException(response.getAsString());
|
||||||
throw new WeixinException(doc.body().text());
|
|
||||||
} else if (contentType.getValue().contains(
|
} else if (contentType.getValue().contains(
|
||||||
ContentType.APPLICATION_JSON.getMimeType())) {
|
ContentType.APPLICATION_JSON.getMimeType())) {
|
||||||
checkJson(response);
|
checkJson(response);
|
||||||
|
|||||||
@ -19,6 +19,29 @@
|
|||||||
</modules>
|
</modules>
|
||||||
<build>
|
<build>
|
||||||
<finalName>weixin4j-mp</finalName>
|
<finalName>weixin4j-mp</finalName>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.5.1</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -39,7 +39,7 @@ weixin.properties说明
|
|||||||
| token_path | 使用FileTokenHolder时token保存的物理路径 |
|
| token_path | 使用FileTokenHolder时token保存的物理路径 |
|
||||||
| qr_path | 调用二维码接口时保存二维码图片的物理路径 |
|
| qr_path | 调用二维码接口时保存二维码图片的物理路径 |
|
||||||
| media_path | 调用媒体接口时保存媒体文件的物理路径 |
|
| media_path | 调用媒体接口时保存媒体文件的物理路径 |
|
||||||
| bill_path | 调用支付(`V3`)下载对账单接口保存excel文件的物理路径 |
|
| bill_path | 调用下载对账单接口保存excel文件的物理路径 |
|
||||||
| ca_file | 调用某些接口(支付相关)强制需要auth的ca授权文件 |
|
| ca_file | 调用某些接口(支付相关)强制需要auth的ca授权文件 |
|
||||||
|
|
||||||
示例(properties中换行用右斜杆\\)
|
示例(properties中换行用右斜杆\\)
|
||||||
@ -48,12 +48,13 @@ weixin.properties说明
|
|||||||
> "token":"开放者的token 非必须","openId":"公众号的openid 非必须",
|
> "token":"开放者的token 非必须","openId":"公众号的openid 非必须",
|
||||||
> "mchId":"V3.x版本下的微信商户号",
|
> "mchId":"V3.x版本下的微信商户号",
|
||||||
> "partnerId":"财付通的商户号","partnerKey":"财付通商户权限密钥Key",
|
> "partnerId":"财付通的商户号","partnerKey":"财付通商户权限密钥Key",
|
||||||
|
> "version":"针对微信支付的版本号(2,3),如果不填则按照mchId非空与否来判断",
|
||||||
> "paySignKey":"微信支付中调用API的密钥"} <br/>
|
> "paySignKey":"微信支付中调用API的密钥"} <br/>
|
||||||
> token_path=/tmp/weixin/token <br/>
|
> token_path=/tmp/weixin/token <br/>
|
||||||
> qr_path=/tmp/weixin/qr <br/>
|
> qr_path=/tmp/weixin/qr <br/>
|
||||||
> media_path=/tmp/weixin/media <br/>
|
> media_path=/tmp/weixin/media <br/>
|
||||||
> bill_path=/tmp/weixin/bill <br/>
|
> bill_path=/tmp/weixin/bill <br/>
|
||||||
> ca_file=/tmp/weixin/xxxxx.p12 <br/>
|
> ca_file=/tmp/weixin/xxxxx.p12|xxxx.pfx <br/>
|
||||||
|
|
||||||
2.实例化一个`WeixinProxy`对象,调用API,需要强调的是如果只传入appid,appsecret两个参数将无法调用支付相关接口
|
2.实例化一个`WeixinProxy`对象,调用API,需要强调的是如果只传入appid,appsecret两个参数将无法调用支付相关接口
|
||||||
|
|
||||||
|
|||||||
@ -42,5 +42,10 @@
|
|||||||
<artifactId>poi-ooxml-schemas</artifactId>
|
<artifactId>poi-ooxml-schemas</artifactId>
|
||||||
<version>${poi.version}</version>
|
<version>${poi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jsoup</groupId>
|
||||||
|
<artifactId>jsoup</artifactId>
|
||||||
|
<version>${jsoup.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@ -3,6 +3,7 @@
|
|||||||
account={"appId":"wx4ab8f8de58159a57","appSecret":"1d4eb0f4bf556aaed539f30ed05ca795",\
|
account={"appId":"wx4ab8f8de58159a57","appSecret":"1d4eb0f4bf556aaed539f30ed05ca795",\
|
||||||
"token":"\u5f00\u653e\u8005\u7684token \u975e\u5fc5\u987b","openId":"\u516c\u4f17\u53f7\u7684openid \u975e\u5fc5\u987b",\
|
"token":"\u5f00\u653e\u8005\u7684token \u975e\u5fc5\u987b","openId":"\u516c\u4f17\u53f7\u7684openid \u975e\u5fc5\u987b",\
|
||||||
"mchId":"V3.x\u7248\u672c\u4e0b\u7684\u5fae\u4fe1\u5546\u6237\u53f7",\
|
"mchId":"V3.x\u7248\u672c\u4e0b\u7684\u5fae\u4fe1\u5546\u6237\u53f7",\
|
||||||
|
"version":3,\
|
||||||
"partnerId":"\u8d22\u4ed8\u901a\u7684\u5546\u6237\u53f7","partnerKey":"\u8d22\u4ed8\u901a\u5546\u6237\u6743\u9650\u5bc6\u94a5Key",\
|
"partnerId":"\u8d22\u4ed8\u901a\u7684\u5546\u6237\u53f7","partnerKey":"\u8d22\u4ed8\u901a\u5546\u6237\u6743\u9650\u5bc6\u94a5Key",\
|
||||||
"paySignKey":"\u5fae\u4fe1\u652f\u4ed8\u4e2d\u8c03\u7528API\u7684\u5bc6\u94a5"}
|
"paySignKey":"\u5fae\u4fe1\u652f\u4ed8\u4e2d\u8c03\u7528API\u7684\u5bc6\u94a5"}
|
||||||
|
|
||||||
@ -15,4 +16,4 @@ media_path=/tmp/weixin/media
|
|||||||
# \u5bf9\u8d26\u5355\u4fdd\u5b58\u8def\u5f84
|
# \u5bf9\u8d26\u5355\u4fdd\u5b58\u8def\u5f84
|
||||||
bill_path=/tmp/weixin/bill
|
bill_path=/tmp/weixin/bill
|
||||||
# ca\u8bc1\u4e66\u5b58\u653e\u7684\u5b8c\u6574\u8def\u5f84
|
# ca\u8bc1\u4e66\u5b58\u653e\u7684\u5b8c\u6574\u8def\u5f84
|
||||||
ca_file=/Users/jy/Downloads/1221928801.pfx
|
ca_file=/tmp/weixin/xxxxxx.p12
|
||||||
@ -21,7 +21,7 @@ weixin4j-mp-server
|
|||||||
| token_path | 使用FileTokenHolder时token保存的物理路径 |
|
| token_path | 使用FileTokenHolder时token保存的物理路径 |
|
||||||
| qr_path | 调用二维码接口时保存二维码图片的物理路径 |
|
| qr_path | 调用二维码接口时保存二维码图片的物理路径 |
|
||||||
| media_path | 调用媒体接口时保存媒体文件的物理路径 |
|
| media_path | 调用媒体接口时保存媒体文件的物理路径 |
|
||||||
| bill_path | 调用支付(`V3`)下载对账单接口保存excel文件的物理路径 |
|
| bill_path | 调用下载对账单接口保存excel文件的物理路径 |
|
||||||
| ca_file | 调用某些接口(支付相关)强制需要auth的ca授权文件 |
|
| ca_file | 调用某些接口(支付相关)强制需要auth的ca授权文件 |
|
||||||
|
|
||||||
示例(properties中换行用右斜杆\\)
|
示例(properties中换行用右斜杆\\)
|
||||||
@ -30,12 +30,13 @@ weixin4j-mp-server
|
|||||||
> "token":"开放者的token 非必须","openId":"公众号的openid 非必须",
|
> "token":"开放者的token 非必须","openId":"公众号的openid 非必须",
|
||||||
> "mchId":"V3.x版本下的微信商户号",
|
> "mchId":"V3.x版本下的微信商户号",
|
||||||
> "partnerId":"财付通的商户号","partnerKey":"财付通商户权限密钥Key",
|
> "partnerId":"财付通的商户号","partnerKey":"财付通商户权限密钥Key",
|
||||||
|
> "version":"针对微信支付的版本号(目前可能为2,3),如果不填则按照mchId非空与否来做判断",
|
||||||
> "paySignKey":"微信支付中调用API的密钥"} <br/>
|
> "paySignKey":"微信支付中调用API的密钥"} <br/>
|
||||||
> token_path=/tmp/weixin/token <br/>
|
> token_path=/tmp/weixin/token <br/>
|
||||||
> qr_path=/tmp/weixin/qr <br/>
|
> qr_path=/tmp/weixin/qr <br/>
|
||||||
> media_path=/tmp/weixin/media <br/>
|
> media_path=/tmp/weixin/media <br/>
|
||||||
> bill_path=/tmp/weixin/bill <br/>
|
> bill_path=/tmp/weixin/bill <br/>
|
||||||
> ca_file=/tmp/weixin/xxxxx.p12 <br/>
|
> ca_file=/tmp/weixin/xxxxx.p12|xxxxx.pfx <br/>
|
||||||
|
|
||||||
2.mvn package,得到一个zip的压缩包,解压到启动目录(见`src/main/startup.sh/APP_HOME`)
|
2.mvn package,得到一个zip的压缩包,解压到启动目录(见`src/main/startup.sh/APP_HOME`)
|
||||||
|
|
||||||
|
|||||||
@ -13,28 +13,13 @@
|
|||||||
<url>https://github.com/foxinmy/weixin4j/tree/master/weixin4j-mp/weixin4j-server</url>
|
<url>https://github.com/foxinmy/weixin4j/tree/master/weixin4j-mp/weixin4j-server</url>
|
||||||
<description>微信公众号服务</description>
|
<description>微信公众号服务</description>
|
||||||
<build>
|
<build>
|
||||||
|
<finalName>weixin4j-mp-server</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.2.1</version>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>src/main/assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>make-assembly</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>weixin4j-mp-server</finalName>
|
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
<assembly>
|
<assembly
|
||||||
|
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
<id>bin</id>
|
<id>bin</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
@ -10,6 +13,12 @@
|
|||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>com.foxinmy.weixin4j.mp</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.md</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>src/main</directory>
|
<directory>src/main</directory>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
@ -19,12 +28,8 @@
|
|||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>target/classes</directory>
|
<directory>src/main/resources</directory>
|
||||||
<outputDirectory>/conf</outputDirectory>
|
<outputDirectory>/conf</outputDirectory>
|
||||||
<includes>
|
|
||||||
<include>*.properties</include>
|
|
||||||
<include>*.xml</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
@ -2,6 +2,7 @@
|
|||||||
account={"appId":"wx4ab8f8de58159a57","appSecret":"1d4eb0f4bf556aaed539f30ed05ca795",\
|
account={"appId":"wx4ab8f8de58159a57","appSecret":"1d4eb0f4bf556aaed539f30ed05ca795",\
|
||||||
"token":"\u5f00\u653e\u8005\u7684token \u975e\u5fc5\u987b","openId":"\u516c\u4f17\u53f7\u7684openid \u975e\u5fc5\u987b",\
|
"token":"\u5f00\u653e\u8005\u7684token \u975e\u5fc5\u987b","openId":"\u516c\u4f17\u53f7\u7684openid \u975e\u5fc5\u987b",\
|
||||||
"mchId":"V3.x\u7248\u672c\u4e0b\u7684\u5fae\u4fe1\u5546\u6237\u53f7",\
|
"mchId":"V3.x\u7248\u672c\u4e0b\u7684\u5fae\u4fe1\u5546\u6237\u53f7",\
|
||||||
|
"version":3,\
|
||||||
"partnerId":"\u8d22\u4ed8\u901a\u7684\u5546\u6237\u53f7","partnerKey":"\u8d22\u4ed8\u901a\u5546\u6237\u6743\u9650\u5bc6\u94a5Key",\
|
"partnerId":"\u8d22\u4ed8\u901a\u7684\u5546\u6237\u53f7","partnerKey":"\u8d22\u4ed8\u901a\u5546\u6237\u6743\u9650\u5bc6\u94a5Key",\
|
||||||
"paySignKey":"\u5fae\u4fe1\u652f\u4ed8\u4e2d\u8c03\u7528API\u7684\u5bc6\u94a5"}
|
"paySignKey":"\u5fae\u4fe1\u652f\u4ed8\u4e2d\u8c03\u7528API\u7684\u5bc6\u94a5"}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user