sbt: How can I add a local filesystem jar to my project?

后端 未结 2 717
醉酒成梦
醉酒成梦 2020-12-23 09:29

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

Is there a simple way to add a reference to the jar

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 09:59

    You can put the jar in your project's lib folder (create it if it doesn't exist), it will then appear on your project's unmanaged-classpath.

    To publish a jar file locally, if you have an sbt project that produces the jar, it should be as simple as invoking "publish-local" to publish the jar to your local ivy repository so that you can use that jar in another one of your projects (on the same computer).

提交回复
热议问题