Adding dependent jars to the Bixo Maven repository

bixolabs edited this page Sep 13, 2010 · 5 revisions

Occasionally Bixo has a dependency on a jar that doesn’t exist in the Maven central repository, or any other public Maven repositories.

When that happens, we put it into the Bixo Maven repository. This page describes how that all works, and the steps for adding a new jar.

Note that this process is ONLY required if you’re committing code to Bixo, and add a dependency on one of this missing 3rd party jars. Regular users who are creating projects based on Bixo, and need additional “missing” 3rd party jars, should use whatever approach works best for them to resolve their custom jar dependencies. For example, Sonatype has an open source Maven repo system called Nexus that’s worked well.

Bixo Maven Repository

The Bixo Maven repository’s URL is http://bixo.github.com/repo. One day I hope to have this working as http://openbixo.org/repo, but we’ve run into some issues with CNAMEs, so that’s not valid yet.

The repository is unfortunately not browsable, unlike the Maven central repository and others. The reason why is because this Maven repository is actually just a special GitHub repository, called “bixo.github.com”. When GitHub sees a repository name called .github.com, and matches the GitHub account name, then GitHub publishes the contents of that repository via the http://.github.com URL. But when it does this publishing, it doesn’t automatically add a directory index file if no index.html file exists.

Adding a Jar to the Bixo Maven Repository

  1. Clone the bixo.github.com repository – e.g.
    git clone git@github.com:bixo/bixo.github.com.git bixo-pages
  2. Copy the jar, pom, and various other Maven-related files (sha1) to your local repository
  3. Add, commit, and push the changes
    • cd <path to bixo-pages repository>
    • git add repo/
    • git commit -am "Adding 3rd party jar xxx"
    • git push

The fun part comes in getting the right Maven files set up properly…

Creating Maven files

  1. Download the 3rd party jar that you need to add.
  2. Fix up the jar name, if necessary. The format needs to be
    <name>-<version>-<optional intermediate release info>.jar
    . For example,
    cascading-core-1.1-WIP-116.jar
    , where “WIP-116” is the intermediate release info.
  3. Create an appropriate pom.xml file. At a minimum this should have the groupId, artifactId and version set properly. It’s great if you can also add any dependencies.
  4. Install the jar into your bixo-pages repository.

mvn deploy:deploy-file -Dfile=<path to jar file> -DpomFile=<path to pom file> -Durl=file:<path to bixo-pages repo>/repo

For example,

mvn deploy:deploy-file -Dfile=/Users/kenkrugler/Tools/cascading-wip-1.1-116-hadoop-0.19.0+/cascading-core-1.1-WIP-116.jar -DpomFile=/Users/kenkrugler/Tools/cascading-wip-1.1-116-hadoop-0.19.0+/cascading-core-1.1-WIP-116.pom -Durl=file:/Users/kenkrugler/git/bixo-pages/repo

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.