[GRADLE-1348] Transitive dependency not being pulled in Created: 25/Jan/11 Updated: 04/Jan/13 Resolved: 25/Jan/11
|Resolution:||Not A Bug||Votes:||0|
I was getting tons of errors saying "package javax.persistence does not exist", so I had to add the following dependency to my gradle build file:
I should already be pulling it in from hibernate-core. I've attached m build.gradle so that you can see what I am specifying. I do not need that dependency specified to build in Maven. Here's the hibernate core pom:
|Comment by Peter Niederwieser [ 25/Jan/11 ]|
The repositories section of your build script is wrong. mavenCentral(someOtherRepo) means "get dependencies from Maven Central, but look for artifacts (not POMs!) also in someOtherRepo" (see 35.2 Repositories in the user guide). Because Maven Central doesn't have POMs for Hibernate 3.6, Gradle/Ivy has no metadata for the Hibernate artifacts, and can't do transitive dependency management. Maybe we could make this case easier to diagnose.
Now you can remove hibernate-jpa-2.0-api from the dependencies section.
|Comment by Ben McCann [ 25/Jan/11 ]|
Thanks for clarifying the proper usage. That did fix my problem.