Tooling API declares only runtime dependency on slf4j

gradle-tooling-api declares slf4j-api as a runtime dependency in its POM. Yet, some of its classes seems to use classes from slf4j, implying that slf4j must have been present at compile time.

This causes a minor inconvenience to me because NetBeans detects this and complains about it (i.e.: fails the build). So, I must explicitly add a compile time dependency on slf4j-api.

So it’s complaining because the tooling api source refers to these classes? Or because your code does?

It is complaining because the tooling api does. I don’t use slf4j-api. That is, NB packages jars into its zip (nbm), if it is a compile time dependency. It assumes that runtime is optional. It might be questionable but in Maven, you can’t specify that it is runtime but always required. So I guess, it was a design decision to consider runtime to be optional.

Ok, got it. Will raise internally to see what we want to do and post back.