From 91a3c7de2f2c81f3ee4be5546d78e3e29a9825a2 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 17:45:46 +1000 Subject: [PATCH 01/22] add documents of Code of Conduct, Code Owners and Security --- CODEOWNERS | 3 ++ CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ SECURITY.md | 28 ++++++++++ 3 files changed, 159 insertions(+) create mode 100644 CODEOWNERS create mode 100644 CODE_OF_CONDUCT.md create mode 100644 SECURITY.md diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..4b66db0 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,3 @@ +# Repository CODEOWNERS + +@3dwardCh3nG \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e964f15 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +edward@cheng.sydney. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..028608a --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,28 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +|---------|--------------------| +| v1.x.x | :white_check_mark: | + +## Reporting a Vulnerability + +If you find a security vulnerability affecting any of our supported projects, please +email [edward@cheng.sydney](mailto:edward@cheng.sydney), rather than opening a public issue on GitHub. After receiving +the initial report, we will endeavor to keep you informed of the progress towards a fix and full announcement. We may +ask you for additional information. You are also welcome to propose a patch or solution. + +Report security bugs in third-party modules to the person or team maintaining the module. + +## Coordinated Disclosure + +We aim to patch confirmed vulnerabilities within 30 days or less, disclosing the details of those vulnerabilities when a +patch is published. We ask that you refrain from sharing your report with others while we work on our patch. + +We may want to coordinate an advisory with you to be published simultaneously with the patch, but you are also welcome +to self-disclose after 90 days if you prefer. We will never publish information about you or our communications with you +without your permission. From 8f95a3baf327d71fafe900aadab2dc088b39073a Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 17:46:35 +1000 Subject: [PATCH 02/22] gitingnore .idea folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2f43530..10b4ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ buildNumber.properties .project # JDT-specific (Eclipse Java Development Tools) .classpath +/.idea/ From 3815a8927ef534d8bd85bf3ab63e41a550ad3819 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 18:09:45 +1000 Subject: [PATCH 03/22] adding super pom with latest dependency versions --- pom.xml | 229 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..7d48a89 --- /dev/null +++ b/pom.xml @@ -0,0 +1,229 @@ + + + 4.0.0 + + sydney.cheng + ec-super-bom + 1.0.0-SNAPSHOT + pom + ec-super-bom + + + + MIT License + https://www.opensource.org/licenses/mit-license.php + + + + + Edward Cheng + edward@cheng.sydney + cheng.sydney + https://3dwardch3ng.github.io/ + + + + scm:git:git://github.com/3dwardch3ng/ec-super-pom.git + scm:git:ssh://github.com:3dwardch3ng/ec-super-pom.git + https://github.com/3dwardch3ng/ec-super-pom/tree/main + + + GitHub + https://github.com/3dwardch3ng/ec-super-pom/issues + + + + + 3.3.3 + 2023.0.3 + 20240303 + 1.1.0 + + 5.11.0 + 5.12.0 + + 3.4.0 + 3.8.0 + 3.8.0 + 3.3.1 + 3.13.0 + 3.6.0 + 3.4.2 + 3.3.1 + 3.4.0 + 3.2.5 + 3.7.1 + 3.1.3 + 3.1.3 + 3.1.1 + 3.20.0 + 3.7.0 + 3.1.0 + 0.8.12 + 4.0.0.4121 + 1.2.1 + 1.7.0 + + jacoco + reuseReports + ${project.basedir}/../target/site/jacoco/jacoco.xml + java + **/config/* + 3dwardch3ng + https://sonarqube.cluster.edward.sydney + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot-dependencies.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud-dependencies.version} + pom + import + + + org.json + json + ${json.version} + + + com.knuddels + jtokkit + ${jtokkit.version} + + + + org.junit + junit-bom + ${junit-bom.version} + + + org.mockito + mockito-bom + ${mockito-bom.version} + + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + ${maven-clean-plugin.version} + + + org.apache.maven.plugins + maven-dependency-plugin + ${maven-dependency-plugin.version} + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-assembly-plugin.version} + + + org.apache.maven.plugins + maven-install-plugin + ${maven-install-plugin.version} + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + org.apache.maven.plugins + maven-release-plugin + ${maven-release-plugin.version} + + + org.apache.maven.plugins + maven-site-plugin + ${maven-site-plugin.version} + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin.version} + + + org.apache.maven.plugins + maven-antrun-plugin + ${maven-antrun-plugin.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + org.codehaus.mojo + properties-maven-plugin + ${properties-maven-plugin.version} + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging-maven-plugin.version} + + + + + \ No newline at end of file From 2f3d719953d91fe1cfa16d2c670ea87f9971c9c6 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 18:12:19 +1000 Subject: [PATCH 04/22] adding issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/custom.md | 10 ++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/custom.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..48d5f81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,10 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From dce8ac0eb77a8b9f8333090cbd488eb94cfad1f0 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 18:29:15 +1000 Subject: [PATCH 05/22] setup maven settings and github action pipilines for publish --- .../workflows/build-and-publish-release.yml | 49 +++++++++++++++++++ .../workflows/build-and-publish-snapshot.yml | 40 +++++++++++++++ .mvn/settings.xml | 23 +++++++++ 3 files changed, 112 insertions(+) create mode 100644 .github/workflows/build-and-publish-release.yml create mode 100644 .github/workflows/build-and-publish-snapshot.yml create mode 100644 .mvn/settings.xml diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml new file mode 100644 index 0000000..38366c8 --- /dev/null +++ b/.github/workflows/build-and-publish-release.yml @@ -0,0 +1,49 @@ +name: RELEASE - Build and Publish +on: + workflow_dispatch: + +jobs: + build-and-publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + packages: write + name: Build and Publish + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v3.13.0 + with: + distribution: zulu + java-version: 17 + - name: Config Git + run: | + git config --global user.email "edward@cheng.sydney" + git config --global user.name "3dwardch3ng" + git config --global core.autocrlf input + - name: Start release + run: mvn gitflow:release-start -B -DpushRemote=true -DallowSnapshots=true + - name: Maven Publish + env: + GITHUB_ACTOR: '3dwardch3ng' + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NEXUS_USERNAME: 'edward' + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + DEPLOYMENT_REPOSITORY_ID: ${{ secrets.DEPLOYMENT_REPOSITORY_ID }} + SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} + RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} + run: | + mvn -X -B deploy -P publish \ + --settings=${{ github.workspace }}/.mvn/settings.xml + - name: Finish release + run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true + env: + GITHUB_ACTOR: 3dwardch3ng + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + - uses: actions/upload-artifact@v3.1.3 + if: always() + with: + name: Java Artifacts + path: ${{ github.workspace }}/**/target/*.* \ No newline at end of file diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml new file mode 100644 index 0000000..e21841d --- /dev/null +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -0,0 +1,40 @@ +name: SNAPSHOT - Build and Publish +on: + workflow_dispatch: + push: + branches: + - develop + +jobs: + build-and-publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + packages: write + name: Build and Publish + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v3.13.0 + with: + distribution: zulu + java-version: 17 + - name: Maven Publish + env: + GITHUB_ACTOR: '3dwardch3ng' + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NEXUS_USERNAME: 'edward' + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + DEPLOYMENT_REPOSITORY_ID: ${{ secrets.DEPLOYMENT_REPOSITORY_ID }} + SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} + RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} + run: | + mvn -X -B deploy -P publish \ + --settings=${{ github.workspace }}/.mvn/settings.xml + - uses: actions/upload-artifact@v3.1.3 + if: always() + with: + name: Java Artifacts + path: ${{ github.workspace }}/**/target/*.* \ No newline at end of file diff --git a/.mvn/settings.xml b/.mvn/settings.xml new file mode 100644 index 0000000..a585242 --- /dev/null +++ b/.mvn/settings.xml @@ -0,0 +1,23 @@ + + + + publish + + maven-snapshots::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + maven-releases::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + + + + + + github + ${env.GITHUB_ACTOR} + ${env.GITHUB_TOKEN} + + + nexus + ${env.NEXUS_USERNAME} + ${env.NEXUS_PASSWORD} + + + \ No newline at end of file From eb61b29906c4940e1834b72472de6a48fbd64ba8 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 18:32:57 +1000 Subject: [PATCH 06/22] fixing pipeline of maven deploy --- .github/workflows/build-and-publish-release.yml | 4 +++- .github/workflows/build-and-publish-snapshot.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 38366c8..9ddbed6 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -35,7 +35,9 @@ jobs: SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | - mvn -X -B deploy -P publish \ + mvn -X -B deploy \ + -Daether.checksums.algorithms="MD5,SHA-1,SHA-256,SHA-512" \ + -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index e21841d..afb59fe 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -31,7 +31,9 @@ jobs: SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | - mvn -X -B deploy -P publish \ + mvn -X -B deploy \ + -Daether.checksums.algorithms="MD5,SHA-1,SHA-256,SHA-512" \ + -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 if: always() From a97494ad007d0ae92e6ab86b0aa281091b99ec3e Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 23:04:30 +1000 Subject: [PATCH 07/22] update settings --- .mvn/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index a585242..15cc350 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -3,8 +3,8 @@ publish - maven-snapshots::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} - maven-releases::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} From 19034d2daccc88f9db68b7b8826a5c98e0cc15e6 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 23:07:01 +1000 Subject: [PATCH 08/22] Update maven checksum param --- .github/workflows/build-and-publish-release.yml | 2 +- .github/workflows/build-and-publish-snapshot.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 9ddbed6..4c65cdd 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -36,7 +36,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -Daether.checksums.algorithms="MD5,SHA-1,SHA-256,SHA-512" \ + -DcreateChecksum=true \ -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index afb59fe..42c1034 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -32,7 +32,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -Daether.checksums.algorithms="MD5,SHA-1,SHA-256,SHA-512" \ + -DcreateChecksum=true \ -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 From bf50c6764f703b52fe760b35264d012d1a30dfe9 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 23:23:07 +1000 Subject: [PATCH 09/22] Update maven checksum param --- .github/workflows/build-and-publish-release.yml | 1 - .github/workflows/build-and-publish-snapshot.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 4c65cdd..ced3251 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -36,7 +36,6 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -DcreateChecksum=true \ -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index 42c1034..202fd9f 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -32,7 +32,6 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -DcreateChecksum=true \ -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 From 85af9ac70418240aa76090bd3bd1560286ac67d3 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 23:36:41 +1000 Subject: [PATCH 10/22] single thread for maven-deploy-plugin --- .github/workflows/build-and-publish-release.yml | 2 +- .github/workflows/build-and-publish-snapshot.yml | 5 +++-- .mvn/settings.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index ced3251..c577b62 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -36,7 +36,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P publish \ + -P home-lab \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index 202fd9f..73eab1f 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -31,8 +31,9 @@ jobs: SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | - mvn -X -B deploy \ - -P publish \ + mvn -X -B deploy \ + -P home-lab \ + -Dmaven.artifact.threads=1 \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 if: always() diff --git a/.mvn/settings.xml b/.mvn/settings.xml index 15cc350..73c28e6 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -1,7 +1,7 @@ - publish + home-lab ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} From 5e10be82ee06bb2609f13958c12f75c26d878d1a Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 06:23:37 +1000 Subject: [PATCH 11/22] update settings --- .github/workflows/build-and-publish-release.yml | 3 ++- .github/workflows/build-and-publish-snapshot.yml | 2 +- .mvn/settings.xml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index c577b62..9542350 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -36,7 +36,8 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P home-lab \ + -P homelab \ + -Dmaven.artifact.threads=1 \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index 73eab1f..9b35ac6 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -32,7 +32,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P home-lab \ + -P homelab \ -Dmaven.artifact.threads=1 \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 diff --git a/.mvn/settings.xml b/.mvn/settings.xml index 73c28e6..fa7e873 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -1,7 +1,7 @@ - home-lab + homelab ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} From a0068e289cddc95e7774d67baaeb5957dce4e39e Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 06:41:41 +1000 Subject: [PATCH 12/22] update settings --- .mvn/settings.xml | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index fa7e873..cca1e03 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -2,18 +2,39 @@ homelab - - ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} - ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} - + + + nexus-snapshot + Home Lab Nexus Snapshot + + false + + + true + always + warn + + ${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + default + + + nexus-release + Home Lab Nexus Release + + true + always + warn + + + false + + ${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + default + + - - github - ${env.GITHUB_ACTOR} - ${env.GITHUB_TOKEN} - nexus ${env.NEXUS_USERNAME} From b2c53f23c11563d60888256b4e5cf723741fb810 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 06:48:36 +1000 Subject: [PATCH 13/22] update settings --- .mvn/settings.xml | 7 ++++++- pom.xml | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index cca1e03..a1bc617 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -36,7 +36,12 @@ - nexus + nexus-snapshot + ${env.NEXUS_USERNAME} + ${env.NEXUS_PASSWORD} + + + nexus-release ${env.NEXUS_USERNAME} ${env.NEXUS_PASSWORD} diff --git a/pom.xml b/pom.xml index 7d48a89..f2a6aab 100644 --- a/pom.xml +++ b/pom.xml @@ -100,17 +100,23 @@ com.knuddels jtokkit ${jtokkit.version} + pom + import org.junit junit-bom ${junit-bom.version} + pom + import org.mockito mockito-bom ${mockito-bom.version} + pom + import From ae5aed963a32e6ad810dfdee3ae3755e7d139376 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:09:19 +1000 Subject: [PATCH 14/22] update settings --- .../workflows/build-and-publish-release.yml | 1 - .../workflows/build-and-publish-snapshot.yml | 1 - .mvn/settings.xml | 41 +++---------------- 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 9542350..0520af7 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -37,7 +37,6 @@ jobs: run: | mvn -X -B deploy \ -P homelab \ - -Dmaven.artifact.threads=1 \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index 9b35ac6..ee61434 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -33,7 +33,6 @@ jobs: run: | mvn -X -B deploy \ -P homelab \ - -Dmaven.artifact.threads=1 \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 if: always() diff --git a/.mvn/settings.xml b/.mvn/settings.xml index a1bc617..11b5360 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -2,46 +2,15 @@ homelab - - - nexus-snapshot - Home Lab Nexus Snapshot - - false - - - true - always - warn - - ${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} - default - - - nexus-release - Home Lab Nexus Release - - true - always - warn - - - false - - ${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} - default - - + + ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + - nexus-snapshot - ${env.NEXUS_USERNAME} - ${env.NEXUS_PASSWORD} - - - nexus-release + nexus ${env.NEXUS_USERNAME} ${env.NEXUS_PASSWORD} From f3d1e5cf8990892a8a382593d5da94d96f582499 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:13:29 +1000 Subject: [PATCH 15/22] update profile name --- .github/workflows/build-and-publish-release.yml | 2 +- .github/workflows/build-and-publish-snapshot.yml | 2 +- .mvn/settings.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 0520af7..ced3251 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -36,7 +36,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P homelab \ + -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index ee61434..df27587 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -32,7 +32,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P homelab \ + -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 if: always() diff --git a/.mvn/settings.xml b/.mvn/settings.xml index 11b5360..f09bff1 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -1,7 +1,7 @@ - homelab + publish ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} From 1c67a88aba1f42fac3fb059320d57cfe1a8b582e Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:17:46 +1000 Subject: [PATCH 16/22] update maven settings --- .mvn/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index f09bff1..7be4cbd 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -3,8 +3,8 @@ publish - ${env.DEPLOYMENT_REPOSITORY_ID}::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} - ${env.DEPLOYMENT_REPOSITORY_ID}::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + nexus::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + nexus::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} From ed7f528bb65d5d75e8f8e17961773549a7caa436 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:20:18 +1000 Subject: [PATCH 17/22] update maven settings --- .github/workflows/build-and-publish-snapshot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index df27587..202fd9f 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -31,8 +31,8 @@ jobs: SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | - mvn -X -B deploy \ - -P publish \ + mvn -X -B deploy \ + -P publish \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 if: always() From 831b323947060ff60b031b56f021b72d7191b86f Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:22:48 +1000 Subject: [PATCH 18/22] update maven settings --- .mvn/settings.xml | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index 7be4cbd..a1bc617 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -1,16 +1,47 @@ - publish - - nexus::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} - nexus::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} - + homelab + + + nexus-snapshot + Home Lab Nexus Snapshot + + false + + + true + always + warn + + ${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + default + + + nexus-release + Home Lab Nexus Release + + true + always + warn + + + false + + ${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + default + + - nexus + nexus-snapshot + ${env.NEXUS_USERNAME} + ${env.NEXUS_PASSWORD} + + + nexus-release ${env.NEXUS_USERNAME} ${env.NEXUS_PASSWORD} From 5398c194432ee9dc1511b24cfc0822ffeb9eace1 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:23:16 +1000 Subject: [PATCH 19/22] update maven settings --- .github/workflows/build-and-publish-release.yml | 2 +- .github/workflows/build-and-publish-snapshot.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index ced3251..0520af7 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -36,7 +36,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P publish \ + -P homelab \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index 202fd9f..4ac6a4c 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -32,7 +32,7 @@ jobs: RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | mvn -X -B deploy \ - -P publish \ + -P homelab \ --settings=${{ github.workspace }}/.mvn/settings.xml - uses: actions/upload-artifact@v3.1.3 if: always() From 5cda198771c681f15b75c7f5a6063f2ac7dfb598 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 07:55:41 +1000 Subject: [PATCH 20/22] update maven settings --- .mvn/settings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index a1bc617..03ef155 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -2,6 +2,10 @@ homelab + + nexus-snapshot::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL} + nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + nexus-snapshot From 9221c4af8170fdba4026071dfe993be1397c5374 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 08:07:59 +1000 Subject: [PATCH 21/22] update maven settings --- .mvn/settings.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.mvn/settings.xml b/.mvn/settings.xml index 03ef155..cfee85b 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -7,6 +7,16 @@ nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL} + + nexus-central + Home Lab Nexus Maven Central + + true + warn + + ${env.NEXUS_CENTRAL_REPOSITORY_URL} + default + nexus-snapshot Home Lab Nexus Snapshot From da54c22d2ad07aa17214d0936858600d8a80145b Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Thu, 29 Aug 2024 11:19:38 +1000 Subject: [PATCH 22/22] update pipelines --- .github/workflows/build-and-publish-release.yml | 9 ++------- .github/workflows/build-and-publish-snapshot.yml | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 0520af7..c5198e8 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -35,16 +35,11 @@ jobs: SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | - mvn -X -B deploy \ + mvn -B deploy \ -P homelab \ --settings=${{ github.workspace }}/.mvn/settings.xml - name: Finish release run: mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true env: GITHUB_ACTOR: 3dwardch3ng - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - - uses: actions/upload-artifact@v3.1.3 - if: always() - with: - name: Java Artifacts - path: ${{ github.workspace }}/**/target/*.* \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build-and-publish-snapshot.yml b/.github/workflows/build-and-publish-snapshot.yml index 4ac6a4c..218ba1b 100644 --- a/.github/workflows/build-and-publish-snapshot.yml +++ b/.github/workflows/build-and-publish-snapshot.yml @@ -31,11 +31,6 @@ jobs: SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }} RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }} run: | - mvn -X -B deploy \ + mvn -B deploy \ -P homelab \ - --settings=${{ github.workspace }}/.mvn/settings.xml - - uses: actions/upload-artifact@v3.1.3 - if: always() - with: - name: Java Artifacts - path: ${{ github.workspace }}/**/target/*.* \ No newline at end of file + --settings=${{ github.workspace }}/.mvn/settings.xml \ No newline at end of file