Installing the JDBC driver from a local Maven repository
About this task
If there is no access to a public repository, the driver needs to be previously installed into a local repository. This is also true for proprietary databases such as Oracle, DB2 and SQLServer, as they do not publish their drivers in a public Maven repository.
Explicitly install the driver into local repository:
-
either a Nexus repository (if your container is configured to work with Nexus),
-
or a local repository accessible from the container.
Procedure
-
Install the driver into a repository using mvn
install:
-
Oracle:
mvn install:install-file -Dfile= "C:\oraclexe\app\oracle\product\11.2.0\server\jdbc\lib\ojdbc6.jar" -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=11.2.0.2.0 -Dpackaging=jar
-
DB2:
mvn install:install-file -Dfile="C:\Program Files(x86)\IBM\SQLLIB\java\db2jcc.jar" -DgroupId=com.ibm.db2.jdbc -DartifactId=db2jcc -Dversion=9.7 -Dpackaging=jar
-
SQLServer:
mvn install:install-file -Dfile="C:\sqljdbc4-3.0.jar" -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=3.0 -Dpackaging=jar
-
PostgreSQL:
mvn install:install-file -Dfile="C:\postgresql.jar" -DgroupId=postgresql -DartifactId=postgresql -Dversion=9.1-901.jdbc4 -Dpackaging=jar
-
-
Install the driver from the repository into a Talend Runtime Container using
bundle:install:
-
Oracle:
bundle:install wrap:mvn:ojdbc/ojdbc/11.2.0.2.0
-
DB2:
bundle:install wrap:mvn:com.ibm.db2.jdbc/db2jcc/9.7
-
SQLServer:
bundle:install wrap:mvn:com.microsoft.sqlserver/sqljdbc4/3.0
-
PostgreSQL:
bundle:install wrap:mvn:postgresql/postgresql/9.1-901.jdbc4
-