Hosting a Maven repository on github
Asked Answered
T

9

337

I have a fork of a small open sourced library that I'm working on github. I'd like to make it available to other developers via maven, but I don't want to run my own Nexus server, and because it's a fork I can't easily deploy it to oss.sonatype.org.

What I'd like to do is to deploy it to github so that others can access it using maven. What's the best way to do this?

Thorman answered 23/12, 2012 at 18:43 Comment(3)
what licensing issues are you facing in OSS Sonatype? Just curious since I use it myself.Mangan
There's a tool that allows you to expose your GitHub repo via maven directly. jitpack.io https://mcmap.net/q/100473/-can-i-use-a-github-project-directly-in-mavenEndless
Github also announced a package registry that supports maven. Currently in public-beta: github.com/features/package-registryNoneffective
T
512

The best solution I've been able to find consists of these steps:

  1. Create a branch called mvn-repo to host your maven artifacts.
  2. Use the github site-maven-plugin to push your artifacts to github.
  3. Configure maven to use your remote mvn-repo as a maven repository.

There are several benefits to using this approach:

  • Maven artifacts are kept separate from your source in a separate branch called mvn-repo, much like github pages are kept in a separate branch called gh-pages (if you use github pages)
  • Unlike some other proposed solutions, it doesn't conflict with your gh-pages if you're using them.
  • Ties in naturally with the deploy target so there are no new maven commands to learn. Just use mvn deploy as you normally would

The typical way you deploy artifacts to a remote maven repo is to use mvn deploy, so let's patch into that mechanism for this solution.

First, tell maven to deploy artifacts to a temporary staging location inside your target directory. Add this to your pom.xml:

<distributionManagement>
    <repository>
        <id>internal.repo</id>
        <name>Temporary Staging Repository</name>
        <url>file://${project.build.directory}/mvn-repo</url>
    </repository>
</distributionManagement>

<plugins>
    <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
            <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
        </configuration>
    </plugin>
</plugins>

Now try running mvn clean deploy. You'll see that it deployed your maven repository to target/mvn-repo. The next step is to get it to upload that directory to GitHub.

Add your authentication information to ~/.m2/settings.xml so that the github site-maven-plugin can push to GitHub:

<!-- NOTE: MAKE SURE THAT settings.xml IS NOT WORLD READABLE! -->
<settings>
  <servers>
    <server>
      <id>github</id>
      <username>YOUR-USERNAME</username>
      <password>YOUR-PASSWORD</password>
    </server>
  </servers>
</settings>

(As noted, please make sure to chmod 700 settings.xml to ensure no one can read your password in the file. If someone knows how to make site-maven-plugin prompt for a password instead of requiring it in a config file, let me know.)

Then tell the GitHub site-maven-plugin about the new server you just configured by adding the following to your pom:

<properties>
    <!-- github server corresponds to entry in ~/.m2/settings.xml -->
    <github.global.server>github</github.global.server>
</properties>

Finally, configure the site-maven-plugin to upload from your temporary staging repo to your mvn-repo branch on Github:

