Skip to content

Commit df172fd

Browse files
committed
Refactor publish workflow and pom
Refactor pom to include the nexus-staging-maven-plugin and to move the maven-gpg-plugin into the build tags. This also refactors the publish workflow by removing the build settings action and to update the deploy command to pass in additional arguments.
1 parent 512ddcd commit df172fd

File tree

7 files changed

+79
-40
lines changed

7 files changed

+79
-40
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,22 @@ jobs:
1515
distribution: 'adopt'
1616
java-version: '11'
1717

18+
- name: Build with Maven
19+
run: mvn -B package --file pom.xml
20+
1821
- name: Set up Maven Central
1922
uses: actions/setup-java@v2
2023
with:
2124
distribution: 'adopt'
2225
java-version: '11'
2326
server-id: ossrh
24-
settings-path: ${{ github.workspace }}
2527
server-username: MAVEN_USERNAME
2628
server-password: MAVEN_PASSWORD
2729
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2830
gpg-passphrase: MAVEN_GPG_PASSPHRASE
29-
overwrite-settings: false
30-
31-
- name: Build settings file
32-
uses: whelk-io/maven-settings-xml-action@v20
33-
with:
34-
servers: >
35-
[
36-
{
37-
"id": "ossrh",
38-
"username": "${env.MAVEN_USERNAME}",
39-
"password": "${env.MAVEN_PASSWORD}"
40-
},
41-
{
42-
"id": "gpg.passphrase",
43-
"passphrase": "${env.MAVEN_GPG_PASSPHRASE}"
44-
}
45-
]
46-
active_profiles: >
47-
[
48-
"sign-artifacts"
49-
]
50-
output_file: .m2/settings.xml
51-
52-
- name: Build with Maven
53-
run: mvn -B package --file pom.xml
5431

5532
- name: Publish to Maven Central
56-
run: mvn clean deploy -s $GITHUB_WORKSPACE/.m2/settings.xml
33+
run: mvn --no-transfer-progress -B -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} clean deploy
5734
env:
5835
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
5936
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-java/issues) to report issues using the MX Platform API Java Library.*
22

3-
# MX Platform Java
3+
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech).*
44

5-
The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5+
# MX Platform Java - v0.3.2
66

7-
For more information, please [visit](https://www.mx.com/products/platform-api)
7+
The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
88

9-
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
9+
Please [visit](https://www.mx.com/products/platform-api) for more information.
1010

1111
## Requirements
1212

@@ -28,7 +28,7 @@ mvn clean package
2828
```
2929

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

3434
### Maven users
@@ -39,7 +39,7 @@ Add this dependency to your project's POM:
3939
<dependency>
4040
<groupId>com.mx</groupId>
4141
<artifactId>mx-platform-java</artifactId>
42-
<version>0.3.1</version>
42+
<version>0.3.2</version>
4343
<scope>compile</scope>
4444
</dependency>
4545
```

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.1
5+
artifactVersion: 0.3.2
66
developerEmail: "devexperience@mx.com"
77
developerName: "MX"
88
developerOrganization: "MX Technologies Inc."

openapi/templates/README.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-java/issues) to report issues using the MX Platform API Java Library.*
22

3-
# MX Platform Java
3+
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech).*
4+
5+
# MX Platform Java - v{{{artifactVersion}}}
46

57
{{{appDescriptionWithNewLines}}}
68

79
{{#infoUrl}}
8-
For more information, please [visit]({{{infoUrl}}})
10+
Please [visit]({{{infoUrl}}}) for more information.
911
{{/infoUrl}}
1012

11-
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
12-
1313
## Requirements
1414

1515
Building the API client library requires:

openapi/templates/pom.mustache

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,37 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
4040

4141
<build>
4242
<plugins>
43+
<plugin>
44+
<groupId>org.sonatype.plugins</groupId>
45+
<artifactId>nexus-staging-maven-plugin</artifactId>
46+
<version>1.6.7</version>
47+
<extensions>true</extensions>
48+
<configuration>
49+
<serverId>ossrh</serverId>
50+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
51+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
52+
</configuration>
53+
</plugin>
54+
<plugin>
55+
<groupId>org.apache.maven.plugins</groupId>
56+
<artifactId>maven-gpg-plugin</artifactId>
57+
<version>1.5</version>
58+
<executions>
59+
<execution>
60+
<id>sign-artifacts</id>
61+
<phase>verify</phase>
62+
<goals>
63+
<goal>sign</goal>
64+
</goals>
65+
</execution>
66+
</executions>
67+
<configuration>
68+
<gpgArguments>
69+
<arg>--pinentry-mode</arg>
70+
<arg>loopback</arg>
71+
</gpgArguments>
72+
</configuration>
73+
</plugin>
4374
<plugin>
4475
<groupId>org.apache.maven.plugins</groupId>
4576
<artifactId>maven-compiler-plugin</artifactId>

pom.xml

Lines changed: 32 additions & 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.1</version>
8+
<version>0.3.2</version>
99
<url>https://github.com/mxenabled/mx-platform-java</url>
1010
<description>A Java library for the MX Platform API</description>
1111
<scm>
@@ -33,6 +33,37 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
3333

3434
<build>
3535
<plugins>
36+
<plugin>
37+
<groupId>org.sonatype.plugins</groupId>
38+
<artifactId>nexus-staging-maven-plugin</artifactId>
39+
<version>1.6.7</version>
40+
<extensions>true</extensions>
41+
<configuration>
42+
<serverId>ossrh</serverId>
43+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
44+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
45+
</configuration>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-gpg-plugin</artifactId>
50+
<version>1.5</version>
51+
<executions>
52+
<execution>
53+
<id>sign-artifacts</id>
54+
<phase>verify</phase>
55+
<goals>
56+
<goal>sign</goal>
57+
</goals>
58+
</execution>
59+
</executions>
60+
<configuration>
61+
<gpgArguments>
62+
<arg>--pinentry-mode</arg>
63+
<arg>loopback</arg>
64+
</gpgArguments>
65+
</configuration>
66+
</plugin>
3667
<plugin>
3768
<groupId>org.apache.maven.plugins</groupId>
3869
<artifactId>maven-compiler-plugin</artifactId>

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.1/java");
128+
setUserAgent("OpenAPI-Generator/0.3.2/java");
129129

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

0 commit comments

Comments
 (0)