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

Guillaume Nodet edited comment on MNG-6603 at 10/22/24 1:00 PM:
----------------------------------------------------------------

With the new {{maven.properties}} introduced in 
[MNG-7914|https://issues.apache.org/jira/browse/MNG-7914], it should be easy to 
change the default config and define an {{MAVEN_XDG}} variable (unset by 
default), which, if present, would change default values to some XDG compatible 
values, else, keep the current values the way they are.

Then, you'd just have to export the {{MAVEN_XDG}} environment variable to 
configure Maven in an XDG compatible way.

The key point is that the syntax supports default values, for example we define:
{code}
maven.repo.central = 
${env.MAVEN_REPO_CENTRAL:-https://repo.maven.apache.org/maven2}
{code}
so that the {{maven.repo.central}} property will be set to the value of the 
{{MAVEN_REPO_CENTRAL}} environment variable if set, else defaults to 
{{https://repo.maven.apache.org/maven2}}.



was (Author: gnt):
With the new {{maven.properties}} introduced in 
[MNG-7914|https://issues.apache.org/jira/browse/MNG-7914], it should be easy to 
change the default config and define an {{MAVEN_XDG}} variable (unset by 
default), which, if present, would change default values to some XDG compatible 
values, else, keep the current values the way they are.

Then, you'd just have to create the {{MAVEN_XDG}} environment variable to 
configure Maven in an XDG compatible way.

> XDG Base Directory Specification support
> ----------------------------------------
>
>                 Key: MNG-6603
>                 URL: https://issues.apache.org/jira/browse/MNG-6603
>             Project: Maven
>          Issue Type: Improvement
>          Components: Settings
>    Affects Versions: 3.6.0
>            Reporter: Julien Nicoulaud
>            Priority: Major
>             Fix For: Issues to be reviewed for 4.x
>
>
> Could Maven please follow the XDG Base Directory Specification for the 
> configuration/data directory on linux?
> More infos here:
>  * [http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html]
>  * [http://www.freedesktop.org/wiki/Software/pyxdg]
>  * [https://wiki.archlinux.org/index.php/XDG_Base_Directory#Support]
>  



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

Reply via email to