junit-team / junit5

✅ The 5th major version of the programmer-friendly testing framework for Java and the JVM

Home Page:https://junit.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

junit-jupiter:5.9.1- Not able to build with UAT.- (GPG signing failure)

shivsrivastava opened this issue · comments

I am building code of junit-jupiter:5.9.1 with UAT enabled and trying ./gradlew test command. Here are my tried versions.

Java version - 8, 11, 17
Gradle command - ./gradlew test
Gradle build command - ./gradlew build -x test

Steps to reproduce

I am facing this error/issue . Also attached log.
build-junit-jupiter-5.9.1-2024-02-28-09-32-43-014-6275255597.txt

"[28 09:38:49.578] | > Task :junit-bom:signMavenPublication FAILED
[28 09:38:49.578] | gpg: directory '/root/.gnupg' created
[28 09:38:49.578] | gpg: keybox '/root/.gnupg/pubring.kbx' created
[28 09:38:49.578] | gpg: no default secret key: No secret key
[28 09:38:49.578] | gpg: signing failed: No secret key"

Why are you building 5.9.1 yourself? I'm afraid the Gradle build logic in that version always requires signing when building non-snapshot versions. The error message indicates that you have no secret keys in your GPG keyring. If you generate one by running gpg --gen-key (more detailed instructions), it should work.

With

5.9.1

We are having requirement of building code with UT pass. Please let me know how to do it with specified JDK version and Maven.
As per my understanding, UT cases( Test cases) should pass without providing any secret keys.

Please update.

You should be able to skip signing but run all tests using this command:

$ ./gradlew test -x signMavenPublication

You should be able to skip signing but run all tests using this command:

$ ./gradlew test -x signMavenPublication

I do not want to skip any module/submodule. Requirement is to have all test cases passed.

Please update on this ticket.

I tried mention jdk and mvn version's but still facing issue

Multiple times i tried but getting same issue for Maven 3.9.6

I have tried whatever the mention JDK version but still failing.

I do not want to skip any module/submodule. Requirement is to have all test cases passed.

This does not skip any module, only the signing of artifacts

I do not want to skip any module/submodule. Requirement is to have all test cases passed.

This does not skip any module, only the signing of artifacts

Tried with same but not able to proceed. Please help.

From your log: ./gradlew build -x test -q --stacktrace
Replace (as suggested) with: ./gradlew build -x signMavenPublication

Happiness follows suit.

From your log: ./gradlew build -x test -q --stacktrace Replace (as suggested) with: ./gradlew build -x signMavenPublication

Happiness follows suit.

Sure, will check and update.