开发者

Gradle: Unable to integrate Hibernate as a dependency

开发者 https://www.devze.com 2023-01-29 11:04 出处:网络
I just want to integrate Hibernate as a dependency in my build. But instead of integrating all submodules I desided to integrade the whole hibernate project (org.hibernate:hibernate:3.5.1-Final)

I just want to integrate Hibernate as a dependency in my build. But instead of integrating all submodules I desided to integrade the whole hibernate project (org.hibernate:hibernate:3.5.1-Final)

The problem: No modules where loaded.

My build.gradle

repositories {
  mavenCentral()
  mavenRepo urls: "http://repository.jboss.org/nexus/conten开发者_高级运维t/groups/public-jboss"
}

dependencies {
  compile "org.hibernate:hibernate:3.5.1-Final"
}

Output of gradle build

Download http://repository.jboss.org/nexus/content/groups/public-jboss/org/hibernate/hibernate/3.5.1-Final/hibernate-3.5.1-Final.pom
Download http://repository.jboss.org/nexus/content/groups/public-jboss/org/hibernate/hibernate-parent/3.5.1-Final/hibernate-parent-3.5.1-Final.pom

Any ideas?


You'll have to specify submodules like these declarations from a working project https://github.com/nabeelalimemon/Gradle-enterprise-multiProject-/blob/master/domain/build.gradle

hibernateVersion = '3.6.0.Final' though.

Then you'll come across issues like slf4j/log4j provision etc and for that just take a look at the master build.gradle of the same hosted project.


Two things:

1) You said 3.5.1-Final in the heading of your question, but it says 3.5.3-Final in your build.gradle. 2) Try to switch "public-jboss" by just "public" in the maven repo URL

The final URL will look like this:

http://repository.jboss.org/nexus/content/groups/public/org/hibernate/hibernate/3.5.1-Final/hibernate-3.5.1-Final.pom

or

http://repository.jboss.org/nexus/content/groups/public/org/hibernate/hibernate/3.5.3-Final/hibernate-3.5.3-Final.pom

0

精彩评论

暂无评论...
验证码 换一张
取 消