0

I got gradle 3.5.1 and using ear plugin. The documentation says that deploy configuration is not transitive but earlib actually is (https://docs.gradle.org/3.3/userguide/ear_plugin.html). My configuration is a below

dependencies {
    earlib(
            "org.mybatis:mybatis:3.2.8"
    )
}

It was supposed to get a few other transitive libraries but here is all I get when I run gradle dependencies

earlib - Classpath for module dependencies.
\--- org.mybatis:mybatis:3.2.8

What am I doing wrong here?

Greg Hill
  • 2,148
  • 2
  • 23
  • 27

1 Answers1

0

Actually, you are doing nothing wrong. Your module dependency org.mybatis:mybatis:3.2.8 simply does not define any (mandatory) transitive dependency, since every compile or provided dependency is marked as optional.

According to the Maven docs,

If a user wants to use functionality related to an optional dependency, they will have to redeclare that optional dependency in their own project.

Lukas Körfer
  • 13,515
  • 7
  • 46
  • 62
  • Thank you, that is correct. I am converting from a ivy project and ivy at least in my config pulls down even the optional dependencies. So that was quite confusing. And the last but not least, I should not post questions on Friday afternoon, rather wait for Monday morning and have fresh eyes :) – Greg Hill Jul 17 '17 at 12:57