gnodet commented on code in PR #1597:
URL: https://github.com/apache/maven/pull/1597#discussion_r1670863134


##########
apache-maven/src/assembly/maven/conf/settings.xml:
##########
@@ -29,14 +29,14 @@ under the License.
  |
  |                 -s /path/to/user/settings.xml
  |
- |  2. Global Level. This settings.xml file provides configuration for all 
Maven
+ |  2. System Level. This settings.xml file provides configuration for all 
Maven

Review Comment:
   One possibility would be to remove the explicit levels and just use list of 
files.
   For example:
   ```
   maven.install.conf = ${maven.conf}       # this property should not be 
defined 
   maven.user.conf    = ${user.home}/.m2
   maven.project.conf = ${session.rootDirectory}/.mvn
   
   #
   # Toolchains
   #
   # Define the default three levels for toolchains
   maven.install.toolchains = ${maven.install.conf}/toolchains.xml
   maven.project.toolchains = ${maven.project.conf}/toolchains.xml
   maven.user.toolchains    = ${maven.user.conf}/toolchains.xml
   # List of parsed toolchains, each file is prepended with `?` to make it 
optional
   maven.toolchains = ?${maven.install.toolchains} \
                      ?${maven.project.toolchains} \
                      ?${maven.user.toolchains}
   
   #
   # Extensions
   #
   maven.install.extensions = ${maven.install.conf}/extensions.xml
   maven.project.extensions = ${maven.project.conf}/extensions.xml
   maven.user.extensions = ${maven.user.conf}/extensions.xml
   # List of extensions.xml files to parse
   maven.extensions = ?${maven.install.extensions} \
                      ?${maven.project.extensions} \
                      ?${maven.user.extensions}
   ```
   
   This would solve the problem and even allow the user to switch precedence 
very easily, as the list order would be the one used.
   
   The `-gt` flag would set override the `maven.install.toolchains`.
   



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to