After some searching I’ve found a mechanism to store all of the heroku dependencies on Dropbox as opposed to paying someone to host my maven repository (though this has cost me 3 hours to get working right). It is likely that this would work for S3 or any other storage mechanism provided you set up the appropriate file structure and upload the files manually, but I was looking for something that would work automagically and came up with this after reading through some blogs and documents.
1) Have your project publish out a local directory structure for your dependency. Add this to the maven pom.xml of the project whose dependency you are trying to publish.
Make sure you have already create your mvn-repository directory on the Dropbox server.
Note here that I am using OSX. If you are using Windows your URL will look something like: file:///C:/Users/foobar/Dropbox/Public/mvn-repository
2) Run “mvn deploy” for that project and maven will happily create the repository structure for you. If you’re using Dropbox (or similar) your repository will also be happily sync’d to the cloud servers.
For all practical purposes you now have a maven repository running. You just need to figure out how to access it.
3) Open your dropbox folder and create a file at the same level as the mvn-repository folder. Copy the public link the put in the browser/notepad or whatever.
The URL that will represent your mvn repository is all the text before my_file.txt (the link will be different for every dropbox user). In this case the url is https://dl.dropbox.com/u/8209345/mvn-repository/
4) In the project that needs to include this dependency, create a new repository that points to this Dropbox location from the pom.xml of the project that wants to include the dependency:
5) Be sure that your Dropbox session has finished synchronizing and then run the appropriate commands for your maven project. Your project will now pull the dependency from Dropbox.
Note: This is not the intended use-case for Dropbox and it is possible that this may do the service some harm so follow the same approach and push those directories up to S3 or similar and you will have a cheap/free maven repository without the nastiness of having published dependencies locally, an approach which will eventually bite you when you integrate with other tools or developers.