Add sources to sbt assembly
Asked Answered
D

1

6

I am using sbt assembly to create a library, for internal purposes.

I am publishing this jar to a local artifactory installation, and it works nicely.

However, I still haven't figured out how to add the source code to the assembly creation process, so when I import it in intellij it will also be available (for debugging, etc.)

Thanks!

Diannadianne answered 8/9, 2014 at 8:50 Comment(0)
C
-2

As I understand when you do assembly it will look all jars,source etc in cache directory i.e /$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/

So here you go publish the jar to central repository not as publishLocal or as 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 Then try assembly in my case works for me

Cythera answered 8/9, 2014 at 15:9 Comment(1)
Sorry, I didn't understand what you are telling me to do.Diannadianne

© 2022 - 2024 — McMap. All rights reserved.