I’m sick of it. I’m sick of the fact that Maven developers have this absolute allergy to ease of use. Here’s a use case that I’ve had about a hundred time each month over the past four years.
- Set up a new development machine
- Install Maven
- Configure your Maven instance to hit a URL in Nexus
If you use Maven, and if you use a repository manager, this is the best practice. It doesn’t matter if you’ve standardized on Nexus or Artifactory, you configure your build to hit a single repository manager, and if your build needs an additional repository you manage these additional sources of artifacts at the repository manager level. Repository Managers give you a single place to upload third-party artifacts, cache proxied artifacts from public repository, and start to enforce standards.
Both JFrog’s and Sonatype’s business depend on making it incredibly easy to set up this particular configuration variable. So, how is this done in Maven? Using Maven Settings – right, it’s easy just drop a 40 line XML file into a hidden directory off of your home directory. What do those 40 lines of XML do? Easy, they define two dummy repositories, a global mirror, and a default profile.
That’s what I’m sick of both documenting and support. What should be the easiest thing in the world is a process that involves copying a cryptic XML file, customizing a URL, and then explaining how the settings.xml file also abstracts the server credentials into a separate servers element.
Most people don’t care enough to read past the download and install directions and now they are being asked to throw around XML. It doesn’t work, and because of this not as many people use a repository manager as should.
80% of the people that use Central, don’t bother to use a repository manager. I think I know why. It isn’t that installing a repository is difficult, configuring your build tool to use one is a royal pain… We’ve got to figure out a better way.
How about an environment variable? Want to configure your Maven builds to use a Nexus URL for all remote requests? Just set the maven_proxy environment variable.
I’m creating a branch and implementing this because I’m sick of writing these instructions. Onward.