Hosting Maven Repository for third-party jars on Git (Bitbucket/Github)


Not all of the jars are in the maven central repository, or in any publicly accessible repository.


Solution bellow is somewhat outdated; for the most up to date one see this post.

Maven repository is just a collection of folders/files so could be easily hosted on git (I prefer BitBucket; but the same instructions with minor modifications are applicable to GitHub as well).  p.s. also see alternatives section towards the end.

Install jars in a local maven repository.

Make a directory e.g. maven-repo/repository

cd into maven-repo

execute the following (replacing the arguments by the ones that are relevant to your jar):

mvn install:install-file -DgroupId=com.rapid_i -DartifactId=rapidminer -Dversion=5.3.006 -Dfile=/Users/neil/Desktop/TMP/mvn1/tmp/rapidminer.jar -Dpackaging=jar -DgeneratePom=true -DlocalRepositoryPath=./repository  -DcreateChecksum=true

Create a git repository (BitBucket/Github) and add jars to it

I created a repository called “maven-repo” under my username; and copied “mave-repo” folder created in a previous step and committed the changes.  (p.s.  SourceTree is awesome; if you don’t want to use command line).  Here is my public maven-repo for rapidminer.

Add repository config to your pom.xml

My pom.xml is bellow; you need to modify it to make it work for you:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""


    <!-- Dependency to jar on Maven Repository on Git-BitBucket -->

    <!-- Maven Repository on Git-BitBucket -->




The method outline above is mostly suitable for hosting third-party jars.  If you want to your jars on maven then this instructions are more appropriate (allows you to use mvn deploy):

This is an alternative of simply dragging along the jars with your project but making them usable by maven (SHOULD BE AVOIDED = MAVEN ANTI-PATTERN; ):



This post provides nice instructions similar to mine; with my modifications including adding checksums; using BitBucket, etc.

similar posts:

Official guide from maven “Guide to deploying 3rd party JARs to remote repository” :

Here is a post on attaching jar to artifact; although not sure how well it works in practice:

Keywords / Search Bread crumbs:

earched for github Checksum validation failed, no checksums available from the repository 11:18pm
  using github as maven repository Checksum… – 11:18pm
  maven: “Checksum validation failed, no… – 11:20pm
Searched for bitbucket maven repository 11:04pm
  How do I release with BitBucket+Git+Maven… – – Viewed 2 times 11:04pm
Searched for pom.xml repository tag 11:01pm
  Maven – Introduction to the POM – 11:01pm
  maven – Should I write repositories in… – 11:01pm
Searched for maven deploy 10:28pm
  Deploy Plugin – Maven – The Apache Software… – – Viewed 2 times
Searched for maven install github 10:28pm
Searched for maven specify artifact jar dependency pom.xml 10:09pm
  Maven – Frequently Asked Technical Questions – 10:09pm
  Add jar-with-dependencies artifact from… – 10:09pm
Searched for maven specify artifact dependency pom.xml 10:08pm
  Maven – POM Reference – 10:08pm
Searched for maven specify metadata artifact dependency 10:08pm
  Maven Dependency plugin – Frequently… – 10:08pm
Searched for maven metadata artifact dependency 10:08pm
  maven in 5 min not working – Stack Overflow – 10:08pm
  maven – Could not find metadata in local… – 10:08pm
Searched for maven-metadata-local.xml dependency 10:06pm
Searched for maven dependency declaration 10:05pm
  Maven – Introduction to the Dependency Mechanism – 10:05pm
Searched for vldocking maven 9:54pm
  Index of /maven2repository/com/vlsolutions/vl… – 9:48pm
  vldocking integration missing in maven?… – 9:48pm
Searched for maven determine version 3rd party jar 9:52pm
  A Programmer’s Journal: How to manage… – 9:52pm
Searched for vldocking mvn 9:49pm
Searched for vldocking jar 9:47pm
  vldocking-3.0.0.jar – vldocking-plus… – 9:48pm
