Proximity

Proximity is in function somewhere between http-proxy and proactive-mirror. Proximity is not HTTP Proxy!

One of it's primary use is as Java web application to serve as maven proxy on our company's intranet. As for reducing outgoing traffic (caching central and other maven repos), aggregating more repositories (reducing project config) with acting as one logical repository and for publishing in-house and other external maven artifacts which are not uploadable to ibiblio (like commercial projects, J2EE Jars, etc...).

See a Quick Start for Proximity

Visit Proximity WIKI for WIKI and issue tracking.

Proximity features in brief

  • 2-in-1 - With Proximity you can host your own private repo while proxying other repositories and have all the benefits of local (read FAST) repository access.
  • Maintenance Jobs - Jobs for regular maintenance tasks, like reindexing, stale Maven SNAPSHOT removal, etc. The Job engine used in Proximity is Quartz. You can easily add new jobs by implementing pure Quartz Jobs, or use the provided abstract class.
  • Access control - Proximity is well suited for corporate deployments, since it has extensible and configurable AccessManager. Proximity has various AccessManager and AccessDecisionVoter implementations out-of-the-box. Some examples: IP based access restriction, HTTPS access only with client certificate verification and access management based on it. Access control may be configured on Proximity level and on repository level independently.
  • HTTP, HTTPS and HTTP Proxy support - On it's front, Proximity is unaware is it serving artifacts over plain HTTP or HTTPS (it is container setup, eg. Tomcat). On it's back Proximity Remote Peer is powered with Jakarta Commons HttpClient thus has all the capabilities that Commons HttpClient has. HttpClient configuration is fully exposed through Spring context, allowing easy reconfiguration (like http proxy setup). Furthermore, by employing custom front-ends (the Servlet controller class) and appropriate AccessControl class Proximity is ready to fit any specific needs for authorization (authentication is left to container!).
  • Locally reusable proxy storage - The local storage of defined repositories are complete on-demand-mirrors of real remote repositories, thus usable for republishing (eg. using simple HTTP server. But you will share only the currently downloaded artifacts then).
  • Aggregating, but in a smart way - It is able to host multiple repositorties, and depending on config, they may or may not be proxied remote repositories. Proximity may be used to serve private artifacts (those not uploadable to central due to their licence) as well on local network only. Still, Proximity tracks and organizes downloaded artifacts separatly, following the origin of the artifact and not mixing them together.
  • Piping - Thanx to smart aggregation, Proximity is able to form a pipe of it's instances, thus for example on corporate network you may have one central Proximity on a machine with allowed fast outbound traffic, and multiple instances on local subnetworks where no direct outbound traffic is possible. Proximity will all way down to last instance in pipe follow and keep artifacts in separate storage, following their originating repository. Moreover, you will have to publish in house artifacts only in one place.
  • Fresh as needed - Proximity can be persistent or not, as configured. Moreover, Proximity recognizes the following kinds of items: Maven Snapshots, Maven2 POMs, Maven2 metadata and the rest is "just" artifact. All of these kinds have independent timeout configuration. Thus, every of these item kinds can be: never updated once downloaded, always updated on request or timeouted. These are independent settings (per kind).
  • Fast searches - With time, your Proximity storage will grow. Proximity uses Apache Lucene as it's indexer to provide fast searches on repositories.
  • Reusable software - Proximity Core is transport and J2EE technology unaware, this webapp you see is just a front-end for Proximity implemented using Springframework, Velocity and two controller class.
  • Extensible - Proximity Core is extensible and usable in many different ways and containers. The author have used it in Spring framework container (this webapp actually) and in Codehaus Plexus container (together with embedded Maven2), SAS and/or Danube.

Using Proximity as corporate Maven proxy

See corporate environment for full description about Proximity usage in such environment. The Proximity has the following features, that enables it to act as Maven-aware caching proxy:
  • With pluggable proxying logic it is able to handle maven artifacts in "maven-way" (there is a Logic implementation out-of-the-box)
  • It is possible to define more remote repositories, thus Proximity is aggregating these repositores and also is caching the and reduces outbound traffic.
  • The flexibility to define repositories allows administrator to include a local only repository to publish in-house artifacts, or other commercial artifacts that are not found or ibiblio or other mainstream maven repo.
  • Proximity is able to cope with multiple different repositories using non-aggregating reposes (see repository relocation alias prefixing).
In contrast to existing maven proxy implementations:
  • Proximity Core is transport and environment independent (no javax.* deps) and embeddable in any environment (one example is PX Webapp + Spring).
  • Ultimately flexible, see configuration.
  • Flexible logic implementations. Some repo may have different retrieval logic, as per Repos configuration allows.
  • Not fighting against WAR deployment (I need WAR, since one Tomcat already runs in my office).
Proximity consists of PX Core module, which is environment and transport independent, so it is capable to run in J2SE and J2EE environment too. The Maven1/2 awareness is added by new module called PX Core Maven that contains Px Maven bindings. The PX Webapp is a thin module (2 classes + some Velocity templates!) based on Spring IoC framework and it's MVC implementation, and makes the Proximity Servlet implementation.