diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9007800..33263ee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,27 @@ jobs: distribution: 'adopt' java-version: '11' + - name: Build settings file + uses: whelk-io/maven-settings-xml-action@v20 + with: + servers: > + [ + { + "id": "ossrh", + "username": "${env.MAVEN_USERNAME}", + "password": "${env.MAVEN_PASSWORD}" + }, + { + "id": "gpg.passphrase", + "passphrase": "${env.MAVEN_GPG_PASSPHRASE}" + } + ] + active_profiles: > + [ + "sign-artifacts" + ] + output_file: .m2/settings.xml + - name: Build with Maven run: mvn -B package --file pom.xml @@ -24,13 +45,14 @@ jobs: distribution: 'adopt' java-version: '11' server-id: ossrh + settings-path: ${{ github.workspace }} server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Publish to Maven Central - run: mvn -B deploy -P sign-artifacts + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} diff --git a/openapi/templates/pom.mustache b/openapi/templates/pom.mustache index 592d4fd..c8d415a 100644 --- a/openapi/templates/pom.mustache +++ b/openapi/templates/pom.mustache @@ -1,318 +1,318 @@ - 4.0.0 - {{groupId}} - {{artifactId}} - jar - {{artifactId}} - {{artifactVersion}} - {{artifactUrl}} - {{artifactDescription}} - - {{scmConnection}} - {{scmDeveloperConnection}} - {{scmUrl}} - -{{#parentOverridden}} - - {{{parentGroupId}}} - {{{parentArtifactId}}} - {{{parentVersion}}} - -{{/parentOverridden}} +xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + + {{#parentOverridden}} + + {{{parentGroupId}}} + {{{parentArtifactId}}} + {{{parentVersion}}} + + {{/parentOverridden}} - - - {{licenseName}} - {{licenseUrl}} - repo - - + + + {{licenseName}} + {{licenseUrl}} + repo + + - - - {{developerName}} - {{developerEmail}} - {{developerOrganization}} - {{developerOrganizationUrl}} - - + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M4 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M4 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - --pinentry-mode - loopback - - - - - - - + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + + + - - - io.swagger - swagger-annotations - ${swagger-core-version} - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - org.threeten - threetenbp - ${threetenbp-version} - - - javax.annotation - javax.annotation-api - ${javax-annotation-version} - provided - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - - junit - junit - ${junit-version} - test - - - org.mockito - mockito-core - 3.11.2 - test - - - - 1.7 - ${java.version} - ${java.version} - 1.8.5 - 1.6.2 - 4.9.1 - 2.8.6 - 3.11 - 0.2.1 - 1.5.0 - 1.3.2 - 4.13.1 - UTF-8 - + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + org.threeten + threetenbp + ${threetenbp-version} + + + javax.annotation + javax.annotation-api + ${javax-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + + junit + junit + ${junit-version} + test + + + org.mockito + mockito-core + 3.11.2 + test + + + + 1.7 + ${java.version} + ${java.version} + 1.8.5 + 1.6.2 + 4.9.1 + 2.8.6 + 3.11 + 0.2.1 + 1.5.0 + 1.3.2 + 4.13.1 + UTF-8 + diff --git a/pom.xml b/pom.xml index 60fe2c8..176f273 100644 --- a/pom.xml +++ b/pom.xml @@ -1,311 +1,311 @@ - 4.0.0 - com.mx - mx-platform-java - jar - mx-platform-java - 0.2.2 +xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + com.mx + mx-platform-java + jar + mx-platform-java + 0.2.2 + https://github.com/mxenabled/mx-platform-java + A Java library for the MX Platform API + + https://github.com/mxenabled/mx-platform-java.git + git@github.com:mxenabled/mx-platform-java.git https://github.com/mxenabled/mx-platform-java - A Java library for the MX Platform API - - https://github.com/mxenabled/mx-platform-java.git - git@github.com:mxenabled/mx-platform-java.git - https://github.com/mxenabled/mx-platform-java - + - - - MIT - https://github.com/mxenabled/mx-platform-java/LICENSE - repo - - + + + MIT + https://github.com/mxenabled/mx-platform-java/LICENSE + repo + + - - - MX - devexperience@mx.com - MX Technologies Inc. - https://www.mx.com/ - - + + + MX + devexperience@mx.com + MX Technologies Inc. + https://www.mx.com/ + + - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M4 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M4 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - --pinentry-mode - loopback - - - - - - - + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + + + - - - io.swagger - swagger-annotations - ${swagger-core-version} - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - org.threeten - threetenbp - ${threetenbp-version} - - - javax.annotation - javax.annotation-api - ${javax-annotation-version} - provided - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - - junit - junit - ${junit-version} - test - - - org.mockito - mockito-core - 3.11.2 - test - - - - 1.7 - ${java.version} - ${java.version} - 1.8.5 - 1.6.2 - 4.9.1 - 2.8.6 - 3.11 - 0.2.1 - 1.5.0 - 1.3.2 - 4.13.1 - UTF-8 - + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + org.threeten + threetenbp + ${threetenbp-version} + + + javax.annotation + javax.annotation-api + ${javax-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + + junit + junit + ${junit-version} + test + + + org.mockito + mockito-core + 3.11.2 + test + + + + 1.7 + ${java.version} + ${java.version} + 1.8.5 + 1.6.2 + 4.9.1 + 2.8.6 + 3.11 + 0.2.1 + 1.5.0 + 1.3.2 + 4.13.1 + UTF-8 +