Skip to content

Commit 6d676cf

Browse files
committed
Update readme and build settings
Update the readme to include information about installing library from Maven. Also updates the build settings in the publish workflow. end
1 parent 24a7749 commit 6d676cf

File tree

6 files changed

+50
-21
lines changed

6 files changed

+50
-21
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@ jobs:
1515
distribution: 'adopt'
1616
java-version: '11'
1717

18-
- name: Set up Maven Central
19-
uses: actions/setup-java@v2
20-
with:
21-
distribution: 'adopt'
22-
java-version: '11'
23-
server-id: ossrh
24-
settings-path: ${{ github.workspace }}
25-
server-username: MAVEN_USERNAME
26-
server-password: MAVEN_PASSWORD
27-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
28-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
29-
overwrite-settings: false
30-
3118
- name: Build settings file
3219
uses: whelk-io/maven-settings-xml-action@v20
3320
with:
@@ -36,10 +23,8 @@ jobs:
3623
{
3724
"id": "ossrh",
3825
"username": "${env.MAVEN_USERNAME}",
39-
"password": "${env.MAVEN_PASSWORD}"
40-
},
41-
{
42-
"id": "gpg.passphrase",
26+
"password": "${env.MAVEN_PASSWORD}",
27+
"privateKey": "${env.MAVEN_GPG_PRIVATE_KEY}",
4328
"passphrase": "${env.MAVEN_GPG_PASSPHRASE}"
4429
}
4530
]
@@ -52,9 +37,23 @@ jobs:
5237
- name: Build with Maven
5338
run: mvn -B package --file pom.xml
5439

40+
- name: Set up Maven Central
41+
uses: actions/setup-java@v2
42+
with:
43+
distribution: 'adopt'
44+
java-version: '11'
45+
server-id: ossrh
46+
settings-path: ${{ github.workspace }}
47+
server-username: MAVEN_USERNAME
48+
server-password: MAVEN_PASSWORD
49+
gpg-private-key: MAVEN_GPG_PRIVATE_KEY
50+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
51+
overwrite-settings: false
52+
5553
- name: Publish to Maven Central
5654
run: mvn clean deploy -s $GITHUB_WORKSPACE/.m2/settings.xml
5755
env:
5856
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
5957
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
6058
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
59+
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,24 @@ mvn clean package
2828
```
2929

3030
Then manually install the following JARs:
31-
- `target/mx-platform-java-0.3.0.jar`
31+
- `target/mx-platform-java-0.3.1.jar`
3232
- `target/lib/*.jar`
3333

34+
### Maven users
35+
36+
Add this dependency to your project's POM:
37+
38+
```xml
39+
<dependency>
40+
<groupId>com.mx</groupId>
41+
<artifactId>mx-platform-java</artifactId>
42+
<version>0.3.1</version>
43+
<scope>compile</scope>
44+
</dependency>
45+
```
46+
47+
You can find the MX Platform Java Library in the [Maven Central Repository](https://search.maven.org/search?q=mx-platform-java).
48+
3449
## Getting Started
3550

3651
In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`.

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiPackage: "com.mx.client.mx-platform-api"
22
artifactDescription: "A Java library for the MX Platform API"
33
artifactId: "mx-platform-java"
44
artifactUrl: "https://github.com/mxenabled/mx-platform-java"
5-
artifactVersion: 0.3.0
5+
artifactVersion: 0.3.1
66
developerEmail: "devexperience@mx.com"
77
developerName: "MX"
88
developerOrganization: "MX Technologies Inc."

openapi/templates/README.mustache

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ Then manually install the following JARs:
3333
- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar`
3434
- `target/lib/*.jar`
3535

36+
### Maven users
37+
38+
Add this dependency to your project's POM:
39+
40+
```xml
41+
<dependency>
42+
<groupId>{{{groupId}}}</groupId>
43+
<artifactId>{{{artifactId}}}</artifactId>
44+
<version>{{{artifactVersion}}}</version>
45+
<scope>compile</scope>
46+
</dependency>
47+
```
48+
49+
You can find the MX Platform Java Library in the [Maven Central Repository](https://search.maven.org/search?q=mx-platform-java).
50+
3651
{{#jersey2}}
3752
## Usage
3853

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
55
<artifactId>mx-platform-java</artifactId>
66
<packaging>jar</packaging>
77
<name>mx-platform-java</name>
8-
<version>0.3.0</version>
8+
<version>0.3.1</version>
99
<url>https://github.com/mxenabled/mx-platform-java</url>
1010
<description>A Java library for the MX Platform API</description>
1111
<scm>

src/main/java/com/mx/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private void init() {
125125
json = new JSON();
126126

127127
// Set default User-Agent.
128-
setUserAgent("OpenAPI-Generator/0.3.0/java");
128+
setUserAgent("OpenAPI-Generator/0.3.1/java");
129129

130130
authentications = new HashMap<String, Authentication>();
131131
}

0 commit comments

Comments
 (0)