Free Private Maven Repositories on Google App Engine in 5 minutes

Don’t throw your money.

Renaud Cerrato
2 min readJan 15, 2019

While I was CTO at Popsy, we decided at some point to host our internal libraries on private Maven repositories to ease development flows. Since Maven repositories are just plain old web hosting, they shouldn’t cost you an arm and a leg, nor requires you to become a Linux SysAdmin to setup but should ideally need zero maintenance and costs virtually nothing.

Commercial solutions being clearly overpriced for such a 80’s technology, I decided to write my own implementation to leverage Google App Engine free quotas:

  • 5GB of storage
  • 1GB of daily incoming bandwidth
  • 1GB of daily outgoing bandwidth
  • 20,000+ storage ops per day

Moreover, no credit card is required to benefits of the quotas above.

Introduction

The application is meant to be hosted in the Google App Engine standard environment, but minimal changes should be required to port the code to another provider (if required). Artifacts are stored and served to/from Google Cloud Storage.

The application is written in Java and relies on the Jersey framework. The implementation supports the Maven Wagon HTTP transport layer, which is the default implementation when the http scheme is used.

Both Etag and Last-Modified headers are properly set and evaluated when serving artifacts to save bandwidth where applicable.

Installation

Following the instructions in the README below, you’ll be able to run and host your private Maven repositories on the Google Cloud infrastructure at no costs in less than 5 minutes:

The source code above has been made with ❤ and released under the permissive Apache License, so you’re good to go. ️Feel free to clap the publication.

--

--

Renaud Cerrato

Analog at birth but digital by design. Hardcore Android Developer. Linux devotee. Came back once from /dev/null.