cstamas commented on issue #11575:
URL: https://github.com/apache/maven/issues/11575#issuecomment-3669941083

   > Look likes `nisse` plugins set manually `requiredJavaVersion` to `[8,) ` - 
I hope that simple value as `8` without range will be the same and should works.
   
   Yes, in fact many Maveniverse plugin do this:
   
https://github.com/maveniverse/nisse/blob/17ae7c40cf7927b1f92c033d87ac36f0a6650f4a/plugin3/pom.xml#L111-L112
   
   Defaults are set in parent:
   
https://github.com/maveniverse/parent/blob/5237b598c3d37d4c7e74465bcee8ad09e43f15c0/pom.xml#L116-L125
   
   Obviously, `requiredBuildtime*` ones are fed to enforcer to give meaningful 
errors if someone tries to build project with wrong Java or Maven.
   
   The `requiredRuntime*` are in case of Maven Plugins fed into 
maven-plugin-plugin. In case of extensions, they are filtered 
https://github.com/maveniverse/nisse/blob/17ae7c40cf7927b1f92c033d87ac36f0a6650f4a/extension3/src/main/filtered-resources/runtime-requirements.properties
 and used by this 
https://github.com/maveniverse/maven-shared/blob/20c8359bddcea1b82d2ed0f82e7c2646fb0b4902/extension/src/main/java/eu/maveniverse/maven/shared/extension/RuntimeRequirementEnforcerLifecycleParticipant.java
   
   Again, the reason is following: to have meaningful error messages.
   
   For example: attempt to use project using Nisse (runtime req: maven 3.8+ 
java 8) with Maven 3.6.3:
   ```
   $ mvn -V verify
   Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
   Maven home: /home/cstamas/.sdkman/candidates/maven/3.6.3
   Java version: 1.8.0_462, vendor: Temurin, runtime: 
/home/cstamas/.sdkman/candidates/java/8.0.462-tem/jre
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "6.17.12-300.fc43.x86_64", arch: "amd64", family: 
"unix"
   [INFO] Maveniverse Nisse 0.6.3 loaded
   [INFO] Nisse injecting 23 properties into User Properties
   [INFO] Scanning for projects...
   [INFO] No need for inlining
   [WARNING] eu.maveniverse.maven.nisse:extension3 runtime requirements are not 
fulfilled:
   [WARNING] * Unsupported Maven version 3.6.3; supported versions are [3.8,)
   [ERROR] eu.maveniverse.maven.nisse:extension3 cannot operate in this 
environment: adapt your environment for requirements
   [ERROR] Runtime requirements are not fulfilled -> [Help 1]
   [ERROR] 
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR] 
   [ERROR] For more information about the errors and possible solutions, please 
read the following articles:
   [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
   $ 
   ```
   


-- 
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]

Reply via email to