POM resolution issues in 1.9-rc-1


(John Engelman) #1

We’re running into issues when including the ch.qos.logback:logback-class:1.0.13 jar into our projects.

It appears that 1.9-rc-1 isn’t resolving POM dependencies correctly. This is what the dependency report from 1.8 indicates: ±-- ch.qos.logback:logback-classic:1.0.13 |

±-- ch.qos.logback:logback-core:1.0.13 |

— org.slf4j:slf4j-api:1.7.5

But 1.9-rc-1 generates this: ±-- ch.qos.logback:logback-classic:1.0.13 ±-- org.slf4j:log4j-over-slf4j:1.7.2 |

— org.slf4j:slf4j-api:1.7.2 — com.h2database:h2:1.3.168

This is the logback-classic POM dependencies:

ch.qos.logback

logback-core

compile

org.slf4j

slf4j-api

compile

org.slf4j

slf4j-ext

${slf4j.version}

test

org.slf4j

slf4j-api

test-jar

${slf4j.version}

test

org.slf4j

log4j-over-slf4j

${slf4j.version}

test

org.slf4j

jul-to-slf4j

${slf4j.version}

test

dom4j

dom4j

test

hsqldb

hsqldb

test

com.h2database

h2

test

postgresql

postgresql

test

mysql

mysql-connector-java

5.1.9

test

javax.mail

mail

compile

true

org.codehaus.janino

janino

compile

true

org.codehaus.groovy

groovy-all

compile

true

ch.qos.logback

logback-core

test-jar

test

org.slf4j

integration

${slf4j.version}

test

org.apache.geronimo.specs

geronimo-jms_1.1_spec

compile

true

javax.servlet

servlet-api

compile

true

com.icegreen

greenmail

1.3

test

org.subethamail

subethasmtp

2.1.0

test

org.slf4j

slf4j-api

org.apache.felix

org.apache.felix.main

2.0.2

test

I suspect that the issue is somewhere in the changes to how parent POMs are handled. But I haven’t dug into it.


(Benjamin Muschko) #2

Thanks for reporting. I created the issue GRADLE-2931.


(Jörn Huxhorn) #3

This reply was created from a merged topic originally titled [1.9-rc-1] IllegalStateException: org.slf4j.LoggerFactory could not be successfully initialized.. Building [sulky](https://github.com/huxi/sulky) with Gradle 1.9-rc-1 causes [exceptions](http://pastebin.com/4ZZ8DyfN) while 1.8 works fine.

The exception says ‘org.slf4j.LoggerFactory could not be successfully initialized. See also http://www.slf4j.org/codes.html#unsuc…’ but there is no corresponding information available on the referenced slf4j-page.

All of my subprojects have the following dependencies applied:
‘’‘groovy
dependencies {
testCompile libraries.‘groovy’
testCompile libraries.‘spock-core’
testCompile libraries.junit
testCompile libraries.‘slf4j-api’
testRuntime libraries.‘logback-classic’
}
‘’’

Both slf4j and logback are using the latest version, i.e. slf4j 1.7.5 and logback 1.0.13.

The exception is thrown while the tests are executed.


(danigredler) #4

This reply was created from a merged topic originally titled Missing transitive dependencies after upgrading to 1.9-rc-1. Using the following sample project:

apply plugin: 'java' <br /> apply plugin: 'project-report' <br /><br /> repositories { <br />
   mavenCentral() <br /> } <br /><br /> dependencies { <br />
   compile 'org&#46;apache&#46;camel:camel-spring:2&#46;11&#46;1' <br />
   compile 'org&#46;apache&#46;camel:camel-http4:2&#46;11&#46;1' <br /> }



Retrieving the dependencies using Gradle 1.8:

C:\work\sample&gt;C:\java\gradle-1&#46;8\bin\gradle&#46;bat dependencies --configuration compile <br /> :dependencies <br /><br /> ------------------------------------------------------------ <br /> Root project <br /> ------------------------------------------------------------ <br /><br /> compile - Compile classpath for source set 'main'&#46; <br /> +--- org&#46;apache&#46;camel:camel-spring:2&#46;11&#46;1 <br /> |
  +--- org&#46;apache&#46;camel:camel-core:2&#46;11&#46;1 <br /> |
  |
  \--- org&#46;slf4j:slf4j-api:1&#46;6&#46;6 <br /> |
  +--- org&#46;springframework:spring-context:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  +--- org&#46;springframework:spring-aop:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  +--- aopalliance:aopalliance:1&#46;0 <br /> |
  |
  |
  +--- org&#46;springframework:spring-asm:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  +--- org&#46;springframework:spring-beans:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  |
  \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  |
       +--- org&#46;springframework:spring-asm:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  |
       \--- commons-logging:commons-logging:1&#46;1&#46;1 <br /> |
  |
  |
  \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  +--- org&#46;springframework:spring-beans:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  +--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  +--- org&#46;springframework:spring-expression:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  \--- org&#46;springframework:spring-asm:3&#46;1&#46;4&#46;RELEASE <br /> |
  +--- org&#46;springframework:spring-aop:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  \--- org&#46;springframework:spring-tx:3&#46;1&#46;4&#46;RELEASE <br /> |
       +--- aopalliance:aopalliance:1&#46;0 <br /> |
       +--- org&#46;springframework:spring-aop:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
       +--- org&#46;springframework:spring-beans:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
       +--- org&#46;springframework:spring-context:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
       \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> \--- org&#46;apache&#46;camel:camel-http4:2&#46;11&#46;1 <br />
    +--- org&#46;apache&#46;camel:camel-core:2&#46;11&#46;1 (*) <br />
    +--- org&#46;apache&#46;geronimo&#46;specs:geronimo-servlet_2&#46;5_spec:1&#46;2 <br />
    \--- org&#46;apache&#46;httpcomponents:httpclient:4&#46;2&#46;5 <br />
         +--- org&#46;apache&#46;httpcomponents:httpcore:4&#46;2&#46;4 <br />
         +--- commons-logging:commons-logging:1&#46;1&#46;1 <br />
         \--- commons-codec:commons-codec:1&#46;6 <br /><br /> (*) - dependencies omitted (listed previously) <br /><br /> BUILD SUCCESSFUL <br /><br /> Total time: 13&#46;475 secs



Retrieving the dependencies in Gradle 1.9-rc-1:

C:\work\sample&gt;C:\java\gradle-1&#46;9-rc-1\bin\gradle&#46;bat dependencies --configuration compile <br /> :dependencies <br /><br /> ------------------------------------------------------------ <br /> Root project <br /> ------------------------------------------------------------ <br /><br /> compile - Compile classpath for source set 'main'&#46; <br /> +--- org&#46;apache&#46;camel:camel-spring:2&#46;11&#46;1 <br /> |
  +--- org&#46;springframework:spring-context:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  +--- org&#46;springframework:spring-aop:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  +--- aopalliance:aopalliance:1&#46;0 <br /> |
  |
  |
  +--- org&#46;springframework:spring-asm:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  +--- org&#46;springframework:spring-beans:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  |
  \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  |
       +--- org&#46;springframework:spring-asm:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  |
       \--- commons-logging:commons-logging:1&#46;1&#46;1 <br /> |
  |
  |
  \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  +--- org&#46;springframework:spring-beans:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  +--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  +--- org&#46;springframework:spring-expression:3&#46;1&#46;4&#46;RELEASE <br /> |
  |
  |
  \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  |
  \--- org&#46;springframework:spring-asm:3&#46;1&#46;4&#46;RELEASE <br /> |
  +--- org&#46;springframework:spring-aop:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
  \--- org&#46;springframework:spring-tx:3&#46;1&#46;4&#46;RELEASE <br /> |
       +--- aopalliance:aopalliance:1&#46;0 <br /> |
       +--- org&#46;springframework:spring-aop:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
       +--- org&#46;springframework:spring-beans:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
       +--- org&#46;springframework:spring-context:3&#46;1&#46;4&#46;RELEASE (*) <br /> |
       \--- org&#46;springframework:spring-core:3&#46;1&#46;4&#46;RELEASE (*) <br /> \--- org&#46;apache&#46;camel:camel-http4:2&#46;11&#46;1 <br />
    +--- org&#46;apache&#46;camel:camel-core:2&#46;11&#46;1 <br />
    |
  \--- org&#46;slf4j:slf4j-api:1&#46;6&#46;6 <br />
    \--- org&#46;apache&#46;geronimo&#46;specs:geronimo-servlet_2&#46;5_spec:1&#46;2 <br /><br /> (*) - dependencies omitted (listed previously) <br /><br /> BUILD SUCCESSFUL <br /><br /> Total time: 3&#46;779 secs



Gradle 1.9-rc-1 is missing the following transitive dependencies:

org.apache.camel:camel-spring:2.11.1 -> org.apache.camel:camel-core:2.11.1

org.apache.camel:camel-http4:2.11.1 -> org.apache.httpcomponents:httpclient:4.2.5


(Scott Palmer) #5

This looks like it may be the issue I reported in

(sorry, I don’t know how to make a pretty link to another forum topic)

I found that revision 3b5c8e63b60f4815744516a6d3834f65ea1df3b5 was where the problem started.