Guillaume Nodet created MNG-8543:
------------------------------------

             Summary: Clarify profiles usage
                 Key: MNG-8543
                 URL: https://issues.apache.org/jira/browse/MNG-8543
             Project: Maven
          Issue Type: Task
            Reporter: Guillaume Nodet


Profiles are mostly used at built time.

However, there are some use cases for profiles being used at runtime. An 
example is the {{javafx}} POM which have a profile used to add a dependency 
based on the OS name / architecture.

At the same time, file based profiles are also tested when building models for 
dependencies.  This does not make any sense and should be forbidden.

Properties-based profiles should also be more tightly controlled as leaking 
properties to the consumed model can lead to unexpected model changes.

The ModelBuilderRequest now has more context, and we do know if we are 
constructing a built time model or a consumer model (see 
[https://github.com/apache/maven/blob/maven-4.0.0-rc-2/api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderRequest.java#L59-L71]).
  So maybe we should restrict a bit more what we do here ?



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

Reply via email to