jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

no support multiple NO_PROXY variable on maven

Open Nathan770 opened this issue 1 year ago • 0 comments

Describe the bug

When configuring the NO_PROXY environment variable with multiple URLs, Maven does not respect the configuration. According to the Maven documentation [here], Maven uses a pipe (|) as the delimiter. However, the JFrog CLI, as detailed in their [documentation], uses a comma (,). This discrepancy may cause issues with how NO_PROXY is interpreted by different tools.

Current behavior

When setting the NO_PROXY environment variable with two URLs, such as NO_PROXY='google.com,<ARTIFACTORY_URL>', I observe the following log entry: [pool-1-thread-2] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {}->http://localhost:8888->http://<ARTIFACTORY_URL>][total available: 3; route allocated: 3 of 10; total allocated: 3 of 10] However, when the NO_PROXY variable is configured with only one URL, like NO_PROXY='<ARTIFACTORY_URL>', the log entry changes to: [pool-1-thread-2] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {}->http://<ARTIFACTORY_URL>][total/ available: 1; route allocated: 3 of 10; total allocated: 3 of 10]

Reproduction steps

I use the following pipeline in both cases the only change is the value inside the NO_PROXY pipeline { agent any tools { jfrog 'jfrog-cli' maven 'mvn' } environment { NO_PROXY = 'google.com,<ARTIFACTORY_URL>' } stages { stage ('proxy') { steps { sh 'echo $NO_PROXY' } } stage ('Clone') { steps { git url: 'https://github.com/jfrog/project-examples.git' } } stage('Maven config') { steps { jf 'mvn-config --repo-resolve-releases=global-mvn --repo-resolve-snapshots=global-mvn --repo-deploy-releases=global-mvn --repo-deploy-snapshots=global-mvn' } } stage('Deploy') { steps { jf 'mvn clean install -X -f maven-examples/maven-jib-example --build-name=maven-build --build-number $BUILD_NUMBER' } } stage('Publish Build Info') { steps { jf 'rt bp maven-build $BUILD_NUMBER' } } } }

Expected behavior

The JFrog CLI supports multiple URLs as NO_PROXY

JFrog CLI version

2.62.1

Operating system type and version

Java 3.9.8

JFrog Artifactory version

7.90.5

JFrog Xray version

NA

Nathan770 avatar Aug 05 '24 12:08 Nathan770