[ 
https://issues.apache.org/jira/browse/MRESOLVER-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875414#comment-17875414
 ] 

ASF GitHub Bot commented on MRESOLVER-588:
------------------------------------------

HannesWell commented on PR #539:
URL: https://github.com/apache/maven-resolver/pull/539#issuecomment-2301559183

   >     * the goal of supplier is to provide "baseline" only, and nothing in 
Resolver uses ENV variables
   
   I understand that. But the problem can be and that's why I encountered this 
at all, is that some artifacts cannot be resolved some system properties are 
missing.
   For example without any system-properties, 
org.apache.commons:commons-text:1.12.0 fails to resolve with a 
`ModelBuildingException` saying something like `[ERROR] Failed to determine 
Java version for profile`. In this case the `java.version` property is missing 
and e.g. the `animal-sniffer` profile from the `commons-parent` cannot 
determine if the activation element `<jdk>(,9)</jdk>` is met or not. And since 
properties and env-properties can also be used to activate profiles in general 
and profiles can contain additional dependencies, not having them can influence 
the resolution result.
   A general property activation will probably not fail the resolution if a 
property is missing (I haven't tested it), but the result would still be 
different than in a default maven installation. So the resolver could 
implicitly use env variablies.
   But I cannot tell if the latter already is already out of the scope of the 
baseline?




> Incomplete system properties in SessionBuilderSupplier
> ------------------------------------------------------
>
>                 Key: MRESOLVER-588
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-588
>             Project: Maven Resolver
>          Issue Type: Bug
>          Components: Resolver
>    Affects Versions: 2.0.0
>            Reporter: Hannes Wellmann
>            Priority: Major
>
> The {{SessionBuilderSupplier}} provided for Maven3 sets the java 
> System.properties as systemProperties of the Session to be build.
> [https://github.com/apache/maven-resolver/blob/d13019ce5fa38c0951ca0fb0c62a3f5f1254cffc/maven-resolver-supplier-mvn3/src/main/java/org/eclipse/aether/supplier/SessionBuilderSupplier.java#L72]
> But it does not add environment variables with their key prefixed with 
> {{env.}} like it is for example done in Maven or MIMA:
> [https://github.com/maveniverse/mima/blob/e851dee08706024929f1004e18e3dbd7b3522b36/runtime/standalone-shared/src/main/java/eu/maveniverse/maven/mima/runtime/shared/StandaloneRuntimeSupport.java#L519-L530]
>  
> From looking at the code of the SessionBuilderSupplier for Maven 4, which 
> relys heavily on 
> {{org.apache.maven.repository.internal.MavenSessionBuilderSupplier }}system 
> properties are not set at all.
> My suggestion is to extend the Maven3 SessionBuilderSupplier in 
> Maven-Resolver and in maven4 {{MavenSessionBuilderSupplier to have 
> system-properties and environment variables fully set by default.}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to