sdedic opened a new issue, #6368:
URL: https://github.com/apache/netbeans/issues/6368

   ### Apache NetBeans version
   
   Apache NetBeans 18
   
   ### What happened
   
   Clone and open 
https://github.com/oracle-quickstart/oci-micronaut/tree/main/src/api
   This project contains the main part (`app`) that is configured to 
`targetCompatibility = JavaVersion.VERSION_11`; but as a test implementation 
dependency, it uses `tck` that is not configured at all.
   
   As a result, `./gradlew build` fails when run on **Java 17, but probably on 
any Java > 11** with the following message:
   ```
   * What went wrong:
   Could not determine the dependencies of task ':app:test'.
   > Could not resolve all task dependencies for configuration 
':app:testRuntimeClasspath'.
      > Could not resolve project :tck.
        Required by:
            project :app
         > No matching variant of project :tck was found. The consumer was 
configured to find a runtime of a library compatible with Java 11, packaged as 
a jar, preferably optimized for standard JVMs, and its dependencies declared 
externally but:
             - Variant 'apiElements' capability 
micronaut.mushop:tck:2.0.0-SNAPSHOT declares a library, packaged as a jar, and 
its dependencies declared externally:
                 - Incompatible because this component declares an API of a 
component compatible with Java 17 and the consumer needed a runtime of a 
component compatible with Java 11
                 - Other compatible attribute:
                     - Doesn't say anything about its target Java environment 
(preferred optimized for standard JVMs)
             - Variant 'mainSourceElements' capability 
micronaut.mushop:tck:2.0.0-SNAPSHOT declares a component, and its dependencies 
declared externally:
                 - Incompatible because this component declares a component of 
category 'verification' 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 11)
                     - Doesn't say anything about its elements (required them 
packaged as a jar)
                     - Doesn't say anything about its usage (required a runtime)
             - Variant 'runtimeElements' capability 
micronaut.mushop:tck:2.0.0-SNAPSHOT declares a runtime of a library, 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 its target Java environment 
(preferred optimized for standard JVMs)
             - Variant 'testResultsElementsForTest' capability 
micronaut.mushop:tck:2.0.0-SNAPSHOT:
                 - Incompatible because this component declares a component of 
category 'verification' and the consumer needed a library
                 - Other compatible attributes:
                     - Doesn't say anything about how its dependencies are 
found (required its dependencies declared externally)
                     - 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 11)
                     - Doesn't say anything about its elements (required them 
packaged as a jar)
                     - Doesn't say anything about its usage (required a runtime)
   
   ```
   
   The message is not available from Priming build, it just fails silently - 
but the project remains in "has problems" state.
   
   The expected outcome would be a message to the user that either the project 
is broken, or the Java runtime configured for the project is not appropriate.
   
   ### How to reproduce
   
   Clone and open 
https://github.com/oracle-quickstart/oci-micronaut/tree/main/src/api
   
   Run a priming build on "app" project.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Ubuntu 22.02
   
   ### JDK
   
   JDK17
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to