Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to publish jar to local repository?

Tags:

sbt

I have a library compiled to a jar (not an sbt project, no source code, just the jar file) that's not available on a repository.

Is there a way to publish the jar locally so I can add the dependency using the libraryDependencies += "org.xxx" % "xxx" % "1.0" notation? (I already know how to add the file to a project by copying it to the lib folder.)

like image 211
Jeff Axelrod Avatar asked Oct 17 '11 19:10

Jeff Axelrod


People also ask

What is the command to install jar in local repository?

In this case you can perform mvn initialize and jar will be installed in local maven repo.


1 Answers

The publishLocal action is used to publish your project to a local Ivy repository. By default, this local repository is in ${user.home}/.ivy2/local. You can then use this project from other projects on the same machine source

EDIT: Sorry I misread your question. Here is an example to publish a jar or sources to your local ivy repo.

like image 87
Renaud Avatar answered Sep 20 '22 07:09

Renaud