This will work to install any jar or package into your local Maven repository, just change the relevant sections in the command line entry.
To get the Oracle Driver go toand then to the JDBC Drivers page which at the time of writing is here:
Ensure you have Maven properly setup on your machine.
Navigate to the folder containing the jar in a command line prompt.
Enter the following;
mvn install:install-file -Dfile=ojdbc5.jar -DgroupId=com.oracle -DartifactId=ojdbc5 -Dversion=126.96.36.199 -Dpackaging=jar -DgeneratePom=true
-Dfile is the path to file
-DgroupId is the group ID
-DartifactId is the artefact ID
-Dversion is the version of the package
-Dpackaging is the package type i.e. jar
– DgeneratePom will automatically generate the pom.xml entry
Note: If you are using Powershell you will need to escape the – with a back tick so -Dfile=ojdbc5.jar becomes `-Dfile=ojdbc5.jar`
If you are adding Sun JARs is there is a helpful article on naming conventions to use here.