Searched for maven determien jar version 9:47pm
Searched for maven jar naming convention 9:45pm
  Maven – Guide to Naming Conventions – 9:45pm
  Naming convention for Maven Artifacts… – 9:45pm
  Best pratices in naming conventions on… –
Searched for bitbucket maven wagon 7:22pm
  Chrissom – Bitbucket as a maven repository – 7:22pm
  wagon-git – – Viewed 2 times 7:23pm
Searched for maven 3rd party jar pom.xml 7:17pm
  java – maven install and deploy 3rd party… – 7:14pm
  How to add a 3rd party jar – GeoTools… – 7:17pm
  How to use Maven with a Java Application… – 7:17pm
  How to Add Third Party JARs into Maven… – 7:17pm
Searched for upload 3rd party jar artifact to maven 7:09pm
  Maven – Guide to deploying 3rd party… – 7:06pm
  How to Manage Maven Third Party Jars | Javalobby – 7:09pm
Searched for maven upload artifact jar to github 7:03pm
  Hosting a Maven repository on github… – 7:03pm
Searched for mvn install github repository third party jar 6:55pm
  Adding dependent jars to the Bixo Maven… – 6:55pm
  Maven Third Party Repo – Gists – GitHub – 6:55pm
  How to store jars in github based maven… – 6:55pm
  Deploying a third party artifact to a… – 7:42pm
Searched for mvn install github repository 6:55pm
  Use github as maven remote repository… – 6:52pm
  JakeWharton/gms-mvn-install · GitHub – 6:55pm
  Owen Griffin – Releasing Maven projects… – 6:55pm
  Create your own github Maven repository… – 6:55pm
  Christian Kaltepoth’s Blog –
Searched for maven how to host 3rd third party jars that are not in maven repository 6:45pm
  Deploying 3rd-party JARs to Maven Repositorie… – – Viewed 2 times 6:45pm
  Hosting my jars in Github with dependencies… – – Viewed 2 times 6:45pm
  java – easy way to deploy 3rd party dependenc… – 6:45pm
  mvn install 3rd party non-mvn jar that… – 6:45pm
Searched for bitbucket maven 6:33pm
Searched for maven add jar 6:33pm
Searched for Migrating from Ant maven 3 6:33pm
Searched for maven from build.xml 6:33pm
Searched for AWS SDK 6:33pm
Searched for aws promise activity 6:33pm
Searched for dataset pmml 6:33pm
Searched for maven-deploy-plugin 6:26pm
  Deploy Plugin – Maven – The Apache Software… – – Viewed 2 times 6:26pm
  Maven Repository: org.apache.maven.plugins… – 6:27pm
Searched for rapidminer maven 6:10pm
  IntelliJ: AWS Flow Framework (SWF) |… – – Viewed 6 times 6:11pm
Searched for host third party jar on maven 5:28pm
Searched for host thridparty jar on maven 5:27pm
  Deploying 3rd-party JARs to Maven Repositorie… – – Viewed 2 times 5:27pm
  Using GitHub as a personal maven repository… – 5:28pm
Searched for maven s3 5:18pm
  jcaddel/maven-s3-wagon · GitHub – 5:18pm
  Tech Frontlines: Hosting a Maven Repository… – 5:18pm
  Jiaqi’s Blog: Publish Maven site with… – 5:19pm
  HowTo deploy to S3 using maven – Kuali… – 5:19pm
  4.3 Maven Repositories, S3 and Nexus… –
Searched for github host maven repository 5:13pm
  Hosting Maven Repos on Github | cemerick – 5:13pm
  Hosting my jars in Github with dependencies… – – Viewed 2 times 5:13pm
  Github: Deploy your own Maven repos!… – 5:13pm
  Dmitrijs Artjomenko blog: Hosting Ivy… – 5:13pm
