Gradle:无法将 Hibernate 集成为依赖项

发布于 2024-10-07 07:03:49 字数 780 浏览 3 评论 0原文

我只想将 Hibernate 作为依赖项集成到我的构建中。但我没有集成所有子模块,而是决定集成整个 hibernate 项目 (org.hibernate:hibernate:3.5.1-Final)

问题:没有加载任何模块。

我的build.gradle

repositories {
  mavenCentral()
  mavenRepo urls: "http://repository.jboss.org/nexus/content/groups/public-jboss"
}

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

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

有什么想法吗?

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/content/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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

盗心人 2024-10-14 07:03:49

您必须从工作项目中指定类似这些声明的子模块 https://github.com/nabeelalimemon/Gradle-enterprise-multiProject-/blob/master/domain/build.gradle

hibernateVersion = '3.6.0.Final' 不过。

然后您会遇到 slf4j/log4j 配置等问题,为此只需查看同一托管项目的主 bu​​ild.gradle 即可。

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.

叫思念不要吵 2024-10-14 07:03:49

两件事:

1)你在问题标题中说了 3.5.1-Final,但在你的 build.gradle 中却说 3.5.3-Final。
2) 尝试在 Maven 存储库 URL 中将“public-jboss”切换为“public”

最终 URL 将如下所示:

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

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文