maven-issues mailing list archives

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


ASF GitHub Bot commented on MNG-6401:

jkatada opened a new pull request #163: [MNG-6401] - Cannot interpolate property in proxy
port of settings.xml
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
    - [x] Make sure there is a [JIRA issue]( filed

          for the change (usually before you start working on it).  Trivial changes like typos
do not 
          require a JIRA issue.  Your pull request should address just this issue, without

          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of
          commit message.
    - [x] Write a pull request description that is detailed enough to understand what the
pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will

          be performed on your pull request automatically.
    - [x] You have run the [Core IT][core-its] successfully.
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement]( if
you are unsure
   please ask on the developers list.
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](
   you have to acknowledge this by using the following check-box.
    - [x] I hereby declare this contribution to be licenced under the [Apache License Version
2.0, January 2004](
    - [x] In any other case, please file an [Apache Individual Contributor License Agreement](

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Cannot interpolate property in proxy port of settings.xml
> ---------------------------------------------------------
>                 Key: MNG-6401
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: Bootstrap &amp; Build
>    Affects Versions: 3.0
>            Reporter: KATADA Junya
>            Priority: Minor
> 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.
> {quote}export
> export MAVEN_PROXY_PORT_INT=18080
> {quote}
> These variables are used in settings.xml for proxy settings.
> {quote}<proxy>
>     <id>my_proxy</id>
>     <active>true</active>
>     <protocol>http</protocol>
>     <host>${env.MAVEN_PROXY_HOST_STRING}</host>
>     <port>${env.MAVEN_PROXY_PORT_INT}</port>
>     <nonProxyHosts>|</nonProxyHosts>
>  </proxy>
> {quote}
> Execute maven-help-plugin to show effective settings.xml.
> {quote}mvn help:effective-settings -X
> {quote}
> The result is as follows.
> {quote}<proxy>
>     <port>0</port>
>     <host></host>
>     <nonProxyHosts>|</nonProxyHosts>
>     <id>my_proxy</id>
> </proxy>
> {quote}
> `${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
> {quote}
> 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