maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KATADA Junya (JIRA)" <>
Subject [jira] [Created] (MNG-6401) Cannot interpolate property in proxy port of settings.xml
Date Wed, 02 May 2018 03:00:00 GMT
KATADA Junya created MNG-6401:

             Summary: Cannot interpolate property in proxy port of settings.xml
                 Key: MNG-6401
             Project: Maven
          Issue Type: Bug
          Components: Bootstrap &amp; Build
    Affects Versions: 3.0
            Reporter: KATADA Junya

If you use a property in proxy port of settings.xml, the property is not replaced and the
port number is "0" instead of property value.

My minimal demo about this problem is [here|]. 

In my demo, export two environment variables as follows.
These variables are used in settings.xml for proxy settings.
Execute maven-help-plugin to show effective settings.xml.
{quote}mvn help:effective-settings -X
The result is as follows.

`${env.MAVEN_PROXY_HOST_STRING}` is replaced with ``, 
but `${env.MAVEN_PROXY_PORT_INT}` is not replaced with `18080`.

I found the following WARNING message in console.
{quote}[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unable to parse element 'port', must be an integer (position: END_TAG seen ...<port>${env.MAVEN_PROXY_PORT_INT}</port>...
@12:47) caused by: java.lang.NumberFormatException: For input string: "${env.MAVEN_PROXY_PORT_INT}"
@ /root/.m2/settings.xml, line 12, column 47
I think that the cause of this problem is to parse settings.xml before interpolation.


This message was sent by Atlassian JIRA

View raw message