I have a transitive dependency to commons-logging from a lot of my deps and for some reason I made it explicit to control the version, and while at it set it to runtime since I don't use it anywhere myself:
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>runtime</scope>
</dependency>
With this however, my Scala compilation fails:
[INFO] --- maven-scala-plugin:2.15.2:compile (default) @ dfkka ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] /Users/viktor/dev/projects/dfkka/src/main/scala:-1: info: compiling
[INFO] /Users/viktor/dev/projects/dfkka/target/generated-sources/scalaxb:-1: info: compiling
[INFO] Compiling 72 source files to /Users/viktor/dev/projects/dfkka/target/classes at 1318518178794
[ERROR] error: error while loading AbstractLayoutManager, Missing dependency 'class org.apache.commons.logging.Log', required by /Users/viktor/.m2/repository/ar/com/fdvs/DynamicJasper/3.1.9/DynamicJasper-3.1.9.jar(ar/com/fdvs/dj/core/layout/AbstractLayoutManager.class)
[ERROR] one error found
If I change it back to
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
compilation succeeds. When does scalac need these transitive deps? The presentation compiler within scala-ide seems to work…
So AbstractLayoutManager in DynamicJasper needs it, but I don't even reference that class anywhere in my code. And why does it say "loading"? Is it actually loading the class? I would really like to understand this…