Hibernate 3.6.10 Dependency resolution

后端 未结 1 1832
谎友^
谎友^ 2020-12-22 09:04

I recently upgraded a project to use hibernate 3.6.10.Final. The project uses ivy to retrieve and the dependencies. Now I\'m getting an error that a method in slf4j cannot b

相关标签:
1条回答
  • 2020-12-22 09:29

    Your problem is that only one copy of the slf4j jar can be used on the classpath, so you need to decide which one to keep. Choosing the older version might fix one compilation error, but cause another :-)

    By default, ivy will choose the latest one on the assumption that it would be backwardly compatible. You can override this behaviour by using a conflict indicator as follows:

    <dependencies>
        <dependency org="org.hibernate" name="hibernate-core" rev="3.6.10.Final" conf="compile->default"/>
        <dependency org="org.slf4j" name="slf4j-api" rev="1.5.8" conf="compile->default"/>
    
        <conflict org="org.slf4j" module="slf4j-api" rev="1.5.8"/>
    </dependencies>
    
    0 讨论(0)
提交回复
热议问题