Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build project with java 11. #9795

Closed
sleeperdeep opened this issue Feb 7, 2024 · 2 comments · Fixed by #9807
Closed

Unable to build project with java 11. #9795

sleeperdeep opened this issue Feb 7, 2024 · 2 comments · Fixed by #9807
Labels
bug Bug report

Comments

@sleeperdeep
Copy link
Contributor

Describe the bug
Unable to build project with java 11.

Desktop (please complete the following information):

  • Distributor ID: Ubuntu
  • Description: Ubuntu 22.04.3 LTS
  • Release: 22.04
  • Codename: jammy

FAILURE: Build failed with an exception.

To Reproduce
Steps to reproduce the behavior:

  1. Install sdkman.
  2. Install java 11.0.22-ms.
  3. Choose current java: sdk current java 11.0.22-ms.
  4. Run ./gradlew :metadata-ingestion:installDev

Unexpected behavior

  1. sdkman is installed.
  2. Install java 17.0.10-ms.
  3. Choose current java: sdk current java 17.0.10-ms.
  4. Run ./gradlew :metadata-ingestion:installDev
    -->>
    Success

Screenshots
https://datahubproject.io/docs/developers/
изображение

Logs

root@DESKTOP-0MT53I1:/datahub# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
root@DESKTOP-0MT53I1:/datahub# sdk current java

Using java version 11.0.22-ms
root@DESKTOP-0MT53I1:/datahub# ./gradlew :metadata-ingestion:installDev
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/8.0.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'datahub'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1.
     Required by:
         project :
      > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.2' but:
          - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
          - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 11)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
          - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
          - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
          - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
          - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 11)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
2 actionable tasks: 2 up-to-date
root@DESKTOP-0MT53I1:/datahub# sdk use java 17.0.10-ms

Using java version 17.0.10-ms in this shell.
root@DESKTOP-0MT53I1:/datahub# ./gradlew :metadata-ingestion:installDev
Daemon will be stopped at the end of the build gle-use Daemon process will be forked. See https://docs.gradle.org/8.0.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.

> Configure project :datahub-frontend
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :datahub-upgrade
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :docker
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :smoke-test
Root directory:  /datahub

> Configure project :docker:datahub-ingestion
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :docker:datahub-ingestion-base
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :docker:elasticsearch-setup
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :docker:kafka-setup
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :docker:mysql-setup
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :docker:postgres-setup
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :metadata-jobs:mae-consumer-job
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :metadata-jobs:mce-consumer-job
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :metadata-service:configuration
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Configure project :metadata-service:war
fullVersion=aa98f48.dirty
cliMajorVersion=aa98f48
version=aa98f48-SNAPSHOT

> Task :li-utils:mainDestroyStaleFiles SKIPPED
:li-utils:mainDestroyStaleFiles task is a NO-OP task.

> Task :li-utils:mainCopyPdscSchemas SKIPPED
:li-utils:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-events:mxe-schemas:mainDestroyStaleFiles SKIPPED
:metadata-events:mxe-schemas:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-events:mxe-schemas:mainCopyPdscSchemas SKIPPED
:metadata-events:mxe-schemas:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-events:mxe-schemas:testDestroyStaleFiles SKIPPED
:metadata-events:mxe-schemas:testDestroyStaleFiles task is a NO-OP task.

> Task :metadata-events:mxe-schemas:testCopyPdscSchemas SKIPPED
:metadata-events:mxe-schemas:testCopyPdscSchemas task is a NO-OP task.

> Task :metadata-events:mxe-schemas:renameNamespace
./rename-namespace.sh: 3: Bad substitution

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 18s
32 actionable tasks: 7 executed, 2 from cache, 23 up-to-date
@sleeperdeep sleeperdeep added the bug Bug report label Feb 7, 2024
@hsheth2
Copy link
Collaborator

hsheth2 commented Feb 9, 2024

@sleeperdeep if you select "next" in the version selector, you'll see the docs have been updated to show that we depend on Java 17.

@sleeperdeep
Copy link
Contributor Author

@hsheth2 Great! Before DataHub Developer's Guide & DataHub Developer's Guide pages have different Java version requirements. Now it` more clearer. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants