GitHub as Maven Repository

Discussions

News: GitHub as Maven Repository

  1. GitHub as Maven Repository (4 messages)

    Most of us use Maven as a build automation tool. One of most important section are those related to dependencies. Typically projects have dependencies to external libraries like SpringHibernate, Slf4j, ... which are downloaded from External Maven Repository Servers like mvnrepositoryibiblio or from own Internal Maven Repository Server using JFrog or Nexus. This scenario but does not cover all possible cases.

    It is uncommon that your project requires an external library that is not present in any repository, but can occurs, and in these cases are where you use company Internal Maven Repository to upload these artifacts. But this is not always possible, and typical example is when you are writing in a blog about a beta library and it is not present in any repository, and you want to add this library to pomfile. Would be perfect if Maven could resolve these dependencies too without packaging them into project. So what can we do?

     

    There are some alternatives:

    - packaging .class files of external library into your project, so they are packaged as project files.

    - asking library creators to upload Milestones to public repositories.

    - create your own public Maven Repository.

    - using GitHub?

     

    Using GitHub, YES!!. You can configure your GitHub account as Maven Repository. In my case I always upload sample code to GitHub. Why not creating a GitHub project that acts as a Maven Repository and poms referencing to this repository?

     

    Read Full Post

    Threaded Messages (4)

  2. Alternatively[ Go to top ]

    Other alternatives are: Nexus or Artifactory (although I have better experiences with Nexus)
  3. Alternatively[ Go to top ]

    Hi John, yes you are right, when you are at work the best strategy is use Nexus or JFrog, but in my case I want that other people (external to Nexus net) can download my project. For this reason I need a public repository, for this reason the Github approach is not a bad idea.

  4. Sonatype.[ Go to top ]

    What about Sonatype? The provide free maven repository that is synched into Maven central.

    https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

  5. Sonatype.[ Go to top ]

    It is garbage. I've had the displeasure of using it and frankly it sucks. Then again maven sucks hard to begin with, so it's more of the same.