[GRADLE-1348] Transitive dependency not being pulled in Created: 25/Jan/11 Updated: 04/Jan/13 Resolved: 25/Jan/11 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.9.2 |
Fix Version/s: | 1.0-milestone-1 |
Type: | Bug | ||
Reporter: | Ben McCann | Assignee: | Unassigned |
Resolution: | Not A Bug | Votes: | 0 |
Attachments: | build.gradle | ||||||||
Issue Links: |
|
Description |
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: |
Comments |
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. repositories { mavenCentral() mavenRepo name:'projectlombok.org', urls:"http://projectlombok.org/mavenrepo/" mavenRepo name:'jboss', urls:"http://repository.jboss.org/nexus/content/groups/public-jboss/" } 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. |