[GRADLE-2938] Dependency management element fails to provide dependency element version if type attribute is not defined for one of them Created: 28/Oct/13 Updated: 06/Nov/13 Resolved: 28/Oct/13 |
|
| Status: | Resolved |
| Project: | Gradle |
| Affects Version/s: | 1.9-rc-2 |
| Fix Version/s: | 1.9-rc-3 |
| Type: | Bug | ||
| Reporter: | Benjamin Muschko | Assignee: | Benjamin Muschko |
| Resolution: | Fixed | Votes: | 1 |
| Description |
|
Reported on the Gradle forum. The declared dependency org.jasig.cas:cas-server-core:3.5.2 cannot resolve all transitive dependencies. There following error message can be observed: * What went wrong: A problem occurred evaluating script. > Could not resolve all dependencies for configuration ':[parent of our module]:[our module name]:runtime'. > Could not find org.hibernate:hibernate-core:working@[my hostname].local. Required by: [our group]:[our module name]:2.0.0-SNAPSHOT > org.jasig.cas:cas-server-core:3.5.2 > Could not find commons-jexl:commons-jexl:working@[my hostname].local. Required by: [our group]:[our module name]:2.0.0-SNAPSHOT > org.jasig.cas:cas-server-core:3.5.2 This sample build script reproduces the issue: apply plugin: 'java' repositories { mavenCentral() } dependencies { compile('org.jasig.cas:cas-server-core:3.5.2') { exclude module: 'xmldsig' } } task copyLibs(type: Copy) { from configurations.compile into "$buildDir/libs" } This issue is happening if either the dependency management element defines a type but the dependency element doesn't or vice versa. Example: Parent POM:
<dependencyManagement>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.0.Final</version>
<type>jar</type>
</dependency>
</dependencyManagement>
Child POM:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<scope>compile</scope>
</dependency>
|
| Comments |
| Comment by Benjamin Muschko [ 28/Oct/13 ] |
|
This is going to be fixed with 1.9-rc-3. |
| Comment by Joern Huxhorn [ 28/Oct/13 ] |
|
Your bug-fixing-speed is incredible. Just saying... |