title: 403 Forbidden for jdbc driver from Oracle repository
body: <p>I want to download the <code>odjbc7.jar</code> at compile time so that I can run all of my tests in Travis CI. I've added a setting in my <code>gradle.properties</code> so that it'll only download the jar for building.</p>
  
  <p>Users of my tool will provide the driver themselves so as not to go against Oracles license agreements.</p>
  
  <p>All of the solutions I have found online answer the question by saying to point to a local jar which won't work for my CI build or for others wanting to build the application (I can't distribute the ojdbc jar as part of my repository).</p>
  
  <p>Below is the relevant sections of my <code>build.gradle</code>, 
  I have the properties <em>mavenOracleUsername</em> and <em>mavenOraclePassword</em> in my <code>gradle.properties</code> (I have checked these are correct on the Oracle single-sign on site) :</p>
  
  <pre><code>def oracleUsername = hasProperty('mavenOracleUsername') ? mavenOracleUsername : System.getenv('mavenOracleUsername')
  def oraclePassword = hasProperty('mavenOraclePassword') ? mavenOraclePassword : System.getenv('mavenOraclePassword')
  
  repositories {
      jcenter()
  
      maven {
          url "https://www.oracle.com/content/secure/maven/content"
  //        url "https://maven.oracle.com"
          credentials {
              username "${oracleUsername}"
              password "${oraclePassword}"
          }
      }
  }
  
  ...
  
  dependencies {
      compile group: 'com.oracle.jdbc', name: 'ojdbc7', version: '12.1.0.2'
  }
  </code></pre>
  
  <p>When I run my build I get the following error:</p>
  
  <pre><code>Could not resolve all dependencies for configuration ':compileClasspath'.
  &gt; Could not resolve com.oracle.jdbc:ojdbc7:12.1.0.2.
    Required by:
        project :
     &gt; Could not resolve com.oracle.jdbc:ojdbc7:12.1.0.2.
        &gt; Could not get resource 'https://www.oracle.com/content/secure/maven/content/com/oracle/jdbc/ojdbc7/12.1.0.2/ojdbc7-12.1.0.2.pom'.
           &gt; Could not GET 'https://www.oracle.com/content/secure/maven/content/com/oracle/jdbc/ojdbc7/12.1.0.2/ojdbc7-12.1.0.2.pom'. Received status code 403 from server: Forbidden
  </code></pre>
  
  <p>If I change the credentials I get a 401 response and if I change the version of the jar I get a <em>not found in repository</em> error.</p>