{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4855","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4855/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4855/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4855/events","html_url":"https://github.com/spring-projects/spring-boot/issues/4855","id":124138706,"number":4855,"title":"Cannot override dependency version","user":{"login":"skuppa","id":1365493,"avatar_url":"https://avatars.githubusercontent.com/u/1365493?v=3","gravatar_id":"","url":"https://api.github.com/users/skuppa","html_url":"https://github.com/skuppa","followers_url":"https://api.github.com/users/skuppa/followers","following_url":"https://api.github.com/users/skuppa/following{/other_user}","gists_url":"https://api.github.com/users/skuppa/gists{/gist_id}","starred_url":"https://api.github.com/users/skuppa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skuppa/subscriptions","organizations_url":"https://api.github.com/users/skuppa/orgs","repos_url":"https://api.github.com/users/skuppa/repos","events_url":"https://api.github.com/users/skuppa/events{/privacy}","received_events_url":"https://api.github.com/users/skuppa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-triage","name":"waiting-for-triage","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-28T23:01:40Z","updated_at":"2015-12-29T00:22:44Z","closed_at":"2015-12-29T00:22:44Z","body":"I have multi project setup using gradle.   First module is a cassandra module and it does not have any spring boot dependency; it uses `cassandra-driver-core:3.0.0-beta1`.  The dependency graph shows that it is using the `3.0.0-beta1` and it works correctly within this module.\r\n\r\nThe second module is a core module and it includes the cassandra module and it is a `spring-boot-starter-web` project.  It also uses the gradle plugin `spring-boot-gradle-plugin`.  The gradle plugin manages the dependency and it includes the `cassandra-driver-core:2.1.9` hence my cassandra module does not work inside the core module.  Now my question is, how do I override the cassandra version which is managed by `spring-boot-gradle-plugin`.\r\n\r\nBTW.. I am not using the `sping-boot-data-cassandra`\r\n\r\nHere is some gradle log\r\n```\r\n14:27:29.728 [INFO] [io.spring.gradle.dependencymanagement.DependencyManagement] Resolved versions: {org.springframework:spring-core=4.2.4.RELEASE, .....  com.datastax.cassandra:cassandra-driver-core=2.1.9, ...}\r\n....\r\n....\r\n14:27:29.841 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting dependency onepush:repository:unspecified(default) -> com.datastax.cassandra:cassandra-driver-core:3.0.0-beta1(compile)\r\n14:27:29.841 [DEBUG] [io.spring.gradle.dependencymanagement.VersionConfiguringAction] Processing dependency 'com.datastax.cassandra:cassandra-driver-core:3.0.0-beta1'\r\n14:27:29.841 [DEBUG] [io.spring.gradle.dependencymanagement.DependencyManagementContainer] Found managed version '2.1.9' for dependency 'com.datastax.cassandra:cassandra-driver-core' in global dependency management\r\n14:27:29.841 [INFO] [io.spring.gradle.dependencymanagement.VersionConfiguringAction] Using version '2.1.9' for dependency 'com.datastax.cassandra:cassandra-driver-core:3.0.0-beta1'\r\n14:27:29.841 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Selecting new module version com.datastax.cassandra:cassandra-driver-core:2.1.9\r\n....\r\n```\r\n\r\nThanks,\r\n-Sridharan"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/167683023","html_url":"https://github.com/spring-projects/spring-boot/issues/4855#issuecomment-167683023","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4855","id":167683023,"user":{"login":"skuppa","id":1365493,"avatar_url":"https://avatars.githubusercontent.com/u/1365493?v=3","gravatar_id":"","url":"https://api.github.com/users/skuppa","html_url":"https://github.com/skuppa","followers_url":"https://api.github.com/users/skuppa/followers","following_url":"https://api.github.com/users/skuppa/following{/other_user}","gists_url":"https://api.github.com/users/skuppa/gists{/gist_id}","starred_url":"https://api.github.com/users/skuppa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skuppa/subscriptions","organizations_url":"https://api.github.com/users/skuppa/orgs","repos_url":"https://api.github.com/users/skuppa/repos","events_url":"https://api.github.com/users/skuppa/events{/privacy}","received_events_url":"https://api.github.com/users/skuppa/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T00:22:44Z","updated_at":"2015-12-29T00:22:44Z","body":"adding the dependency explicitly in the core module should override the global dependency managed by plugin.\r\n\r\n`cassandra/build.gradle`\r\n```\r\n...\r\n\r\ndependencies {\r\n  compile \"com.datastax.cassandra:cassandra-driver-core:3.0.0-beta1\"\r\n}\r\n\r\n...\r\n```\r\n\r\n`core/build.gradle`\r\n```\r\n....\r\n\r\ndependencies {\r\n  compile project(':cassandra')\r\n\r\n  compile \"com.datastax.cassandra:cassandra-driver-core:3.0.0-beta1\"\r\n}\r\n\r\n...\r\n```\r\n\r\nThis solves the problem but still I believe that the plugin should provide configuration to override such managed version otherwise it will be a big issue to troubleshoot and figure out the issue.\r\n\r\nThanks,\r\n-Sridharan"}}