Skip to content

Commit f0c9be1

Browse files
authored
Update pipeline and pom.xml (#19)
* Update maven-publish.yaml * Update pom.xml * Gitignore * Update README.md
1 parent a9e8e1c commit f0c9be1

File tree

6 files changed

+189
-90
lines changed

6 files changed

+189
-90
lines changed

.github/workflows/maven-publish.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ jobs:
3030
- name: Set up Java for publishing to Maven Central Repository
3131
uses: actions/setup-java@v2
3232
with:
33-
distribution: 'adopt'
34-
java-version: 8.0.181+13
33+
distribution: 'zulu'
34+
java-version: 8
35+
cache: maven
3536
server-id: ossrh
3637
#gpg is only needed for the first run
3738
gpg-private-key: ${{ secrets.GPG_JAR_KEY }}
@@ -53,6 +54,7 @@ jobs:
5354
with:
5455
distribution: 'zulu'
5556
java-version: 8
57+
cache: maven
5658
server-id: github
5759

5860
- name: Deploy to GitHub Packages

.gitignore

Lines changed: 113 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,95 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/maven,java,intellij+all
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=maven,java,intellij+all
3+
4+
### Intellij+all ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/**/usage.statistics.xml
12+
.idea/**/dictionaries
13+
.idea/**/shelf
14+
15+
# AWS User-specific
16+
.idea/**/aws.xml
17+
18+
# Generated files
19+
.idea/**/contentModel.xml
20+
21+
# Sensitive or high-churn files
22+
.idea/**/dataSources/
23+
.idea/**/dataSources.ids
24+
.idea/**/dataSources.local.xml
25+
.idea/**/sqlDataSources.xml
26+
.idea/**/dynamic.xml
27+
.idea/**/uiDesigner.xml
28+
.idea/**/dbnavigator.xml
29+
30+
# Gradle
31+
.idea/**/gradle.xml
32+
.idea/**/libraries
33+
34+
# Gradle and Maven with auto-import
35+
# When using Gradle or Maven with auto-import, you should exclude module files,
36+
# since they will be recreated, and may cause churn. Uncomment if using
37+
# auto-import.
38+
# .idea/artifacts
39+
# .idea/compiler.xml
40+
# .idea/jarRepositories.xml
41+
# .idea/modules.xml
42+
# .idea/*.iml
43+
# .idea/modules
44+
# *.iml
45+
# *.ipr
46+
47+
# CMake
48+
cmake-build-*/
49+
50+
# Mongo Explorer plugin
51+
.idea/**/mongoSettings.xml
52+
53+
# File-based project format
54+
*.iws
55+
56+
# IntelliJ
57+
out/
58+
59+
# mpeltonen/sbt-idea plugin
60+
.idea_modules/
61+
62+
# JIRA plugin
63+
atlassian-ide-plugin.xml
64+
65+
# Cursive Clojure plugin
66+
.idea/replstate.xml
67+
68+
# SonarLint plugin
69+
.idea/sonarlint/
70+
71+
# Crashlytics plugin (for Android Studio and IntelliJ)
72+
com_crashlytics_export_strings.xml
73+
crashlytics.properties
74+
crashlytics-build.properties
75+
fabric.properties
76+
77+
# Editor-based Rest Client
78+
.idea/httpRequests
79+
80+
# Android studio 3.1+ serialized cache file
81+
.idea/caches/build_file_checksums.ser
82+
83+
### Intellij+all Patch ###
84+
# Ignore everything but code style settings and run configurations
85+
# that are supposed to be shared within teams.
86+
87+
.idea/*
88+
89+
!.idea/codeStyles
90+
!.idea/runConfigurations
91+
92+
### Java ###
193
# Compiled class file
294
*.class
395

@@ -21,7 +113,25 @@
21113

22114
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23115
hs_err_pid*
116+
replay_pid*
117+
118+
### Maven ###
119+
target/
120+
pom.xml.tag
121+
pom.xml.releaseBackup
122+
pom.xml.versionsBackup
123+
pom.xml.next
124+
release.properties
125+
dependency-reduced-pom.xml
126+
buildNumber.properties
127+
.mvn/timing.properties
128+
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
129+
.mvn/wrapper/maven-wrapper.jar
130+
131+
# Eclipse m2e generated files
132+
# Eclipse Core
133+
.project
134+
# JDT-specific (Eclipse Java Development Tools)
135+
.classpath
24136

25-
# IDE folders
26-
.idea
27-
target/maven-archiver/pom.properties
137+
# End of https://www.toptal.com/developers/gitignore/api/maven,java,intellij+all

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
[![Build Status](https://dev.azure.com/cmdotcom/text-sdk-java/_apis/build/status/cmdotcom.text-sdk-java?branchName=master)](https://dev.azure.com/cmdotcom/text-sdk-java/_build/latest?definitionId=1&branchName=master)
21

32
## @cmdotcom/text-sdk: A helper library to send messages.
43

54
Want to send messages in your Java application? Then you are at the right place.
6-
If you want to get all the functionalities, go to: [CM.com API Docs](https://docs.cmtelecom.com/bulk-sms/v1.0)
5+
If you want to get all the functionalities, go to: [CM.com API Docs](https://developers.cm.com/messaging)
76

87

98
## Installing
10-
Add the GSon dependency to your project: https://mvnrepository.com/artifact/com.google.code.gson/gson/2.8.5
9+
Warning: Namespace has been changed between 1.3 and 2.0
10+
### Above 2.0
11+
```xml
12+
<dependency>
13+
<groupId>com.cm</groupId>
14+
<artifactId>text-sdk</artifactId>
15+
<version>2.0</version>
16+
</dependency>
17+
```
1118

12-
[![Build Status](https://dev.azure.com/cmdotcom/text-sdk-java/_apis/build/status/cmdotcom.text-sdk-java?branchName=master)](https://dev.azure.com/cmdotcom/text-sdk-java/_build/latest?definitionId=1&branchName=master)
13-
Download our Jar file and add it to your project.
19+
### Version 1.3
20+
Version 1.3 is available as JAR under the 1.3 release [here](https://github.com/cmdotcom/text-sdk-java/releases/tag/v1.3-snapshot) <br>
21+
You will have to add GSON manually: https://mvnrepository.com/artifact/com.google.code.gson/gson/2.8.5
1422

1523

1624
## Instantiate the client
1725
Use your productToken which authorizes you on the CM platform. Get yours on CM.com
1826

1927
```cs
20-
MessagingClient client = new MessagingClient("YourproductToken");
28+
MessagingClient client = new MessagingClient("YourCMProductToken");
2129
```
2230

2331
## Send a message
@@ -34,7 +42,7 @@ By using the `MessageBuilder` it is possible to send messages with auto detect e
3442
It is possible to let our gateway detect the encoding for you by including the type: auto setting.
3543
In case it detects characters that are not part of the GSM character set, the message will be delivered as Unicode.
3644

37-
see our API docs for more info https://docs.cmtelecom.com/en/api/business-messaging-api/1.0/index/
45+
see our API docs for more info https://developers.cm.com/messaging/
3846

3947
```cs
4048
MessagingClient client = new MessagingClient("YourProductToken");
@@ -82,7 +90,8 @@ Sending an message returns the response body
8290
}
8391
```
8492

85-
## Send whatsApp template messages using the message builder please check our docs to see more information about whatsApp templates: https://docs.cmtelecom.com/en/api/business-messaging-api/1.0/index#whatsapp-template-message
93+
## Whatsapp Templates
94+
Send WhatsApp template messages using the message builder please take a look at our documentation in the [Whatsapp templates section](https://developers.cm.com/messaging/docs/whatsapp#template)
8695
```cs
8796

8897
MessagingClient client = new MessagingClient("YourProductToken");

pom.xml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,65 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.cm</groupId>
77
<artifactId>text-sdk</artifactId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.0</version>
9+
<packaging>jar</packaging>
910
<build>
1011
<plugins>
12+
<plugin>
13+
<version>3.10.1</version>
14+
<groupId>org.apache.maven.plugins</groupId>
15+
<artifactId>maven-compiler-plugin</artifactId>
16+
<configuration>
17+
<source>7</source>
18+
<target>7</target>
19+
</configuration>
20+
</plugin>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-gpg-plugin</artifactId>
24+
<version>3.0.1</version>
25+
<executions>
26+
<execution>
27+
<id>sign-artifacts</id>
28+
<phase>verify</phase>
29+
<goals>
30+
<goal>sign</goal>
31+
</goals>
32+
</execution>
33+
</executions>
34+
</plugin>
35+
<!-- Attach source jars-->
36+
<plugin>
37+
<artifactId>maven-source-plugin</artifactId>
38+
<version>3.2.1</version>
39+
<executions>
40+
<execution>
41+
<id>attach-source</id>
42+
<phase>compile</phase>
43+
<goals>
44+
<goal>jar-no-fork</goal>
45+
</goals>
46+
</execution>
47+
</executions>
48+
</plugin>
49+
<!-- Attach javadocs jar -->
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-javadoc-plugin</artifactId>
53+
<version>3.4.1</version>
54+
<executions>
55+
<execution>
56+
<id>attach-javadocs</id>
57+
<goals>
58+
<goal>jar</goal>
59+
</goals>
60+
</execution>
61+
</executions>
62+
</plugin>
1163
</plugins>
1264
</build>
1365

66+
1467
<name>text-sdk-java</name>
1568
<description>This is a library for sending messages with CM.com
1669
</description>
@@ -29,7 +82,7 @@
2982
<distributionManagement>
3083
<repository>
3184
<id>ossrh</id>
32-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
85+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
3386
</repository>
3487
</distributionManagement>
3588
</profile>

target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

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

target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

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

0 commit comments

Comments
 (0)