From d8aafa45ca480551d3e7209c8f44ec93b1873c40 Mon Sep 17 00:00:00 2001 From: Peter Trifanov Date: Mon, 19 Apr 2021 15:14:02 +0300 Subject: [PATCH] Use github packages repository for kotlin-maven-plugin-tools (#835) ### What's done: * Bump kotlin-maven-plugin-tools from 0.9.25 to 0.9.26 * Changed pluginRepositories in pom.xml * Update CI workflows * Added notes in README.md --- .github/workflows/build_and_test.yml | 4 ++-- .github/workflows/release.yml | 7 ++++++- diktat-maven-plugin/README.md | 7 +++++++ diktat-maven-plugin/pom.xml | 8 ++++---- 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 diktat-maven-plugin/README.md diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8e61683017..082c353924 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -112,13 +112,13 @@ jobs: - name: Maven Install if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} run: | - mvn -B clean install + mvn -B -T1C clean install shell: bash - name: Maven Install on windows if: runner.os == 'Windows' run: | - mvn -B clean install + mvn -B -T1C clean install shell: cmd - name: Upload gradle reports diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bfcd0de8e..6948a6e8c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,12 @@ jobs: - name: Create settings.xml uses: whelk-io/maven-settings-xml-action@v15 with: - servers: '[{ "id": "ossrh", "username": "${{ secrets.SONATYPE_USER }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }, { "id": "gpg.passphrase", "passphrase": "${{ secrets.DIKTAT_GPG_PASS }}" }]' + servers: | + [ + { "id": "ossrh", "username": "${{ secrets.SONATYPE_USER }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }, + { "id": "gpg.passphrase", "passphrase": "${{ secrets.DIKTAT_GPG_PASS }}" }, + { "id": "kotlin-maven-plugin-tools", "username": "${{github.actor}}", "password": "${{ secrets.GITHUB_TOKEN }}" } + ] - name: Deploy artifacts run: mvn -B clean deploy -Prelease --projects '!diktat-ruleset' - name: Build diktat.jar diff --git a/diktat-maven-plugin/README.md b/diktat-maven-plugin/README.md new file mode 100644 index 0000000000..f828fc3706 --- /dev/null +++ b/diktat-maven-plugin/README.md @@ -0,0 +1,7 @@ +## Building +To build and test the plugin, use regular maven commands. + +To generate plugin descriptor using data from KDocs, we use [kotlin-maven-plugin-tools](https://github.com/gantsign/kotlin-maven-plugin-tools). +This plugin is only available in github packages, which require authentication via `settings.xml`. However, +this plugin is activated only in release profile (`-Prelease`) and package repository doesn't require any authentication for local development. +If you need to run it locally, see [release.yml](../.github/workflows/release.yml) as an example of adding an entry to `settings.xml` `servers` section. \ No newline at end of file diff --git a/diktat-maven-plugin/pom.xml b/diktat-maven-plugin/pom.xml index 999b015a48..cf19521495 100644 --- a/diktat-maven-plugin/pom.xml +++ b/diktat-maven-plugin/pom.xml @@ -260,9 +260,9 @@ release - bintray-gantsign-maven - bintray-plugins - https://dl.bintray.com/gantsign/maven + kotlin-maven-plugin-tools + GitHub Packages + https://maven.pkg.github.com/gantsign/kotlin-maven-plugin-tools false @@ -299,7 +299,7 @@ com.github.gantsign.maven.plugin-tools kotlin-maven-plugin-tools - 0.9.25 + 0.9.26