lqshow / notes

Cheat Sheet
10 stars 2 forks source link

Oracle Maven Repository setup #9

Open lqshow opened 6 years ago

lqshow commented 6 years ago

Error message

Could not resolve dependencies for project me.basebit.xdp:xdp-app:jar:0.1.2-SNAPSHOT: Failed to collect dependencies at com.orac
le.jdbc:ojdbc8:jar:12.2.0.1: Failed to read artifact descriptor for com.oracle.jdbc:ojdbc8:jar:12.2.0.1: Could not transfer artifact com.oracle.jdbc:ojdbc8:pom:12.2.0.1 from/to ma
ven.oracle.com (https://maven.oracle.com): Not authorized , ReasonPhrase:Authorization Required.

Registering with the Oracle Maven site

Create a settings.xml file

creating ~/.m2/settings.xml

<settings>
  <servers>
    <server>
      <id>maven.oracle.com</id>
      <username><YOUR USERNAME></username>
      <password><YOUR PASWORD></password>
      <configuration>
        <basicAuthScope>
          <host>ANY</host>
          <port>ANY</port>
          <realm>OAM 11g</realm>
        </basicAuthScope>
        <httpConfiguration>
          <all>
            <params>
              <property>
                <name>http.protocol.allow-circular-redirects</name>
                <value>%b,true</value>
              </property>
            </params>
          </all>
        </httpConfiguration>
      </configuration>
    </server>
  </servers>
</settings>

Reference

Get Oracle JDBC drivers and UCP from Oracle Maven Repository (without IDEs) Configuring the Oracle Maven Repository