diff --git a/README.md b/README.md index 01fe0cfa..453719c1 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,13 @@ ## 概述 这是 JPush REST API 的 Java 版本封装开发包,是由极光推送官方提供的,一般支持最新的 API 功能。 + 对应的 REST API 文档: ## 安装 -### 直接使用 jar + +### maven 方式 +将下边的依赖条件放到你项目的 maven pom.xml 文件里。 ``` @@ -14,6 +17,9 @@ 2.3.0 ``` +### jar 包方式 + +请到每个 Release 版本 dist/ 目录里下载相应版本的 jar 包。 ### 依赖包 * gson diff --git a/pom.xml b/pom.xml index 56fee3c5..0d9dcd27 100644 --- a/pom.xml +++ b/pom.xml @@ -1,30 +1,48 @@ 4.0.0 - + + cn.jpush.api + jpush-client + 2.3.0 + jar + https://github.com/jpush/jpush-api-java-client + JPush API Java Client + JPush's officially supported Java client library for accessing JPush APIs. + + The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo + + + github + UTF-8 + + org.sonatype.oss oss-parent 7 - cn.jpush.api - jpush-client - 2.3.0 - jar - JPush API Java Client - JPush's officially supported Java client library for accessing JPush APIs. - https://github.com/jpush/jpush-api-java-client - - github - UTF-8 - + + https://github.com/jpush/jpush-api-java-client + scm:git:git@github.com:jpush/jpush-api-java-client.git + scm:git:git@github.com:jpush/jpush-api-java-client.git + + + + + jpush + JPush + fajaven@gmail.com + https://github.com/jpush + + @@ -50,6 +68,7 @@ + src test @@ -65,7 +84,7 @@ org.apache.maven.plugins maven-release-plugin - 2.2.2 + 2.4.2 org.apache.maven.plugins @@ -99,6 +118,7 @@ + @@ -122,18 +142,5 @@ - - https://github.com/jpush/jpush-api-java-client - scm:git:git@github.com:jpush/jpush-api-java-client.git - scm:git:git@github.com:jpush/jpush-api-java-client.git - - - - jpush - JPush - fajaven@gmail.com - https://github.com/jpush - - - + diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index e5682272..00000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,81 +0,0 @@ - - 4.0.0 - cn.jpush.api - jpush-client - jar - Jpush Client - jpush client - https://github.com/jpush/jpush-api-java-client - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - com.google.code.gson - gson - 2.2.4 - - - junit - junit - 4.11 - test - - - - src - test - - - maven-compiler-plugin - 3.1 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-release-plugin - 2.2.2 - - - org.apache.maven.plugins - maven-scm-plugin - 1.8.1 - - - - deploy - false - true - true - - - - - - scm:git:git@github.com:jpush/jpush-api-java-client.git - scm:git:git@github.com:jpush/jpush-api-java-client.git - scm:git:git@github.com:jpush/jpush-api-java-client.git - - - - xinxin - xinxin - xinxin@jpush.cn - - - - - org.sonatype.oss - oss-parent - 7 - - 2.1-SNAPSHOT - \ No newline at end of file diff --git a/release.properties b/release.properties index aa86ded2..8ad21bd9 100644 --- a/release.properties +++ b/release.properties @@ -3,8 +3,8 @@ project.scm.cn.jpush.api\:jpush-client.connection=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git project.scm.cn.jpush.api\:jpush-client.developerConnection=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git scm.tagNameFormat=@{project.artifactId}-@{project.version} -scm.tag=jpush-client-2.1 -project.dev.cn.jpush.api\:jpush-client=2.2-SNAPSHOT +scm.tag=jpush-client-2.3.0 +project.dev.cn.jpush.api\:jpush-client=2.3.0 pushChanges=false scm.url=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git preparationGoals=clean verify @@ -12,7 +12,7 @@ project.scm.cn.jpush.api\:jpush-client.tag=HEAD project.scm.cn.jpush.api\:jpush-client.url=scm\:git\:git@github.com\:jpush/jpush-api-java-client.git remoteTagging=true scm.commentPrefix=[maven-release-plugin] -project.rel.cn.jpush.api\:jpush-client=2.1 +project.rel.cn.jpush.api\:jpush-client=2.3.0 exec.additionalArguments=-Psonatype-oss-release -P sign exec.snapshotReleasePluginAllowed=false completedPhase=end-release diff --git a/src/cn/jpush/api/push/MessageParams.java b/src/cn/jpush/api/push/MessageParams.java index 50667586..a9b5b06f 100644 --- a/src/cn/jpush/api/push/MessageParams.java +++ b/src/cn/jpush/api/push/MessageParams.java @@ -153,11 +153,11 @@ public void addPlatform(DeviceEnum platform) { this.platform.add(platform); } - public int getApnsProduction() { + int getApnsProduction() { return apnsProduction; } - public void setApnsProduction(int apnsProduction) { + void setApnsProduction(int apnsProduction) { this.apnsProduction = apnsProduction; } diff --git a/test/cn/jpush/api/PushFunctionTests.java b/test/cn/jpush/api/PushFunctionTests.java index b9839071..9a712029 100644 --- a/test/cn/jpush/api/PushFunctionTests.java +++ b/test/cn/jpush/api/PushFunctionTests.java @@ -49,7 +49,7 @@ public void sendNotificationAll_ios(){ NotificationParams params = new NotificationParams(); params.setReceiverType(ReceiverTypeEnum.APP_KEY); - MessageResult result = jpushAndroid.sendNotification(MSG_CONTENT, params, extra); + MessageResult result = jpushIos.sendNotification(MSG_CONTENT, params, extra); assertEquals(SUCCEED_RESULT_CODE, result.getErrorCode()); } @@ -74,7 +74,7 @@ public void sendNotificationWithAlias_ios(){ params.setReceiverType(ReceiverTypeEnum.ALIAS); params.setReceiverValue(ALIAS); - MessageResult result = jpushAndroid.sendNotification(MSG_CONTENT, params, extra); + MessageResult result = jpushIos.sendNotification(MSG_CONTENT, params, extra); assertEquals(SUCCEED_RESULT_CODE, result.getErrorCode()); }