The Oracle JDBC drivers and Universal Connection Pool (UCP) are also available on the Oracle Maven Repository. The following versions are available on the Oracle Maven repository: 19.3.0.0., 18.3.0.0, 12.2.0.1, 12.1.0.2, 12.1.0.1, and 11.2.0.4. In addition, the companion jars including simplefan.jar, ons.jar, orai18n.jar etc., required for specific features are also available.
GAV details for ojdbc8.jar from 19.3.0.0:
<groupId>com.oracle.jdbc</groupId> <artifactId>ojdbc8</artifactId> <version>19.3.0.0</version>
Here is the list of artifacts available on Oracle Maven repository:
<groupid> is the same for all versions. Make sure to change the <artifactid> and <version> to the exact jar that you want to download.
Refer to Get Oracle JDBC drivers and UCP from the Oracle Maven Repository - NetBeans, Eclipse, Intellij for steps while using NetBeans, Eclipse, and Intellij. Follow the steps mentioned in this blog to successfully download the required version of Oracle JDBC drivers, UCP, or any other companion jars.
Step #1: Download Maven
-Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
Step#2: Registering with the Oracle Maven site
The Oracle Maven repository requires a valid user registration and the user should also accept the terms and conditions (T&Cs) by logging into http://maven.oracle.com. This username will be used in settings.xml.
Step#3: Create a settings-security.xml
Create a settings-security.xml file that holds the master password information under the local maven repository (Example: {USER_HOME}/.m2/ ) that is usually under the user home directory. For example: If the username is test then the path will be
mvn -encrypt-master-password <any_master_password> or
mvn -emp <any_master_password>
Sample settings-security.xml:
<settingsSecurity> <master>{By8wW7YcTxAHof0MF4Z3wPKboywhGJvxHD9m0NvHA2U=}</master> </settingsSecurity>
Step#4: Create a settings.xml file
The settings.xml file is required for downloading Oracle JDBC drivers and UCP. Encrypt the user password (the one used to accept T&Cs on http://maven.oracle.com) before using it in settings.xml. Use the following commands to encrypt the user password and update settings.xml as shown in the sample
mvn -encrypt-password <oracle_registered_password> or mvn -ep <oracle_registered_password>
<settings> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>proxy.mycompany.com</host> <nonProxyHosts>mycompany.com</nonProxyHosts> </proxy> </proxies> <servers> <server> <id>maven.oracle.com </id> <username>firstname.lastname@test.com</username> <password>{pnwmhVnzdM8H3UAneUKLmaHGZCoaprbMQ/Ac5UktvsM=}</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>
Step#1: Create a pom.xml and specify GAV for JDBC drivers and UCP
Add the following GAV details for downloading JDBC driver or UCP from the required version.<dependencies> <dependency> <groupId>com.oracle.jdbc</groupId> <artifactId>ojdbc8</artifactId> <version>19.3.0.0</version> </dependency> </dependencies> <repositories> <repository> <id>maven.oracle.com</id> <name>oracle-maven-repo</name> <url>https://maven.oracle.com</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>maven.oracle.com</id> <name>oracle-maven-repo</name> <url>https://maven.oracle.com</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> </pluginRepository> </pluginRepositories>
Step#2: Create 'src' and 'target' directories
All Java source files must be placed under src directory. Example: /src/main/java/<foldername>/<filename>"mvn –s settings.xml package" or "mvn -s settings.xml compile" or "mvn -s settings.xml install"
➜ test mvn -s settings.xml compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jdbc-driver-prod 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom
Downloaded: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom (7 KB at 1.0 KB/sec)
Downloading: https://maven.oracle.com/com/oracle/jdbc/ucp/12.2.0.1/ucp-12.2.0.1.pom
Downloaded: https://maven.oracle.com/com/oracle/jdbc/ucp/12.2.0.1/ucp-12.2.0.1.pom (6 KB at 3.0 KB/sec)
....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.248 s
[INFO] Finished at: 2017-04-28T15:25:49-07:00
[INFO] Final Memory: 11M/202M
[INFO] -----------------------------
➜ maven-repo-prod mvn -s settings.xml package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jdbc-driver-prod 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/18.3.0.0/ojdbc8-18.3.0.0.pom
Downloaded: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/18.3.0.0/ojdbc8-18.3.0.0.pom (7 KB at 1.2 KB/sec)
Downloading: https://maven.oracle.com/com/oracle/jdbc/ucp/18.3.0.0/ucp-18.3.0.0.pom
Downloaded: https://maven.oracle.com/com/oracle/jdbc/ucp/18.3.0.0/ucp-18.3.0.0.pom (6 KB at 1.2 KB/sec)
Downloading: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/18.3.0.0/ojdbc8-18.3.0.0.jar
Downloading: https://maven.oracle.com/com/oracle/jdbc/ucp/18.3.0.0/ucp-18.3.0.0.jar
Downloaded: https://maven.oracle.com/com/oracle/jdbc/ucp/18.3.0.0/ucp-18.3.0.0.jar (1366 KB at 218.5 KB/sec)
Downloaded: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/18.3.0.0/ojdbc8-18.3.0.0.jar (4065 KB at 224.8 KB/sec)
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jdbc-driver-prod ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.240 s
[INFO] Finished at: 2018-09-28T16:24:42-07:00
[INFO] Final Memory: 16M/54M
[INFO] ------------------------------------------------------------------------
If the build was successful, then the JARs and POMs will be downloaded onto the local maven repository at ~/.m2/repository/com/oracle/jdbc/ojdbc8/19.3.0.0/ . Note that ojdbc8.jar will download ucp.jar as well. Each download has its own JAR and POM files.
Sample output:
➜ jdbc pwd
/Users/test/.m2/repository/com/oracle/jdbc
➜ jdbc ls -lt
total 0
drwxr-xr-x 3 nbsundar staff 96 Sep 28 16:24 ucp
drwxr-xr-x 3 nbsundar staff 96 Sep 28 13:44 ojdbc8
are the libs referenced in orai18n.jar manifest also available in Maven ojdbc8 - 18.3.0.0?
- gdk_custom.jar
- orai18n-mapping.jar
- orai18n-utility.jar
- orai18n-collation.jar
- orai18n-translation.jar
- orai18n-net.jar
- orai18n-servlet.jar
- orai18n-lcsd.jar
- orai18n-tools.jar
From service ticket SR #3-18414536941 I have learned that I need to download them from the 4.4 GByte database installation ZIP file ($ORACLE_HOME/jlib).
Is the gdk_custom.jar located %ORACLE_HOME%mdproperty_graphlib the correct one for 18.3?
Thx, Markus
We do not post other manifest files of orai18n.jar. The files that are available on OTN (https://www.oracle.com/technetwork/database/application-development/jdbc/downloads/jdbc-ucp-183-5013470.html) are the ones that are available on Oracle Maven as well.
Please download the other files from $ORACLE_HOME/lib.
Regards,
Nirmala