본문 바로가기

카테고리 없음

'jib.allowInsecureRegistries' of type boolean shouldn't be annotated with @Optional.

해결방법

gradle에서 JIB 버전 1.0.0 에서 3.1.2 로 수정

 

오류 발생했던 상황

다음 명령어 입력. . .

C:\Users\User\백지연\project\demo>gradlew jib

> Task :jib FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Some problems were found with the configuration of task ':jib' (type 'BuildImageTask').

  - In plugin 'com.google.cloud.tools.jib' type 'com.google.cloud.tools.jib.gradle.BuildImageTask' property 'jib.allowInsecureRegistries' of type boolean shouldn't be annotated with @Optional.

    Reason: Properties of primitive type cannot be optional.

    Possible solutions:

      1. Remove the @Optional annotation.

      2. Use the java.lang.Boolean type instead.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#cannot_use_optional_on_primitive_types for more details about this problem.

BUILD FAILED in 3s

5 actionable tasks: 1 executed, 4 up-to-date