<build>
    <plugins>
        <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>0.11</version>
            <configuration>
                <message>Maven artifacts for ${project.version}</message>  <!-- git commit message -->
                <noJekyll>true</noJekyll>                                  <!-- disable webpage processing -->
                <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
                <branch>refs/heads/mvn-repo</branch>                       <!-- remote branch name -->
                <includes><include>**/*</include></includes>
                <repositoryName>YOUR-REPOSITORY-NAME</repositoryName>      <!-- github repo name -->
                <repositoryOwner>YOUR-GITHUB-USERNAME</repositoryOwner>    <!-- github username  -->
            </configuration>
            <executions>
              <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
              <execution>
                <goals>
                  <goal>site</goal>
                </goals>
                <phase>deploy</phase>
              </execution>
            </executions>
        </plugin>
    </plugins>
</build>

The mvn-repo branch does not need to exist, it will be created for you.

Now run mvn clean deploy again. You should see maven-deploy-plugin "upload" the files to your local staging repository in the target directory, then site-maven-plugin committing those files and pushing them to the server.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building DaoCore 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
...
[INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ greendao ---
Uploaded: file:///Users/mike/Projects/greendao-emmby/DaoCore/target/mvn-repo/com/greendao-orm/greendao/1.3-SNAPSHOT/greendao-1.3-20121223.182256-3.jar (77 KB at 2936.9 KB/sec)
Uploaded: file:///Users/mike/Projects/greendao-emmby/DaoCore/target/mvn-repo/com/greendao-orm/greendao/1.3-SNAPSHOT/greendao-1.3-20121223.182256-3.pom (3 KB at 1402.3 KB/sec)
Uploaded: file:///Users/mike/Projects/greendao-emmby/DaoCore/target/mvn-repo/com/greendao-orm/greendao/1.3-SNAPSHOT/maven-metadata.xml (768 B at 150.0 KB/sec)
Uploaded: file:///Users/mike/Projects/greendao-emmby/DaoCore/target/mvn-repo/com/greendao-orm/greendao/maven-metadata.xml (282 B at 91.8 KB/sec)
[INFO] 
[INFO] --- site-maven-plugin:0.7:site (default) @ greendao ---
[INFO] Creating 24 blobs
[INFO] Creating tree with 25 blob entries
[INFO] Creating commit with SHA-1: 0b8444e487a8acf9caabe7ec18a4e9cff4964809
[INFO] Updating reference refs/heads/mvn-repo from ab7afb9a228bf33d9e04db39d178f96a7a225593 to 0b8444e487a8acf9caabe7ec18a4e9cff4964809
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.595s
[INFO] Finished at: Sun Dec 23 11:23:03 MST 2012
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------

Visit github.com in your browser, select the mvn-repo branch, and verify that all your binaries are now there.

enter image description here

Congratulations!

You can now deploy your maven artifacts to a poor man's public repo simply by running mvn clean deploy.

There's one more step you'll want to take, which is to configure any poms that depend on your pom to know where your repository is. Add the following snippet to any project's pom that depends on your project:

<repositories>
    <repository>
        <id>YOUR-PROJECT-NAME-mvn-repo</id>
        <url>https://github.com/YOUR-USERNAME/YOUR-PROJECT-NAME/raw/mvn-repo/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </repository>
</repositories>

Now any project that requires your jar files will automatically download them from your github maven repository.

Edit: to avoid the problem mentioned in the comments ('Error creating commit: Invalid request. For 'properties/name', nil is not a string.'), make sure you state a name in your profile on github.

Thorman answered 23/12, 2012 at 18:43 Comment(32)
(Note that the preferred way to host maven artifacts is to still use a nexus server. However, using github can work as a lightweight alternative when an existing server or hosting your own is not an easy option. Also, note that you won't be able to browse your maven repository directly. Github does not allow you to browse directory structures when using raw. However, you can always browse the repo by going to your github page and browsing the mvn-repo branch.)Thorman
Note also that this solution will overwrite your previous artifacts every time you deploy. This is appropriate for snapshot repositories, but not for released artifacts. To disable that behavior, set <merge>true</merge> in your site-maven-plugin configuration. If you do that, though, I think you'll have to manually create the mvn-repo branch in github and delete all its files the first time around.Thorman
+1 clever and well presented. My only criticism is that you did not include a link to the Maven plugins site: github.com/github/maven-plugins. Thx I was looking for a way to publish my Maven site to github!Kellie
Alternative approach which perhaps takes care of your versioning problem: cemerick.com/2010/08/24/hosting-maven-repos-on-github. Less elegant, but uses Maven client to publish locally. Perhaps one could encorporate this into a new Maven plugin for git.Kellie
Thanks Mark! Thanks for the link. I did actually include a link to github.com/github/maven-plugins#readme, but it's useful to have it here as well. Also, the cemerick link was a starting point for this solution. It's good stuff, but it doesn't automate the push to github.Thorman
I take back my criticism :-)Kellie
This clever hack seems to work if you own the source to the jar you want to publish, but what if you don't have the source?Powwow
Thanks for this cool little approach @emmby. But as mentioned in the below post, could you please clarify a bit as to how another project's POM would reference the binaries we push to our repo...? Especially, what is it that does into <id> & <url> elements of the repository? Is there any convention there..? Can one test the url to ensure it will work fine...? I was able to create & push the mvn-repo branch for my project onto GitHub. But not clear how to specify the repo-URL & id in the dependent project's POM. (Please refer to my post below). Many thanks.Tedie
Though I have specified the username and password in the settings.xml, while using github as repository the build is not able to download the files. <repositories> <repository> <id>id</id> <url>https://github.com/My-Group/comapny/tree/mvn-repo/</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> </repositories>Baluster
@genthaler made some edits that completely broke this for me. Specifically the distributionManagement section stopped working. I've reverted back to the previous version, but see stackoverflow.com/revisions/14013645/3 if you want to see his revisionsThorman
This approach does not work when Two-Factor authentication is used on github. See my note in the issue here: github.com/github/maven-plugins/issues/36#issuecomment-31005606Overrate
In order to make this work for multi-module projects, you can also simply use <altDeploymentRepository>internal.repo::default::file://${user.dir}/target/mvn-repo</altDeploymentRepository> with the maven-deploy-plugin, and <outputDirectory>${user.dir}/target/mvn-repo</outputDirectory> with site-maven-plugin. This will deploy all artifacts into the root ("parent") project, and push them to the respective parent direcory on github. Otherwise, the build of each sub-module will overwrite that of the sub-module built before...Andra
In the server settings, you may omit your username and replace your password with a scope-limited access token. See: github.com/github/maven-pluginsLeges
If you don't want to include your github login in your settings.xml, you can use OAuth2Recess
If you are using maven version 3.1 or above, you need to change the version of site-maven-plugin to 0.9, or you will see this error: Execution default of goal com.github.github:site-maven-plugin:0.8:site failed: An API incompatibility was encountered while executing com.github.github:site-maven-plugin:0.8:site: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;Locality
@Thorman Thanks for the awesome answer. I'd successfully able to host maven repo on github. How can I achieve this for bitbucket.Eckblad
@emmby: wonderful answer... the whole thing works like charm.. only thing I am yet to figure out is how to do this if my git repo is private... any help?Trichiasis
This doesn't seem to work anymore with the current state of githubParaselene
Two suggestions that make it work (at least for me): Set current version of Github plugin (right now it would be 0.11). Also I would suggest everybody to use a OAUTH token instead of the password. You can generate it in 'Settings->Applications->Personal Access Tokens'. Than you also can inline it into the POM via and store the token as environment variable. <github.global.userName>YourUserName</github.global.userName> <github.global.password>${GITHUB_OAUTH_TOKEN</github.global.password>Dar
This answer sounds like such an overhead compared to what Bae is suggesting in his answer...Gunslinger
@Andra i tried your solution, and the maven-site-plugin says: basedir does not exist (despite the fact it is indeed exists). :(Johnathan
Is there a way to use this with a organisation repo? I tried to use the organisation name in the <repositoryName> element, but it didn't work. I also tried with organisation owner usernames to the same result.Purse
It is possible to use with an organization repo. Use your github user name and password in the settings.xml file and set <repositoryOwner>your-organization-name</repositoryOwner> in the pom file.Freak
Hi, following above suggestion, i am getting below error trace while doing mvn deploy. org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:site-maven-plugin:0.12:site (default) on project spark-parent_2.10: Error creating commit: Invalid request. For 'properties/name', nil is not a string. For 'properties/name', nil is not a string.Tears
I have a video tutorial about Maven deploy (youtube.com/watch?v=gBd5Yraoqp4) and release (youtube.com/watch?v=FFq0V_LZGZ4) to GitHub.Unhopedfor
This method implies a repo per artifact approach. Of course you could use the same shared staging directory for all artifacts, but once you have a large enough repo you will have problems with Java memory heap. I would prefer to use the Maven exec plugin and call the git binary to push the new artifacts.Evoy
Has anyone gotten this to work with private repositories as of December 2016? Perhaps redundant, but I asked question here: #41193400. The dependent project was unable to download the jar using either username and password, or a token, when the repo was set to private. Things were fine when it was public.Charyl
@Johnathan this happened for me when I copy-pasted the code above. It did something strange with the character encoding of the filename. Try typing out mvn-repo explicitly, it should work.Domel
Thanks for this post, it is very helpful. However, after getting it all to work on a multi-module project I found that there are some GitHub restrictions on the size of artifacts. We have some all-inclusive uber-jars that were 50MB, and the upload to GitHub failed for those (I am assuming because of size, smaller ones worked). It was also very slow to upload. I am thinking a private repo or one of the services is really the only way to go for a sizable project.Despain
It took me a few attempts to get things working with a github person access token. here it is an example in the public domain github.com/simbo1905/microservices-demo/blob/… You need to generate a GitHub personal access token and give it the scope to publish to the repo and read your email address as per github.com/github/maven-plugins/issues/…. Then you need to set the token as an envar with export GITHUB_OAUTH_TOKEN=xxxHolds
As of 31-Aug-2020, this does not work (anymore). When I try to access my repo on github with the mentioned URL format https://github.com/YOUR-USERNAME/YOUR-PROJECT-NAME/raw/mvn-repo/, it simply returns a 404.Chatelaine
How to use this repo as an artifact while creating a maven project? Like this mvn archetype:generate "-DarchetypeGroupId=org.example" "-DarchetypeArtifactId=sem-ver" "-DarchetypeVersion=1.0.0" "-DgroupId=com.example" "-DartifactId=boilerplate-semver" "-Dversion=1.0.0" "-DinteractiveMode=false".Engels
P
129

Don't use GitHub as a Maven Repository.

Edit: This option gets a lot of down votes, but no comments as to why. This is the correct option regardless of the technical capabilities to actually host on GitHub. Hosting on GitHub is wrong for all the reasons outlined below and without comments I can't improve the answer to clarify your issues.

Best Option - Collaborate with the Original Project

The best option is to convince the original project to include your changes and stick with the original.

Alternative - Maintain your own Fork

Since you have forked an open source library, and your fork is also open source, you can upload your fork to Maven Central (read Guide to uploading artifacts to the Central Repository) by giving it a new groupId and maybe a new artifactId.

Only consider this option if you are willing to maintain this fork until the changes are incorporated into the original project and then you should abandon this one.

Really consider hard whether a fork is the right option. Read the myriad Google results for 'why not to fork'

Reasoning

Bloating your repository with jars increases download size for no benefit

A jar is an output of your project, it can be regenerated at any time from its inputs, and your GitHub repo should contain only inputs.

Don't believe me? Then check Google results for 'dont store binaries in git'.

GitHub's help Working with large files will tell you the same thing. Admittedly jar's aren't large but they are larger than the source code and once a jar has been created by a release they have no reason to be versioned - that is what a new release is for.

Defining multiple repos in your pom.xml slows your build down by Number of Repositories times Number of Artifacts

Stephen Connolly says:

If anyone adds your repo they impact their build performance as they now have another repo to check artifacts against... It's not a big problem if you only have to add one repo... But the problem grows and the next thing you know your maven build is checking 50 repos for every artifact and build time is a dog.

That's right! Maven needs to check every artifact (and its dependencies) defined in your pom.xml against every Repository you have defined, as a newer version might be available in any of those repositories.

Try it out for yourself and you will feel the pain of a slow build.

The best place for artifacts is in Maven Central, as its the central place for jars, and this means your build will only ever check one place.

You can read some more about repositories at Maven's documentation on Introduction to Repositories

Pure answered 5/3, 2014 at 22:30 Comment(23)
Totally agree, and makes sense for forks you want to keep around for awhile. But this can be a lot of overhead for just a small patch to an existing project.Thorman
If it is short lived, then get them to build it themselves. You will always face trade-offs like this.Pure
I doubt Github has a problem with it, as they wrote the plugin that enables this capability. I agree it's less than idea, but c'est la vie.Esemplastic
It's not always possible to deploy an open source project on Sonatype. For instance when your project depends on another open source project that it isn't already deployed (and it can't be deployed because it doesn't meet the sonatype requirements).Liner
@Liner then your dependency is not really open source. You should contact the other project and explain this and get them to fix their licensing. (Sun was a culprit of this behaviour in the past)Pure
@Pure It is not a question of licensing. Some project owner decide not to publish on central simply because it's not their priority. Your way is not possible in the real world. If you want to test: convince this to publish on Central code.google.com/p/sd-dss . It's a big Open Source project funded by EU community :)Liner
@Liner Then push it yourself to Central. The Sonatype documentation outlines the steps you need and if it is truly open source then anyone can do this.Pure
@Pure the UsageGuide link is dead. Would you please update it? I think the new location is central.sonatype.org/pages/ossrh-guide.htmlClave
There is another issue with the github solution: if someone wants to use your stuff, he wants to be sure that the repo won't lose the artifact, gets shut down or whatever. Deleting a repo on Gitrhub is easy. It's not as easy on Central. Using github for snapshot releases seems reasonable though.Must
How about a simple argument that using Github speeds up things 10-fold for a beginner? Learning, practicing and troubleshooting maven central deployments will take years for a novice. It is totally not user friendlyArevalo
@AndreyChaschev As outlined in the solution, your trade off is that it slows down your build for every extra Maven Repo that needs checking. If you have valid feedback about the usability issues of Maven Central then pursue getting them fixed. Adding layers of workarounds isn't the right answer either.Pure
@Bar finding the way that others people value and actually use is the best way. JS was a slow, narrow scoped and let's say not serious platform in the beginning, now it's artefact deployment system leaves Java far behind. All thanks to community. Github represents community and is easy to use. The other available thing is Maven hosted repository at JFrog's Bintray which is free for Open SourceArevalo
You are correct, after trying the approach above I found with large uber-jars GitHub's API would consume them and we had to abandon this direction. With the limitations and the time it takes to upload to GitHub it convinced me that GitHub is just not the right tool. Someone commented that GitHub made this plugin, which is true, but it's really for GitHub Pages (which are small and not an issue). Hosting your own Maven repo or possibly one of the repo services is best (although the services don't look great or they are very expensive).Despain
this option would get less downvotes if it actually explained why using github-based repo in particular is bad, instead of just spreading FUD about using multiple repos and large files in git in generalMathre
@Mathre Thanks for your feedback. Could you elaborate how the details under why 1) and 2) are FUD. They are clear explicit reasons for why a github-based repo is a bad idea.Pure
@Pure it is fud because it assumes that a) having multiple repos is always bad, b) having binaries in any git repo is bad; and has nothing to do with hosting a maven repo on githubMathre
@Mathre As per the explanation, a) having multiple repositories slows down your maven build, as each artifiact is checked in every repository. That is not FUD, that is fact.b) git is meant for version control, binary artifacts are outputs and something that can be regenerated, they dont benefit from version control and git's differencing algorithms, they just bloat your git repo and slow down people's clones. But I can see how the answer isn't explicitly explain that.Pure
@Mathre Thanks for the feedback, I've updated the answer text to include more detail.Pure
GitHub introduced git-lfs.github.com solution, that costs $5/mo for 50GB storage and 50GB bandwidth.Hocus
@n0mer That's great about git-lfs, but how does that address the real concerns I raise in this answer? It doesn't. If it's open source then it belongs in only one repo Maven Central.Pure
@Pure it addresses your concern of not storing binaries in git - and offers appropriate way how to mitigate it.Hocus
@n0mer Fair enough, the bloating however is the least of the concerns :)Pure
if you want to only speed up gradle sync then you can see the following post https://mcmap.net/q/100475/-gradle-and-github-repository-slow-syncBiafra
S
52

You can use JitPack (free for public Git repositories) to expose your GitHub repository as a Maven artifact. Its very easy. Your users would need to add this to their pom.xml:

  1. Add repository:
<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
  1. Add dependency:
<dependency>
    <groupId>com.github.User</groupId>
    <artifactId>Repo name</artifactId>
    <version>Release tag</version>
</dependency>

As answered elsewhere the idea is that JitPack will build your GitHub repo and will serve the jars. The requirement is that you have a build file and a GitHub release.

The nice thing is that you don't have to handle deployment and uploads. Since you didn't want to maintain your own artifact repository its a good match for your needs.

Stipend answered 4/5, 2015 at 16:39 Comment(9)
JitPack is pretty good, but forces you to change every groupId that you have around. They say that this can be avoided, but it requires that you add an entry to the DNS of your company, which is totally impractical in most cases. I've been trying with JP once, then I decided that this is too stupid to go ahead.Exhume
Changing the groupId of your projects is not necessary. You can still install those projects using 'com.github.User' groupId. But perhaps your use case is different.Stipend
Yes, it is very much. Because I already have tens of them around my organisation and external users, and because I want my own brand on them. How one can be so fool to try to force me into his own groupId is one of the things why I'm thinking of making a career change.Exhume
Moreover, I don't see any real need for JP guys to throw such requirement at me (they could just intercept Maven requests from the repository spec).Exhume
Sure, but then you could easily fake the groupId and pretend you are another organisation. GroupId needs to be verified somehow and DNS records is one way of doing it. How would you deal with it?Stipend
But this can be solved by other means, e.g. adding /user or /organisation to the repository URL. It's actually something that was already fine in Maven, I don't see any sensible reason to introduce their own coordinate system, which is impossible to comply with in most situations. And it's a shame, cause, for the rest, JP is very cool.Exhume
Well, that sounds reasonable. Maybe open a feature request?:)Stipend
Good idea, I've done it: github.com/jitpack/jitpack.io/issues/209, thanks :-)Exhume
Also, Maven Central will stop supporting com.github.* from April 2021, the alternative is to use io.github.* central.sonatype.org/changelog/…Bally
D
24

Since 2019 you can now use the new functionality called Github package registry.

Basically the process is:

  • generate a new personal access token from the github settings
  • add repository and token info in your settings.xml
  • deploy using

    mvn deploy -Dregistry=https://maven.pkg.github.com/yourusername -Dtoken=yor_token  
    
Detail answered 29/9, 2019 at 1:46 Comment(5)
As of 2019, this is the best option.Raddle
But for using it by someone else, it looks like he/she needs to configure settings.xml with respective URL and auth infoKaliski
Very strange... You create your public package, but another people need authentication before get itDextrocular
However, for private repos, after certaing usages / month, the pricing comes into pictureHosbein
Github Package Registry is useless for open source projects because clients cannot download artifacts without authorization.Albertinealbertite
I
9

Another alternative is to use any web hosting with webdav support. You will need some space for this somewhere of course but it is straightforward to set up and a good alternative to running a full blown nexus server.

add this to your build section

     <extensions>
        <extension>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <groupId>org.apache.maven.wagon</groupId>
        <version>2.2</version>
        </extension>
    </extensions>

Add something like this to your distributionManagement section

<repository>
    <id>release.repo</id>
    <url>dav:http://repo.jillesvangurp.com/releases/</url>
</repository>

Finally make sure to setup the repository access in your settings.xml

add this to your servers section

    <server>
        <id>release.repo</id>
        <username>xxxx</username>
        <password>xxxx</password>
    </server>

and a definition to your repositories section

            <repository>
                <id>release.repo</id>
                <url>http://repo.jillesvangurp.com/releases</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>

Finally, if you have any standard php hosting, you can use something like sabredav to add webdav capabilities.

Advantages: you have your own maven repository Downsides: you don't have any of the management capabilities in nexus; you need some webdav setup somewhere

Isthmian answered 27/9, 2013 at 13:49 Comment(0)
E
7

As an alternative, Bintray provides free hosting of maven repositories. That's probably a good alternative to Sonatype OSS and Maven Central if you absolutely don't want to rename the groupId. But please, at least make an effort to get your changes integrated upstream or rename and publish to Central. It makes it much easier for others to use your fork.

Ellissa answered 24/8, 2014 at 13:0 Comment(4)
I couldn't believe it when I tried, but Bintray doesn't support snapshots. Useless.Exhume
It's not free anymore. $150 a month.Spermatophore
I think it is fee for open source software projects: jfrog.com/open-sourceTwice
JFrog is shutting down Bintray and JCenter. jfrog.com/blog/…Amara
L
0

If you have only aar or jar file itself, or just don't want to use plugins - I've created a simple shell script. You can achieve the same with it - publishing your artifacts to Github and use it as public Maven repo.

Loci answered 9/10, 2018 at 20:58 Comment(0)
B
0

I'd like to add another alternative, a Gradle plugin I've been working on lately: magik.

Basically it allows to publish directly on a github repository acting as a maven repository.

Berti answered 26/5, 2021 at 6:48 Comment(0)
S
0

I came here looking to do the same thing, unlitmately host my Maven repository for free, but after more research I ended up here: https://jfrog.com/start-free/

The setup was quite strightforward, has a good free tier which will serve me for the forseeable future, and has additional (paid for) upgrades which may well come in handy in the future.

So far I am very pleased indeed !

Stylolite answered 21/11, 2021 at 20:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.