diff --git a/.config/checkstyle/checkstyle.xml b/.config/checkstyle/checkstyle.xml new file mode 100644 index 0000000..506f37c --- /dev/null +++ b/.config/checkstyle/checkstyle.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/checkstyle/suppressions.xml b/.config/checkstyle/suppressions.xml new file mode 100644 index 0000000..16d385e --- /dev/null +++ b/.config/checkstyle/suppressions.xml @@ -0,0 +1,6 @@ + + + + diff --git a/.github/workflows/checkBuild.yml b/.github/workflows/checkBuild.yml index c23ac42..c7b324d 100644 --- a/.github/workflows/checkBuild.yml +++ b/.github/workflows/checkBuild.yml @@ -6,10 +6,16 @@ on: branches: [ develop ] paths-ignore: - '**.md' + - '.config/**' + - '.idea/**' + - 'assets/**' pull_request: branches: [ develop ] paths-ignore: - '**.md' + - '.config/**' + - '.idea/**' + - 'assets/**' env: PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }} @@ -21,14 +27,14 @@ jobs: strategy: matrix: - java: [17] + java: [17, 21] distribution: [temurin] steps: - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java }} @@ -56,8 +62,29 @@ jobs: fi - name: Upload demo files - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: demo-files-java-${{ matrix.java }} path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar if-no-files-found: error + + code-style: + runs-on: ubuntu-latest + + strategy: + matrix: + java: [17] + distribution: [temurin] + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.distribution }} + java-version: ${{ matrix.java }} + cache: 'maven' + + - name: Run Checkstyle + run: mvn -B checkstyle:check -P checkstyle -T2C diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2ae4d2..e03a52d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' @@ -101,7 +101,7 @@ jobs: Add the following lines to your pom: ```XML - com.xdev-software + software.xdev ${{ env.PRIMARY_MAVEN_MODULE }} ${{ steps.version.outputs.release }} @@ -120,7 +120,7 @@ jobs: git pull - name: Set up JDK Apache Maven Central - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml java-version: '17' distribution: 'temurin' @@ -133,8 +133,8 @@ jobs: - name: Publish to Apache Maven Central run: mvn -B deploy -Possrh env: - MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} @@ -152,7 +152,7 @@ jobs: git pull - name: Setup - Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' @@ -163,7 +163,7 @@ jobs: working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} - name: Upload licenses - Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dependencies-licenses path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/site diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index f7c82af..a255e87 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -6,14 +6,16 @@ on: branches: [ develop ] paths-ignore: - '**.md' + - '.config/**' + - '.idea/**' - 'assets/**' - - 'config/**' pull_request: types: [opened, synchronize, reopened] paths-ignore: - '**.md' + - '.config/**' + - '.idea/**' - 'assets/**' - - 'config/**' env: SONARCLOUD_ORG: ${{ github.event.organization.login }} @@ -31,20 +33,20 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 17 - name: Cache SonarCloud packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index d2a8e2f..4e883f8 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK OSSRH - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml distribution: 'temurin' java-version: '17' @@ -27,6 +27,6 @@ jobs: run: mvn -B deploy -Possrh working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} env: - MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 8c139da..a325e2b 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -86,9 +86,8 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh_pr_up() { - gh pr create "$@" || gh pr edit "$@" + gh pr create -H "${{ env.UPDATE_BRANCH }}" "$@" || (git checkout "${{ env.UPDATE_BRANCH }}" && gh pr edit "$@") } gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \ - -H "${{ env.UPDATE_BRANCH }}" \ --title "Update from template" \ --body "An automated PR to sync changes from the template into this repo" diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml index f68c212..9a5d4ff 100644 --- a/.idea/checkstyle-idea.xml +++ b/.idea/checkstyle-idea.xml @@ -1,7 +1,7 @@ - 10.1 + 10.12.5 JavaOnlyWithTests true true @@ -13,7 +13,7 @@ (bundled) (bundled) - $PROJECT_DIR$/config/checkstyle/checkstyle.xml + $PROJECT_DIR$/.config/checkstyle/checkstyle.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index ffd40bd..65b8cb4 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -17,6 +17,8 @@ + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index afc2252..9683e4c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ We also encourage you to read the [contribution instructions by GitHub](https:// ### Software Requirements You should have the following things installed: * Git -* Java 17 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/)) +* Java 21 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/)) * Maven ### Recommended setup diff --git a/README.md b/README.md index 4925345..1967520 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,14 @@ -[![Latest version](https://img.shields.io/maven-central/v/com.xdev-software/microstream-afs-ibm-cos?logo=apache%20maven)](https://mvnrepository.com/artifact/com.xdev-software/microstream-afs-ibm-cos) +[![Latest version](https://img.shields.io/maven-central/v/software.xdev/microstream-afs-ibm-cos?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/microstream-afs-ibm-cos) [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/microstream-afs-ibm-cos/checkBuild.yml?branch=develop)](https://github.com/xdev-software/microstream-afs-ibm-cos/actions/workflows/checkBuild.yml?query=branch%3Adevelop) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_microstream-afs-ibm-cos&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_microstream-afs-ibm-cos) # microstream-afs-ibm-cos -A connector for [MicroStream](https://microstream.one/) which allows storing data in -the [IBM Cloud Object Storage](https://www.ibm.com/cloud/object-storage). +A connector for [MicroStream](https://microstream.one/) which allows storing data in the [IBM Cloud Object Storage](https://www.ibm.com/cloud/object-storage). It uses the [IBM-provided Java SDK](https://github.com/IBM/ibm-cos-sdk-java). -The connector works virtually identical to -the [AWS S3 Connector](https://docs.microstream.one/manual/storage/storage-targets/blob-stores/aws-s3.html) of -MicroStream -but for IBM COS instead of AWS S3. +The connector works virtually identical to the [AWS S3 Connector](https://docs.microstream.one/manual/storage/storage-targets/blob-stores/aws-s3.html) of MicroStream but for IBM COS instead of AWS S3. ## Installation diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml deleted file mode 100644 index 710e3e6..0000000 --- a/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/microstream-afs-ibm-cos-demo/pom.xml b/microstream-afs-ibm-cos-demo/pom.xml index b16e334..62c7c4a 100644 --- a/microstream-afs-ibm-cos-demo/pom.xml +++ b/microstream-afs-ibm-cos-demo/pom.xml @@ -1,95 +1,127 @@ - 4.0.0 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.xdev-software - microstream-afs-ibm-cos-demo - 1.0.2-SNAPSHOT - jar + software.xdev + microstream-afs-ibm-cos-demo + 1.0.2-SNAPSHOT + jar - 2023 + 2023 - - XDEV Software - https://xdev.software - + + XDEV Software + https://xdev.software + + + 11 + ${javaVersion} - - - 11 - ${javaVersion} - UTF-8 - UTF-8 - 08.01.01-MS-GA - software.xdev.microstream.App - + UTF-8 + UTF-8 - - - com.xdev-software - microstream-afs-ibm-cos - ${project.version} - + software.xdev.Application - - org.slf4j - slf4j-simple - 2.0.9 - + 08.01.01-MS-GA + - - one.microstream - microstream-storage-embedded - ${one.microstream.version} - - + + + software.xdev + standard-maven-template + ${project.version} + - - ${project.artifactId} + + org.slf4j + slf4j-simple + 2.0.9 + - - - org.apache.maven.plugins - maven-compiler-plugin - 3.11.0 - - ${maven.compiler.release} - - -proc:none - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.6.0 - - - - ${mainClass} - - - true - - - - jar-with-dependencies - - false - - - - make-assembly - package - - single - - - - - - + + one.microstream + microstream-storage-embedded + ${one.microstream.version} + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.12.1 + + ${maven.compiler.release} + + -proc:none + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.6.0 + + + + ${mainClass} + + + true + + + + jar-with-dependencies + + false + + + + make-assembly + package + + single + + + + + + + + + checkstyle + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.3.1 + + + com.puppycrawl.tools + checkstyle + 10.12.7 + + + + ../.config/checkstyle/checkstyle.xml + + + + + check + + + + + + + + diff --git a/microstream-afs-ibm-cos/pom.xml b/microstream-afs-ibm-cos/pom.xml index 1192ae5..a454244 100644 --- a/microstream-afs-ibm-cos/pom.xml +++ b/microstream-afs-ibm-cos/pom.xml @@ -1,246 +1,264 @@ - 4.0.0 - - com.xdev-software - microstream-afs-ibm-cos - 1.0.2-SNAPSHOT - jar - - microstream-afs-ibm-cos - microstream-afs-ibm-cos - https://github.com/xdev-software/microstream-afs-ibm-cos - - - https://github.com/xdev-software/microstream-afs-ibm-cos - https://github.com/xdev-software/microstream-afs-ibm-cos.git - - - 2023 - - - XDEV Software - https://xdev.software - - - - - XDEV Software - XDEV Software - https://xdev.software - - - - - - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - - 11 - ${javaVersion} - UTF-8 - UTF-8 - 2.13.2 - 08.01.01-MS-GA - - - - - - central - https://repo.maven.apache.org/maven2 - - false - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.1.0 - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - - - - com.ibm.cos - ibm-cos-java-sdk-core - ${ibm.java.sdk.version} - - - com.ibm.cos - ibm-cos-java-sdk-s3 - ${ibm.java.sdk.version} - - - - one.microstream - microstream-afs-blobstore - ${one.microstream.version} - - - one.microstream - microstream-configuration - ${one.microstream.version} - - - - - - - central - https://repo.maven.apache.org/maven2 - - false - - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - - com.mycila - license-maven-plugin - 4.3 - - - ${project.organization.url} - - - -
com/mycila/maven/plugin/license/templates/APACHE-2.txt
- - src/main/java/** - src/test/java/** - -
-
-
- - - first - - format - - process-sources - - -
- - - org.apache.maven.plugins - maven-compiler-plugin - 3.11.0 - - ${maven.compiler.release} - - -proc:none - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.6.0 - - - attach-javadocs - verify - - jar - - - - - true - none - - - - org.apache.maven.plugins - maven-source-plugin - 3.3.0 - - - attach-sources - verify - - jar-no-fork - - - - -
-
- - - ossrh - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.1.0 - - - sign-artifacts - verify - - sign - - - - - - --pinentry-mode - loopback - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - ossrh - https://oss.sonatype.org/ - - 30 - true - - - - - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + software.xdev + microstream-afs-ibm-cos + 1.0.2-SNAPSHOT + jar + + microstream-afs-ibm-cos + microstream-afs-ibm-cos + https://github.com/xdev-software/microstream-afs-ibm-cos + + + https://github.com/xdev-software/microstream-afs-ibm-cos + https://github.com/xdev-software/microstream-afs-ibm-cos.git + + + 2023 + + + XDEV Software + https://xdev.software + + + + + XDEV Software + XDEV Software + https://xdev.software + + + + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + 11 + ${javaVersion} + + UTF-8 + UTF-8 + + 2.13.2 + 08.01.01-MS-GA + + + + + com.ibm.cos + ibm-cos-java-sdk-core + ${ibm.java.sdk.version} + + + com.ibm.cos + ibm-cos-java-sdk-s3 + ${ibm.java.sdk.version} + + + + one.microstream + microstream-afs-blobstore + ${one.microstream.version} + + + one.microstream + microstream-configuration + ${one.microstream.version} + + + + + + + central + https://repo.maven.apache.org/maven2 + + false + + + + + + + + central + https://repo.maven.apache.org/maven2 + + false + + + + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + com.mycila + license-maven-plugin + 4.3 + + + ${project.organization.url} + + + +
com/mycila/maven/plugin/license/templates/APACHE-2.txt
+ + src/main/java/** + src/test/java/** + +
+
+
+ + + first + + format + + process-sources + + +
+ + + org.apache.maven.plugins + maven-compiler-plugin + 3.12.1 + + ${maven.compiler.release} + + -proc:none + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.6.3 + + + attach-javadocs + verify + + jar + + + + + true + none + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + verify + + jar-no-fork + + + + +
+
+ + + ossrh + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://s01.oss.sonatype.org/ + + 30 + true + + + + + + + checkstyle + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.3.1 + + + com.puppycrawl.tools + checkstyle + 10.12.7 + + + + ../.config/checkstyle/checkstyle.xml + + + + + check + + + + + + + +
diff --git a/pom.xml b/pom.xml index 942f68d..b157525 100644 --- a/pom.xml +++ b/pom.xml @@ -1,29 +1,48 @@ - 4.0.0 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.xdev-software - microstream-afs-ibm-cos-root - 1.0.2-SNAPSHOT - pom + software.xdev + microstream-afs-ibm-cos-root + 1.0.2-SNAPSHOT + pom - - XDEV Software - https://xdev.software - + + XDEV Software + https://xdev.software + - - microstream-afs-ibm-cos - microstream-afs-ibm-cos-demo - + + microstream-afs-ibm-cos + microstream-afs-ibm-cos-demo + - - - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - repo - - + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + checkstyle + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.3.1 + + true + + + + + +