Skip to content

Commit f4aec41

Browse files
author
Javen
committed
apns_production params can only be set by jpush client instance.
1 parent 49e853f commit f4aec41

File tree

6 files changed

+48
-116
lines changed

6 files changed

+48
-116
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
## 概述
44
这是 JPush REST API 的 Java 版本封装开发包,是由极光推送官方提供的,一般支持最新的 API 功能。
5+
56
对应的 REST API 文档:<http://docs.jpush.cn/display/dev/REST+API>
67

78
## 安装
8-
### 直接使用 jar
9+
10+
### maven 方式
11+
将下边的依赖条件放到你项目的 maven pom.xml 文件里。
912

1013
```
1114
<dependency>
@@ -14,6 +17,9 @@
1417
<version>2.3.0</version>
1518
</dependency>
1619
```
20+
### jar 包方式
21+
22+
请到每个 Release 版本 dist/ 目录里下载相应版本的 jar 包。
1723

1824
### 依赖包
1925
* gson

pom.xml

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<licenses>
4+
5+
<groupId>cn.jpush.api</groupId>
6+
<artifactId>jpush-client</artifactId>
7+
<version>2.3.0</version>
8+
<packaging>jar</packaging>
9+
<url>https://github.com/jpush/jpush-api-java-client</url>
10+
<name>JPush API Java Client</name>
11+
<description>JPush's officially supported Java client library for accessing JPush APIs.</description>
12+
13+
<licenses>
514
<license>
615
<name>The Apache Software License, Version 2.0</name>
716
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
817
<distribution>repo</distribution>
918
</license>
1019
</licenses>
20+
21+
<properties>
22+
<github.global.server>github</github.global.server>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
</properties>
25+
1126
<parent>
1227
<groupId>org.sonatype.oss</groupId>
1328
<artifactId>oss-parent</artifactId>
1429
<version>7</version>
1530
</parent>
16-
<groupId>cn.jpush.api</groupId>
17-
<artifactId>jpush-client</artifactId>
18-
<version>2.3.0</version>
19-
<packaging>jar</packaging>
20-
<name>JPush API Java Client</name>
21-
<description>JPush's officially supported Java client library for accessing JPush APIs.</description>
22-
<url>https://github.com/jpush/jpush-api-java-client</url>
23-
<properties>
24-
<github.global.server>github</github.global.server>
25-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
26-
</properties>
2731

32+
<scm>
33+
<url>https://github.com/jpush/jpush-api-java-client</url>
34+
<connection>scm:git:git@github.com:jpush/jpush-api-java-client.git</connection>
35+
<developerConnection>scm:git:git@github.com:jpush/jpush-api-java-client.git</developerConnection>
36+
</scm>
37+
38+
<developers>
39+
<developer>
40+
<id>jpush</id>
41+
<name>JPush</name>
42+
<email>fajaven@gmail.com</email>
43+
<url>https://github.com/jpush</url>
44+
</developer>
45+
</developers>
2846

2947
<dependencies>
3048
<dependency>
@@ -50,6 +68,7 @@
5068
</dependency>
5169

5270
</dependencies>
71+
5372
<build>
5473
<sourceDirectory>src</sourceDirectory>
5574
<testSourceDirectory>test</testSourceDirectory>
@@ -65,7 +84,7 @@
6584
<plugin>
6685
<groupId>org.apache.maven.plugins</groupId>
6786
<artifactId>maven-release-plugin</artifactId>
68-
<version>2.2.2</version>
87+
<version>2.4.2</version>
6988
<dependencies>
7089
<dependency>
7190
<groupId>org.apache.maven.plugins</groupId>
@@ -99,6 +118,7 @@
99118
</plugin>
100119
</plugins>
101120
</build>
121+
102122
<reporting>
103123
<plugins>
104124
<plugin>
@@ -122,18 +142,5 @@
122142
</plugin>
123143
</plugins>
124144
</reporting>
125-
<scm>
126-
<url>https://github.com/jpush/jpush-api-java-client</url>
127-
<connection>scm:git:git@github.com:jpush/jpush-api-java-client.git</connection>
128-
<developerConnection>scm:git:git@github.com:jpush/jpush-api-java-client.git</developerConnection>
129-
</scm>
130-
<developers>
131-
<developer>
132-
<id>jpush</id>
133-
<name>JPush</name>
134-
<email>fajaven@gmail.com</email>
135-
<url>https://github.com/jpush</url>
136-
</developer>
137-
</developers>
138-
145+
139146
</project>

pom.xml.releaseBackup

Lines changed: 0 additions & 81 deletions
This file was deleted.

release.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
project.scm.cn.jpush.api\:jpush-client.connection=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git
44
project.scm.cn.jpush.api\:jpush-client.developerConnection=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git
55
scm.tagNameFormat=@{project.artifactId}-@{project.version}
6-
scm.tag=jpush-client-2.1
7-
project.dev.cn.jpush.api\:jpush-client=2.2-SNAPSHOT
6+
scm.tag=jpush-client-2.3.0
7+
project.dev.cn.jpush.api\:jpush-client=2.3.0
88
pushChanges=false
99
scm.url=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git
1010
preparationGoals=clean verify
1111
project.scm.cn.jpush.api\:jpush-client.tag=HEAD
1212
project.scm.cn.jpush.api\:jpush-client.url=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git
1313
remoteTagging=true
1414
scm.commentPrefix=[maven-release-plugin]
15-
project.rel.cn.jpush.api\:jpush-client=2.1
15+
project.rel.cn.jpush.api\:jpush-client=2.3.0
1616
exec.additionalArguments=-Psonatype-oss-release -P sign
1717
exec.snapshotReleasePluginAllowed=false
1818
completedPhase=end-release

src/cn/jpush/api/push/MessageParams.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ public void addPlatform(DeviceEnum platform) {
153153
this.platform.add(platform);
154154
}
155155

156-
public int getApnsProduction() {
156+
int getApnsProduction() {
157157
return apnsProduction;
158158
}
159159

160-
public void setApnsProduction(int apnsProduction) {
160+
void setApnsProduction(int apnsProduction) {
161161
this.apnsProduction = apnsProduction;
162162
}
163163

test/cn/jpush/api/PushFunctionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void sendNotificationAll_ios(){
4949
NotificationParams params = new NotificationParams();
5050
params.setReceiverType(ReceiverTypeEnum.APP_KEY);
5151

52-
MessageResult result = jpushAndroid.sendNotification(MSG_CONTENT, params, extra);
52+
MessageResult result = jpushIos.sendNotification(MSG_CONTENT, params, extra);
5353
assertEquals(SUCCEED_RESULT_CODE, result.getErrorCode());
5454
}
5555

@@ -74,7 +74,7 @@ public void sendNotificationWithAlias_ios(){
7474
params.setReceiverType(ReceiverTypeEnum.ALIAS);
7575
params.setReceiverValue(ALIAS);
7676

77-
MessageResult result = jpushAndroid.sendNotification(MSG_CONTENT, params, extra);
77+
MessageResult result = jpushIos.sendNotification(MSG_CONTENT, params, extra);
7878
assertEquals(SUCCEED_RESULT_CODE, result.getErrorCode());
7979
}
8080

0 commit comments

Comments
 (0)