Loading
Krishan Chawla

Technical Lead

Software Engineer

Automation Expert

Tech Enthusiast

  • About
  • Resume
  • Awards
  • Projects
  • Blogs
  • Contact
Krishan Chawla

Technical Lead

Software Engineer

Automation Expert

Tech Enthusiast

Download Resume

Recent Posts

  • How to Configure MySQL Master-Slave Replication for Data Redundancy and Scalability
  • Java Spring Boot Docker Deployment with Oracle Made Simple
  • Oracle XE In Docker On Windows: An Ultimate Guide
  • How to quickly Instrument JaCoCo agent with WebLogic
  • How to setup JaCoCo Code Coverage with Maven Project

Recent Comments

No comments to show.

Archives

  • March 2025
  • December 2024
  • May 2024
  • April 2024

Categories

  • Blog
  • Quick Byte
Blog Post

How to download maven dependencies behind organization proxy

10 April, 2024 Quick Byte by Krishan Chawla
How to download maven dependencies behind organization proxy

Introduction

Whether you’re a Software Developer or an Automation Engineer, Maven is a widely used build tool today. One common challenge in some environments is the inability to download Maven dependencies due to organizational proxies. In this article, I’ll share a quick guide on how to download Maven dependencies behind your organization’s proxy.

Proxy Configuration

Let’s understand how to setup proxy configuration. This configuration can be done in settings.xml file.

  • Open your settings.xml file located in <user_home>/.m2 directory. If the file does not exist, you can create it.
  • Add the following <proxies> configuration inside the <settings> element, replacing proxy.example.com and 8080 with your server’s hostname and port:
<proxies>
    <proxy>
        <id>example-proxy</id>
        <active>true</active>
        <protocol>http</protocol>
        <host>proxy.example.com</host>
        <port>8080</port>
        <!-- Optional: Proxy username and password -->
        <!--<username>proxy-username</username>-->
        <!--<password>proxy-password</password>-->
        <!--<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>-->
    </proxy>
</proxies>

If your organization requires authentication, uncomment the <username> and <password> tags and provide your credentials. Additionally, you can specify hosts that should bypass the proxy in the <nonProxyHosts> tag.

Test the Configuration:

To test the proxy configuration, run a Maven command such as mvn clean install for a Maven project. Maven should now be able to download dependencies through the proxy.

Post Views: 14
Share:
Tags: Corporate ProxyDevelopment ToolsjavaJava DevelopmentmavenMaven DependenciesMaven in Corporate EnvironmentMaven Proxy SetupMaven RepositoryMaven SetupMaven TroubleshootingNetwork ConfigurationNetwork IssuesproxyProxy ConfigurationProxy Settings
Related Posts
Java Spring Boot Docker Deployment With Oracle
Java Spring Boot Docker Deployment with Oracle Made Simple

Table of Content Introduction In today’s DevOps-driven world, containerization has become a crucial aspect of deploying applications efficiently. Docker enables…

Setup Jacoco Code Coverage with Weblogic
How to quickly Instrument JaCoCo agent with WebLogic

JaCoCo is an open-source library created by the EclEmma team for measuring and reporting code coverage in an application. It…

Post navigation

Next
Write a comment Cancel Reply