diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3439901..01716f0 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -12,7 +12,7 @@ on: jobs: compile: name: Compile Java Module - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 defaults: run: working-directory: ./java @@ -23,6 +23,11 @@ jobs: distribution: temurin java-version: 8 cache: maven + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_CENTRAL_TOKEN + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Compile Tests run: make compile compile-test diff --git a/.github/workflows/publish-java-package.yml b/.github/workflows/publish-java-package.yml index 54c3277..2eb2e8e 100644 --- a/.github/workflows/publish-java-package.yml +++ b/.github/workflows/publish-java-package.yml @@ -7,6 +7,9 @@ on: required: true type: string +env: + IS_CICD: 1 + jobs: compile: name: Publish the Java Package to Maven Central diff --git a/java/Makefile b/java/Makefile index 938acff..dc8f989 100644 --- a/java/Makefile +++ b/java/Makefile @@ -1,20 +1,25 @@ +mvn = mvn + +ifdef IS_CICD + mvn = mvn --no-transfer-progress +endif + + clean: - mvn clean + $mvn clean verify: - mvn verify - mvn javadoc:test-javadoc - mvn javadoc:test-aggregate - mvn javadoc:test-jar - mvn javadoc:test-resource-bundle + ${mvn} verify + ${mvn} javadoc:test-javadoc javadoc:test-aggregate javadoc:test-aggregate-jar javadoc:test-jar javadoc:test-resource-bundle + ${mvn} javadoc:jar javadoc:aggregate javadoc:aggregate-jar javadoc:resource-bundle fix: - mvn com.coveo:fmt-maven-plugin:format - echo y | mvn javadoc:fix - echo y | mvn javadoc:test-fix + ${mvn} com.coveo:fmt-maven-plugin:format + echo y | ${mvn} javadoc:fix + echo y | ${mvn} javadoc:test-fix compile: - mvn compile + ${mvn} compile compile-test: - mvn test-compile + ${mvn} test-compile diff --git a/java/src/main/java/com/scylladb/alternator/AlternatorLiveNodes.java b/java/src/main/java/com/scylladb/alternator/AlternatorLiveNodes.java index 081e583..fe6b378 100644 --- a/java/src/main/java/com/scylladb/alternator/AlternatorLiveNodes.java +++ b/java/src/main/java/com/scylladb/alternator/AlternatorLiveNodes.java @@ -302,7 +302,7 @@ public void checkIfRackAndDatacenterSetCorrectly() throws FailedToCheck, Validat } /** - * Returns true if remote node supports /localnodes?rack=\<\>\&dc=\. If it can't + * Returns true if remote node supports /localnodes?rack=`rack`&dc=`datacenter`. If it can't * conclude by any reason it throws {@link * com.scylladb.alternator.AlternatorLiveNodes.FailedToCheck} *