sbt-idea icon indicating copy to clipboard operation
sbt-idea copied to clipboard

Sources and Javadocs are removed from classpath even if explicitly included in the libraryDependencies

Open Sciss opened this issue 11 years ago • 1 comments

I have a project which requires some sources and javadocs on the runtime class path. Here is the example:

https://github.com/Sciss/sbt-scratchpad/tree/master/so-22160701

The problem is that while I can run the program via sbt run or create a standalone jar via sbt-assembly, the run configurations within IntelliJ IDEA are missing these jars. Somehow the -sources.jar and -javadocs.jar are not included in the class path as sbt-idea sets it up.

Is there a way to configure sbt-idea so that it doesn't remove these jars from the classpath?

Sciss avatar Mar 09 '14 11:03 Sciss

It seems the problem is the way sbt-idea itself overrides the classifier resolution: If I run gen-idea no-classifiers, I can create a run configuration in IntelliJ IDEA that does work (it will have the sources and javadocs on the classpath).

But I would still like to run sbt-idea without no-classifiers, because I have other libraries whose sources and docs are not supposed to end up on the runtime class path, but merely for navigation inside IntelliJ IDEA. So ideally, I should be able to just run gen-idea, and the plugin would respect the javadocs and sources that were already explicitly included in the libraryDependencies.

Sciss avatar Mar 09 '14 11:03 Sciss