Configuring a proxy in the maven setting file

 Overview

In version 6.0.0, Talend Studio uses Maven to build job. At start up, the Talend Studio will check the status of the maven jars required for building job. If necessary, Talend studio will try to download them automatically from the Internet. If the Maven jars are not downloaded successfully, you may get an error when building job or the archive file may just not be created without any error.

If you are behind a proxy, you need to configure its access in the maven setting file to ensure that the maven jars are downloaded successfully. This article demonstrates how to configure proxy in the maven setting file.

Environment

This article is only for v6.0.0. Since v6.0.1, the Maven repository is delivered natively with the Talend Studio and already contains all Maven jars required.
However with 6.1 a new parameter was introduced for advanced users. See Changing the maven repository location.

Resolution

  1. In Talend Studio, Click Windows > Preferences > Maven > User Settings, .



  2. Click 'Open File' to open the maven_user_settings.xml file
  3. In the maven setting file, add the following snippet, as shown in https://maven.apache.org/settings.html#Proxies

    <?xml version="1.0" encoding="UTF-8"?>
         
    <proxies>
     <proxy>
     <id>myproxy</id>
     <active>true</active>
     <protocol>http</protocol>
     <host>proxy.somewhere.com</host>
     <port>8080</port>
     <username>proxyuser</username>
     <password>somepassword</password>
     <nonProxyHosts>*.google.com|ibiblio.org</nonProxyHosts>
     </proxy>
     </proxies>
      
    </settings>
  4. Save the file, and restart Talend Studio.

 

Changing the maven repository location

By default, all artifacts are stored locally to the studio (or the commandline)

If need arises, you may want to change the location of the Maven repository to a remote location based on the user setting.

To do so, simply change maven.repository=local to maven.repository=global. In this case, artifacts will then be stored in <user>/.m2, which will then requires the user to have admin rights.

Version history
Revision #:
1 of 1
Last update:
‎04-13-2017 08:57 PM
Updated by:
 
Labels (1)
Contributors