Loading
メール配信ドメイン検証状況の確認方法のご案内続きを読む
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

How to manually set the Maven proxy

公開日: Aug 1, 2025
タスク

GOAL

Many times while troubleshooting an issue, you run maven commands from the terminal without Studio IDE opened.
The goal is to configure your Maven app to use a proxy, without using Studio to insert the proxy setting by itself
 
ステップ
The following configuration could be done in the project's pom.xml file, or your personal ~/.m2/settings.xml file
 
<settings>
  <proxies>
   <proxy>
      <id>example-proxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.example.com</host>
      <port>8080</port>
      <username>proxyuser</username>
      <password>somepassword</password>
      <nonProxyHosts>www.domain1.com|*.domain2.com</nonProxyHosts>
    </proxy>
  </proxies>
</settings>

In the previous XML, we configure the Maven app to use the "proxy.example.com:8080" proxy with "username:password" credentials and even omit some domains from the proxy usage

You may test this by running the following command from a project's root folder
 
mvn -X clean package

 
ナレッジ記事番号

001117178

 
読み込み中
Salesforce Help | Article