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

Fails to build due to Java incompatibility #1

Open
sproctor opened this issue Mar 4, 2024 · 1 comment
Open

Fails to build due to Java incompatibility #1

sproctor opened this issue Mar 4, 2024 · 1 comment

Comments

@sproctor
Copy link

sproctor commented Mar 4, 2024

I guess the jpos snapshot version isn't in a great state.

$ gradle run
> Task :jar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jar'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve org.jpos:jpos:3.0.0-SNAPSHOT.
     Required by:
         project :
      > No matching variant of org.jpos:jpos:3.0.0-SNAPSHOT:20240223.202237-12 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally but:
          - Variant 'apiElements' capability org.jpos:jpos:3.0.0-SNAPSHOT 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 21 and the consumer needed a component for use during runtime, compatible with Java 17
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'javadocElements' capability org.jpos:jpos:3.0.0-SNAPSHOT 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 environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
          - Variant 'runtimeElements' capability org.jpos:jpos:3.0.0-SNAPSHOT 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 21 and the consumer needed a component, compatible with Java 17
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'sourcesElements' capability org.jpos:jpos:3.0.0-SNAPSHOT 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 environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)

* 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 418ms
3 actionable tasks: 3 executed
@4r73m190r0s
Copy link

I solved this error by going to IntelliJ IDEA Settings → Build, Execution, Deployment → Gradle → and set "Gradle JVM" to SDK 17 (which I have installed)

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

No branches or pull requests

2 participants