From 9b08ab73ae6c93cc6dff07da8f0429cf75946a1a Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Mon, 28 Aug 2023 12:55:02 +0300 Subject: [PATCH 01/18] Updated gitignore --- .github/workflows/github-release.yml | 17 +++++++++++++++++ .github/workflows/release-publish.yml | 13 +------------ .mvn/wrapper/maven-wrapper.properties | 18 ------------------ script.sh | 4 ---- 4 files changed, 18 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/github-release.yml delete mode 100644 .mvn/wrapper/maven-wrapper.properties delete mode 100644 script.sh diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 0000000..fcbc1d0 --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,17 @@ +name: Create a GitHub Release, with release details specified + +on: + push: + tags: + - v* + branches: + - dev + +release: + name: Github Release + runs-on: ubuntu-latest + steps: + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false \ No newline at end of file diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 8bcbe95..eb10f5b 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -25,15 +25,4 @@ jobs: JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: mvn -Prelease deploy jreleaser:deploy -DaltDeploymentRepository=local::file:./target/staging-deploy - - # Automatically create a GitHub Release, with release details specified (the relevant commits) - release: - needs: publish - name: Github Release - runs-on: ubuntu-latest - steps: - - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - prerelease: false \ No newline at end of file + run: mvn -Prelease deploy jreleaser:deploy -DaltDeploymentRepository=local::file:./target/staging-deploy \ No newline at end of file diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index ca5ab4b..0000000 --- a/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/script.sh b/script.sh deleted file mode 100644 index fcbda8a..0000000 --- a/script.sh +++ /dev/null @@ -1,4 +0,0 @@ -mkdir -p ~/bin/openapitools -curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli -chmod u+x ~/bin/openapitools/openapi-generator-cli -export PATH=$PATH:~/bin/openapitools/ \ No newline at end of file From a52a6cca2ff427eeac7278535e8de90fcd36254d Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Mon, 28 Aug 2023 12:55:48 +0300 Subject: [PATCH 02/18] Updated gitignore --- .github/workflows/github-release.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index fcbc1d0..fa26eb1 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -7,11 +7,12 @@ on: branches: - dev -release: - name: Github Release - runs-on: ubuntu-latest - steps: - - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - prerelease: false \ No newline at end of file +jobs: + release: + name: Github Release + runs-on: ubuntu-latest + steps: + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false From 734e40528b81daa3b3c8db76f793415fafb1c8f2 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Mon, 28 Aug 2023 12:56:50 +0300 Subject: [PATCH 03/18] Updated gitignore --- .github/workflows/github-release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index fa26eb1..56d7bbe 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -4,8 +4,6 @@ on: push: tags: - v* - branches: - - dev jobs: release: From fc2728b358e1ff9304e3a482d43f8a57bcf0f9b5 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Mon, 28 Aug 2023 13:05:45 +0300 Subject: [PATCH 04/18] Updated gitignore --- .gitignore | 1 - .mvn/wrapper/maven-wrapper.properties | 18 ++++++++++++++++++ HELP.md | 19 ------------------- 3 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 .mvn/wrapper/maven-wrapper.properties delete mode 100644 HELP.md diff --git a/.gitignore b/.gitignore index b8973f8..3c9a445 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ buildNumber.properties .mvn/timing.properties # https://github.com/takari/maven-wrapper#usage-without-binary-jar .mvn/wrapper/maven-wrapper.jar -.mvn/wrapper/ # Eclipse m2e generated files # Eclipse Core diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..ca5ab4b --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/HELP.md b/HELP.md deleted file mode 100644 index 8c6dcbf..0000000 --- a/HELP.md +++ /dev/null @@ -1,19 +0,0 @@ -# Getting Started - -### Reference Documentation - -For further reference, please consider the following sections: - -* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) -* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.0.6/maven-plugin/reference/html/) -* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.0.6/maven-plugin/reference/html/#build-image) -* [Spring Web](https://docs.spring.io/spring-boot/docs/3.0.6/reference/htmlsingle/#web) - -### Guides - -The following guides illustrate how to use some features concretely: - -* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) -* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) -* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) - From 6821b74c04a50cab0d2a935af16276ce15e5c350 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 11:11:43 +0300 Subject: [PATCH 05/18] Trigger snapshot-publish job --- .github/workflows/snapshot-publish.yml | 29 +++++++++++++++++--------- pom.xml | 2 +- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 16b383b..346e159 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -5,19 +5,28 @@ on: branches: - dev +env: + GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: publish: runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v3.10.0 with: - java-version: '17' - distribution: 'adopt' - - name: Publish package - run: mvn --batch-mode deploy -DrepositoryId=github -Dmaven.deploy.skip=true + java-version: 17 + distribution: 'temurin' + + - name: Build and Publish Snapshot env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + USERNAME: ${{ env.GITHUB_USERNAME }} + TOKEN: ${{ env.GITHUB_TOKEN }} + run: | + mvn deploy -DskipTests=true -Dmaven.javadoc.skip=true \ + -DaltDeploymentRepository=github::default::https://github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server \ + -Dusername=${USERNAME} -Dpassword=${TOKEN} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 00a43d8..c1a6dcd 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.extrawest Extrawest-OCPI-2.2.1-CPO-Server - 2023.8.24 + 2023.8.24-SNAPSHOT Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server From bd4cc7561ffcbf3c08a40976871cdf3474d7c985 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 11:13:24 +0300 Subject: [PATCH 06/18] Trigger snapshot-publish job --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1a6dcd..00a43d8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.extrawest Extrawest-OCPI-2.2.1-CPO-Server - 2023.8.24-SNAPSHOT + 2023.8.24 Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server From c8a01d7c09b4dbeee4cfd14b2206710f8db5154e Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 11:34:22 +0300 Subject: [PATCH 07/18] Trigger snapshot-publish job --- .github/workflows/release-publish.yml | 9 ++++---- .github/workflows/snapshot-publish.yml | 29 +++++++++----------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index eb10f5b..5554c08 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -2,10 +2,11 @@ name: Publish package to the Maven Central Repository and create GitHub Release on: push: - tags: - - v* - pull_request: - branches: [ main ] + [dev] +# tags: +# - v* +# pull_request: +# branches: [ main ] jobs: publish: diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 346e159..16b383b 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -5,28 +5,19 @@ on: branches: - dev -env: - GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - jobs: publish: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v3.10.0 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: - java-version: 17 - distribution: 'temurin' - - - name: Build and Publish Snapshot + java-version: '17' + distribution: 'adopt' + - name: Publish package + run: mvn --batch-mode deploy -DrepositoryId=github -Dmaven.deploy.skip=true env: - USERNAME: ${{ env.GITHUB_USERNAME }} - TOKEN: ${{ env.GITHUB_TOKEN }} - run: | - mvn deploy -DskipTests=true -Dmaven.javadoc.skip=true \ - -DaltDeploymentRepository=github::default::https://github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server \ - -Dusername=${USERNAME} -Dpassword=${TOKEN} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From fc5dc1284fad4141be8f3b779f4c1a1cf2ff2375 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 11:37:14 +0300 Subject: [PATCH 08/18] Trigger snapshot-publish job --- .github/workflows/release-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 5554c08..3594073 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -2,7 +2,8 @@ name: Publish package to the Maven Central Repository and create GitHub Release on: push: - [dev] + branches: + - dev # tags: # - v* # pull_request: From 5ac95b584229008013df776716d79158dcbe5ff1 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 13:37:50 +0300 Subject: [PATCH 09/18] Trigger snapshot-publish job --- .github/workflows/release-publish.yml | 10 ++++------ .github/workflows/snapshot-publish.yml | 6 +++--- pom.xml | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 3594073..eb10f5b 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -2,12 +2,10 @@ name: Publish package to the Maven Central Repository and create GitHub Release on: push: - branches: - - dev -# tags: -# - v* -# pull_request: -# branches: [ main ] + tags: + - v* + pull_request: + branches: [ main ] jobs: publish: diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 16b383b..9f86056 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -15,9 +15,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '11' distribution: 'adopt' - name: Publish package - run: mvn --batch-mode deploy -DrepositoryId=github -Dmaven.deploy.skip=true + run: mvn --batch-mode deploy -DrepositoryId=github env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.JAVA_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 00a43d8..6e2d73c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.extrawest Extrawest-OCPI-2.2.1-CPO-Server - 2023.8.24 + 2023.8.24-SNAPSHOT Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server @@ -225,7 +225,7 @@ - github-releases + github https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server GitHub Package Registry false From e57eefe60f8df877e60f85723d650552fda44442 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 13:39:08 +0300 Subject: [PATCH 10/18] Trigger snapshot-publish job --- .github/workflows/snapshot-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 9f86056..026a486 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Publish package run: mvn --batch-mode deploy -DrepositoryId=github From bcfa6fe58624d93cd18c3abc13239045fa324743 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 13:46:19 +0300 Subject: [PATCH 11/18] Trigger snapshot-publish job --- .github/workflows/snapshot-publish.yml | 29 +++++++++++------ .m2/settings.xml | 45 ++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 .m2/settings.xml diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 026a486..6c94792 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -5,19 +5,28 @@ on: branches: - dev +env: + GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: publish: runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v3.10.0 with: - java-version: '17' - distribution: 'adopt' - - name: Publish package - run: mvn --batch-mode deploy -DrepositoryId=github + java-version: 17 + distribution: 'temurin' + + - name: Build and Publish Snapshot env: - GITHUB_TOKEN: ${{ secrets.JAVA_TOKEN }} \ No newline at end of file + USERNAME: ${{ env.GITHUB_USERNAME }} + TOKEN: ${{ env.GITHUB_TOKEN }} + run: | + mvn deploy -DskipTests=true -Dmaven.javadoc.skip=true \ + -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server \ + -Dusername=${USERNAME} -Dpassword=${TOKEN} \ No newline at end of file diff --git a/.m2/settings.xml b/.m2/settings.xml new file mode 100644 index 0000000..de29a43 --- /dev/null +++ b/.m2/settings.xml @@ -0,0 +1,45 @@ + + + + github + + + + + github + + + sonatype-nexus-releases + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + true + + + false + + + + github + https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server + + true + + + false + + + + + + + + + github + ${env.GITHUB_USERNAME} + ${env.GITHUB_TOKEN} + + + \ No newline at end of file From e0852ca20da28f0957ed62f9f596008b25ab38cf Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 13:52:34 +0300 Subject: [PATCH 12/18] Trigger snapshot-publish job --- .m2/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.m2/settings.xml b/.m2/settings.xml index de29a43..4ac6c53 100644 --- a/.m2/settings.xml +++ b/.m2/settings.xml @@ -34,7 +34,7 @@ - + github From e274ddcf3bfb539cdc3a040204f8d4f88c5d9921 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 13:55:55 +0300 Subject: [PATCH 13/18] Trigger snapshot-publish job --- .github/workflows/snapshot-publish.yml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 6c94792..b10af93 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -28,5 +28,5 @@ jobs: TOKEN: ${{ env.GITHUB_TOKEN }} run: | mvn deploy -DskipTests=true -Dmaven.javadoc.skip=true \ - -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server \ + -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/extrawest/extrawest-ocpi-2.2.1-cpo-server \ -Dusername=${USERNAME} -Dpassword=${TOKEN} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6e2d73c..4934d3d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.extrawest - Extrawest-OCPI-2.2.1-CPO-Server + extrawest-ocpi-2.2.1-cpo-server 2023.8.24-SNAPSHOT Extrawest-OCPI-2.2.1-CPO-Server @@ -226,7 +226,7 @@ github - https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server + https://maven.pkg.github.com/extrawest/extrawest-ocpi-2.2.1-cpo-server GitHub Package Registry false From 409a9a5350cbb1bc1d6df22359d9cfd912fedba9 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 14:00:08 +0300 Subject: [PATCH 14/18] Trigger snapshot-publish job --- .github/workflows/snapshot-publish.yml | 29 ++++++----------- .m2/settings.xml | 45 -------------------------- 2 files changed, 10 insertions(+), 64 deletions(-) delete mode 100644 .m2/settings.xml diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index b10af93..cab5060 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -5,28 +5,19 @@ on: branches: - dev -env: - GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - jobs: publish: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v3.10.0 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: - java-version: 17 - distribution: 'temurin' - - - name: Build and Publish Snapshot + java-version: '17' + distribution: 'adopt' + - name: Publish package + run: mvn --batch-mode deploy -DrepositoryId=github env: - USERNAME: ${{ env.GITHUB_USERNAME }} - TOKEN: ${{ env.GITHUB_TOKEN }} - run: | - mvn deploy -DskipTests=true -Dmaven.javadoc.skip=true \ - -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/extrawest/extrawest-ocpi-2.2.1-cpo-server \ - -Dusername=${USERNAME} -Dpassword=${TOKEN} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.m2/settings.xml b/.m2/settings.xml deleted file mode 100644 index 4ac6c53..0000000 --- a/.m2/settings.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - github - - - - - github - - - sonatype-nexus-releases - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - true - - - false - - - - github - https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server - - true - - - false - - - - - - - - - github - ${env.GITHUB_USERNAME} - ${env.GITHUB_TOKEN} - - - \ No newline at end of file From 2c5c9ede4907d7b2a317cff9e2137abe2f9f040e Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 18:12:52 +0300 Subject: [PATCH 15/18] Added swagger tags to generate clients classes with custom names --- pom.xml | 4 ++-- .../java/com/extrawest/ocpi/controller/CPOCdrController.java | 2 ++ .../ocpi/controller/CPOChargingProfilesController.java | 2 ++ .../com/extrawest/ocpi/controller/CPOCommandsController.java | 2 ++ .../extrawest/ocpi/controller/CPOCredentialsController.java | 2 ++ .../com/extrawest/ocpi/controller/CPOLocationController.java | 2 ++ .../com/extrawest/ocpi/controller/CPOSessionsController.java | 2 ++ .../com/extrawest/ocpi/controller/CPOTariffController.java | 2 ++ .../com/extrawest/ocpi/controller/CPOTokensController.java | 2 ++ .../com/extrawest/ocpi/controller/CPOVersionController.java | 2 ++ .../com/extrawest/ocpi/controller/ClientInfoController.java | 2 ++ .../extrawest/ocpi/controller/HubClientInfoController.java | 2 ++ 12 files changed, 24 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4934d3d..e6fc0e8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,8 @@ 4.0.0 com.extrawest - extrawest-ocpi-2.2.1-cpo-server - 2023.8.24-SNAPSHOT + Extrawest-OCPI-2.2.1-CPO-Server + 2023.8.27-SNAPSHOT Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOCdrController.java b/src/main/java/com/extrawest/ocpi/controller/CPOCdrController.java index 842a20a..b9e4a48 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOCdrController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOCdrController.java @@ -2,6 +2,7 @@ import com.extrawest.ocpi.model.dto.CdrDTO; import com.extrawest.ocpi.service.CPOCdrService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -14,6 +15,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/cdr") +@Tag(name = "CPOCdr") public class CPOCdrController { protected final CPOCdrService cpoCdrService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOChargingProfilesController.java b/src/main/java/com/extrawest/ocpi/controller/CPOChargingProfilesController.java index b15ce35..3799ded 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOChargingProfilesController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOChargingProfilesController.java @@ -3,6 +3,7 @@ import com.extrawest.ocpi.model.dto.request.SetChargingProfileRequestDTO; import com.extrawest.ocpi.model.dto.response.ChargingProfileResponseDTO; import com.extrawest.ocpi.service.CPOChargingProfilesService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -11,6 +12,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/chargingProfiles") +@Tag(name = "CPOChargingProfiles") public class CPOChargingProfilesController { protected final CPOChargingProfilesService cpoChargingProfilesService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOCommandsController.java b/src/main/java/com/extrawest/ocpi/controller/CPOCommandsController.java index f845786..97c254b 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOCommandsController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOCommandsController.java @@ -4,6 +4,7 @@ import com.extrawest.ocpi.model.dto.response.CommandResponseDTO; import com.extrawest.ocpi.model.enums.CommandType; import com.extrawest.ocpi.service.CPOCommandsService; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -11,6 +12,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/commands") +@Tag(name = "CPOCommands") public class CPOCommandsController { protected final CPOCommandsService cpoCommandsService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOCredentialsController.java b/src/main/java/com/extrawest/ocpi/controller/CPOCredentialsController.java index f59cc62..1c9d272 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOCredentialsController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOCredentialsController.java @@ -2,6 +2,7 @@ import com.extrawest.ocpi.model.dto.CredentialsDTO; import com.extrawest.ocpi.service.CPOCredentialsService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -10,6 +11,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/credentials") +@Tag(name = "CPOCredentials") public class CPOCredentialsController { protected final CPOCredentialsService cpoCredentialsService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOLocationController.java b/src/main/java/com/extrawest/ocpi/controller/CPOLocationController.java index 82088f6..75aa674 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOLocationController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOLocationController.java @@ -3,6 +3,7 @@ import com.extrawest.ocpi.model.AbstractDomainObject; import com.extrawest.ocpi.model.dto.LocationDTO; import com.extrawest.ocpi.service.CPOLocationService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -15,6 +16,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/locations") +@Tag(name = "CPOLocation") public class CPOLocationController { protected final CPOLocationService cpoLocationService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOSessionsController.java b/src/main/java/com/extrawest/ocpi/controller/CPOSessionsController.java index 65aa984..44b35b4 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOSessionsController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOSessionsController.java @@ -3,6 +3,7 @@ import com.extrawest.ocpi.model.dto.ChargingPreferencesDTO; import com.extrawest.ocpi.model.dto.SessionDTO; import com.extrawest.ocpi.service.CPOSessionsService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -13,6 +14,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/sessions") +@Tag(name = "CPOSessions") public class CPOSessionsController { protected final CPOSessionsService cpoSessionsService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOTariffController.java b/src/main/java/com/extrawest/ocpi/controller/CPOTariffController.java index f11f880..64b90d3 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOTariffController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOTariffController.java @@ -2,6 +2,7 @@ import com.extrawest.ocpi.model.dto.TariffDTO; import com.extrawest.ocpi.service.CPOTariffService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -14,6 +15,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/tariffs") +@Tag(name = "CPOTariff") public class CPOTariffController { protected final CPOTariffService CPOTariffService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOTokensController.java b/src/main/java/com/extrawest/ocpi/controller/CPOTokensController.java index 071d959..4827913 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOTokensController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOTokensController.java @@ -3,6 +3,7 @@ import com.extrawest.ocpi.model.dto.TokenDTO; import com.extrawest.ocpi.model.enums.TokenType; import com.extrawest.ocpi.service.CPOTokensService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -11,6 +12,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/tokens") +@Tag(name = "CPOTokens") public class CPOTokensController { protected final CPOTokensService cpoTokensService; diff --git a/src/main/java/com/extrawest/ocpi/controller/CPOVersionController.java b/src/main/java/com/extrawest/ocpi/controller/CPOVersionController.java index 2ac502c..9c43379 100644 --- a/src/main/java/com/extrawest/ocpi/controller/CPOVersionController.java +++ b/src/main/java/com/extrawest/ocpi/controller/CPOVersionController.java @@ -4,6 +4,7 @@ import com.extrawest.ocpi.model.dto.response.VersionResponseDTO; import com.extrawest.ocpi.model.enums.VersionNumber; import com.extrawest.ocpi.service.CPOVersionService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -15,6 +16,7 @@ @RestController @RequestMapping("/cpo/api/2.2.1/versions") +@Tag(name = "CPOVersion") public class CPOVersionController { protected final CPOVersionService cpoVersionService; diff --git a/src/main/java/com/extrawest/ocpi/controller/ClientInfoController.java b/src/main/java/com/extrawest/ocpi/controller/ClientInfoController.java index d87690b..61acef0 100644 --- a/src/main/java/com/extrawest/ocpi/controller/ClientInfoController.java +++ b/src/main/java/com/extrawest/ocpi/controller/ClientInfoController.java @@ -2,6 +2,7 @@ import com.extrawest.ocpi.model.dto.ClientInfoDTO; import com.extrawest.ocpi.service.ClientInfoService; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.constraints.Max; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -9,6 +10,7 @@ @RestController @RequestMapping("/api/2.2.1/hubClientInfo") +@Tag(name = "ClientInfo") public class ClientInfoController { protected final ClientInfoService clientInfoService; diff --git a/src/main/java/com/extrawest/ocpi/controller/HubClientInfoController.java b/src/main/java/com/extrawest/ocpi/controller/HubClientInfoController.java index dd58da5..0d32c06 100644 --- a/src/main/java/com/extrawest/ocpi/controller/HubClientInfoController.java +++ b/src/main/java/com/extrawest/ocpi/controller/HubClientInfoController.java @@ -2,6 +2,7 @@ import com.extrawest.ocpi.model.dto.ClientInfoDTO; import com.extrawest.ocpi.service.HubClientInfoService; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -14,6 +15,7 @@ @RestController @RequestMapping("/hub/api/2.2.1/hubClientInfo") +@Tag(name = "HubClientInfo") public class HubClientInfoController { protected final HubClientInfoService hubClientInfoService; From 6a7dcda30ebe498b8fcc8c32d4e40ce03312bd69 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 18:20:19 +0300 Subject: [PATCH 16/18] Updated version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e6fc0e8..96b4c75 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.extrawest Extrawest-OCPI-2.2.1-CPO-Server - 2023.8.27-SNAPSHOT + 2023.8.27 Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server From 0f4083863d31890284cb8fc8526b24628e5df6d0 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 18:28:18 +0300 Subject: [PATCH 17/18] Trigger package and version publishing --- .github/workflows/release-publish.yml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index eb10f5b..6287390 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -1,4 +1,4 @@ -name: Publish package to the Maven Central Repository and create GitHub Release +name: Publish package to the Maven Central Repository on: push: diff --git a/pom.xml b/pom.xml index 96b4c75..5004a80 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,8 @@ 4.0.0 com.extrawest - Extrawest-OCPI-2.2.1-CPO-Server - 2023.8.27 + extrawest-ocpi-2.2.1-cpo-server + 2023.8.27-SNAPSHOT Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server From 44fdbabb2fda6bd292e1c823362b2350d3de9983 Mon Sep 17 00:00:00 2001 From: "galyna.klymenko" Date: Tue, 29 Aug 2023 18:36:21 +0300 Subject: [PATCH 18/18] Updated version --- .github/workflows/release-publish.yml | 3 --- pom.xml | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 6287390..d66d650 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -1,9 +1,6 @@ name: Publish package to the Maven Central Repository on: - push: - tags: - - v* pull_request: branches: [ main ] diff --git a/pom.xml b/pom.xml index 5004a80..96b4c75 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,8 @@ 4.0.0 com.extrawest - extrawest-ocpi-2.2.1-cpo-server - 2023.8.27-SNAPSHOT + Extrawest-OCPI-2.2.1-CPO-Server + 2023.8.27 Extrawest-OCPI-2.2.1-CPO-Server Extrawest-OCPI-2.2.1-CPO-Server