6

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

我正在将此 jar 发布到本地人工安装,并且效果很好。

但是,我仍然没有弄清楚如何将源代码添加到程序集创建过程中,所以当我将它导入 intellij 时,它也将可用(用于调试等)

谢谢!

4

1 回答 1

-2

据我了解,当您进行组装时,它会在cache directoryie中查看所有 jars、source 等/$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 然后在我的案例中尝试组装对我有用

于 2014-09-08T15:09:30.413 回答