title: Gradle unable to resolve Sonatype Nexus dependency in IntelliJ
body: <p>I am using Gradle in a new IntelliJ project. We have an internal Sonatype Nexus repository and I have declared that in <code>build.gradle</code>. I also added the dependency to the build script. </p>
  
  <pre><code>group 'com.companyName'
  version '1.0-SNAPSHOT'
  
  apply plugin: 'java'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
      maven{
          url 'http://host:port/nexus/content/repositories/releases'
      }
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.11'
      compile group: 'com.companyName', name:'abc', version: '2.2.7'
  }
  </code></pre>
  
  <p>As you can tell this is a brand new project. IntelliJ will build the project but wont resolve the external dependency. When I look in the Gradle projects view in IntelliJ there is a red squiggly line under the dependency and it says <code>Unable to resolve dependency</code>. I know the dependency exists and I can use it in Maven projects. </p>
  
  <p>I've search around without any solution, tried all different settings in the intelliJ project also. Any ideas?</p>