Searched for bitbucket maven repository 5:08pm
  How do I release with BitBucket+Git+Maven… – – Viewed 2 times 5:08pm
  Bitbucket Java Project – Jelastic – 5:08pm
  wagon-git – – Viewed 2 times 5:08pm
Searched for bitbucket maven 1:14pm
Searched for maven add jar that is not in repository 1:14pm
Searched for maven add jar 1:14pm
Searched for Migrating from Ant maven 3 1:14pm
Searched for maven import ant build.xml 1:14pm
Searched for maven from build.xml
Searched for bitbucket maven 11:34pm
  Chrissom – Bitbucket as a maven repository – 11:34pm
  Mike’s Site: How to Publish Maven Site… – 11:34pm
Searched for github maven repository 11:32pm
  Hosting a Maven repository on github… – 11:32pm
Searched for dropbox maven 11:31pm
Searched for provide jar for maven repository 11:19pm
  Maven – Guide to installing 3rd party JARs – 11:19pm
Searched for maven add jar that is not in repository 11:11pm
  Maven: Including jar not found in public… – 11:11pm
  java – Adding local jars in maven project… – 11:11pm
  pom.xml – Maven, how to add additional… – 11:11pm
  How to include custom library into maven… – 11:11pm
Searched for maven add jar 11:10pm
Searched for maven launcher 11:04pm
Searched for rapidminer launcher.jar
Searched for Migrating from Ant maven 3 10:31pm
  Best Strategy for Migrating from Apache… – 10:31pm 10:31pm
  Converting a Project from Ant to Maven… – 10:31pm
  How to mavenize a project – Java Forums… – 10:32pm
  Migrating a Project from Ant to Maven… – 10:32pm
Searched for maven import ant build.xml 10:27pm
  Maven 1.x – Migrating from Ant – 10:27pm
Searched for maven from build.xml
Searched for launcher rapidminer vldocking 10:12pm
Searched for launder rapidminer vldocking 10:12pm
Searched for ant to maven3 10:08pm
Searched for ant to maven 10:08pm
  How can I replace Ant with Maven? – Stack… – 10:08pm
  Hildeberto’s Blog: Case Study: Migrating… – 10:08pm
Searched for maven from ant 10:07pm
Searched for convert ant to maven intellij 10:02pm
  Creating and importing Maven projects… – – Viewed 7 times 10:02pm
  IntelliJ – Convert a Java project/module… – 10:02pm
  How to convert maven java project to… – 10:02pm
  IntelliJ IDEA :: Ant and Maven support… –
Searched for convert ant to maven 10:01pm
  How to convert from Ant to Maven in 5… – 10:02pm
  How to convert Ant project to Maven project… – 10:02pm
Searched for javafx xml file 9:57pm
Searched for rapidminer maven 9:50pm
  Features for RapidMiner 5.0 – 9:50pm
Searched for rapidminer beans 9:46pm
  Get some Coffee for free – Writing… – 9:46pm
Searched for rapidminer pom.xml 9:44pm
  dm2e-rapidminer/pom.xml at master ·… – 9:44pm… 9:44pm
Searched for maven rapidminer 9:43pm
  How can I prevent Rapidminer from initializin… – 9:43pm… 9:44pm
  IntelliJ: AWS Flow Framework (SWF) |… – – Viewed 6 times






About Neil Rubens

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Hosting Maven Repository for third-party jars on Git (Bitbucket/Github)

  1. Pingback: Maven accessing private repository on bitbucket | Stackforum

  2. Rammohan says:

    Hi Neil Rubens,

    I have followed the way it is mentioned here to add my own specific dependent project to my own Git-maven repository. The dependent project is successfully placed in GIT maven repository and verified the jar download. It is perfect with the raw jar file but when I use the below pom stuff it is downloading the corrupted jar. In fact I was encountered the same issue with your below configuration as well



Leave a Reply to Rammohan Cancel reply

Your email address will not be published. Required fields are marked *