将源添加到sbt程序集

时间:2014-09-08 08:50:16

标签: scala sbt sbt-assembly

我正在使用sbt程序集来创建一个库,用于内部目的。

我将这个jar发布到本地神器安装,它运行良好。

但是,我仍然没有想出如何将源代码添加到程序集创建过程中,因此当我在intellij中导入它时,它也可用(用于调试等)

谢谢!

1 个答案:

答案 0 :(得分:-2)

据我所知,当你进行装配时,它会在cache directory /$HOME/.ivy2/cache/ if your name-version-source.jar is available in cache then in your final assembled jar will have source.jar In your case you publishing it as local so your source,javadoc jars are generated in local directory i.e /$HOME/.ivy2/local/

中查看所有广口,来源等
publish the jar to central repository not as publishLocal

所以,您可以hack In your /$HOME/.ivy2/local/artifact-id/group-id/version/ directory docs,jars,ivys,pom,srcs copy those directory to /$HOME/.ivy2/cache/artifact-id/ paste it here或{{1}} 然后在我的案例中尝试汇编为我工作