# Transitive dependency not resolved

**URL:** <https://discuss.gradle.org/t/transitive-dependency-not-resolved/4812>\
**Category:** Old Forum Archive\
**Created:** [September 10, 2013, 4:00pm UTC](https://discuss.gradle.org/t/transitive-dependency-not-resolved/4812 "2013-09-10T16:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_Sahlbach](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/andreas_sahlbach/32/94_2.png) [@Andreas\_Sahlbach](https://discuss.gradle.org/u/Andreas_Sahlbach)\
**Post date:** [September 10, 2013, 4:00pm UTC](https://discuss.gradle.org/t/transitive-dependency-not-resolved/4812/1 "2013-09-10T16:00:00Z")

</div>

I would like to simulate the behaviour of maven for this pom.xml:

```gradle
<?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>example.com</groupId>
        <artifactId>example</artifactId>
        <version>1.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <name>application</name>
              <dependencies>
            <dependency>
                <groupId>org.apache.shiro</groupId>
                <artifactId>shiro-spring</artifactId>
                <version>1.2.2</version>
            </dependency>
       </dependencies>
    </project>

```

mvn dependency:tree gives me:

[INFO] — maven-dependency-plugin:2.1:tree (default-cli) @ example —

[INFO] [example.com](http://example.com):example:pom:1.0-SNAPSHOT

[INFO] - org.apache.shiro:shiro-spring:jar:1.2.2:compile

[INFO]

± org.apache.shiro:shiro-core:jar:1.2.2:compile

[INFO]

| ± org.slf4j:slf4j-api:jar:1.6.4:compile

[INFO]

| - commons-beanutils:commons-beanutils:jar:1.8.3:compile

[INFO]

- org.apache.shiro:shiro-web:jar:1.2.2:compile

Now my gradle build file looks like this:

```gradle
apply plugin: 'java'
      repositories {
         mavenCentral()
    }
      dependencies {
         compile("org.apache.shiro:shiro-spring:1.2.2")
    }

```

and the output of gradle dependencies looks like this (without the other configs that have the same result):

compile - Compile classpath for source set ‘main’.

— org.apache.shiro:shiro-spring:1.2.2

— org.apache.shiro:shiro-web:1.2.2

So, where is the dependency to shiro-core? Why is it missing and what do I have to change to get the same results as with maven?

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [September 12, 2013, 10:17am UTC](https://discuss.gradle.org/t/transitive-dependency-not-resolved/4812/2 "2013-09-12T10:17:00Z")

</div>

Not sure what’s going on here. Maybe Gradle is getting confused by the “bundle” packaging type. Raised as Gradle-2885. In the meantime you can declare an explicit dependency on ‘shiro-core’.

---

<div class="post-metadata">

**Author:** ![Andreas\_Sahlbach](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/andreas_sahlbach/32/94_2.png) [@Andreas\_Sahlbach](https://discuss.gradle.org/u/Andreas_Sahlbach)\
**Post date:** [September 12, 2013, 10:25am UTC](https://discuss.gradle.org/t/transitive-dependency-not-resolved/4812/3 "2013-09-12T10:25:00Z")

</div>

Yeah, thanks, the workaround works. I was just wondering, because the shiro pom looks pretty usual, nothing fancy in it. And the rest of my project resolves perfectly.
