【发布时间】:2014-11-01 10:44:53
【问题描述】:
我正在使用 sbt 程序集创建一个库,供内部使用。
我正在将此 jar 发布到本地人工安装,它运行良好。
但是,我还没有弄清楚如何将源代码添加到程序集创建过程中,所以当我将它导入 intellij 时,它也可以使用(用于调试等)
谢谢!
【问题讨论】:
标签: scala sbt sbt-assembly
我正在使用 sbt 程序集创建一个库,供内部使用。
我正在将此 jar 发布到本地人工安装,它运行良好。
但是,我还没有弄清楚如何将源代码添加到程序集创建过程中,所以当我将它导入 intellij 时,它也可以使用(用于调试等)
谢谢!
【问题讨论】:
标签: scala sbt sbt-assembly
据我了解,当您进行组装时,它会在 cache directory 中查看所有 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
然后在我的情况下尝试组装对我有用
【讨论】: