Installing the JDBC driver from a local Maven repository - 7.0

Talend ESB Container Administration Guide

EnrichVersion
7.0
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Administration and Monitoring
Design and Development
Installation and Upgrade
EnrichPlatform
Talend ESB

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 an Archiva repository (if your container is configured to work with Archiva),

  • or a local repository accessible from the container.

  1. 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

    The Archiva repository user can also publish the driver via the Archiva Web interface (via the Upload Artifact menu entry in the Archiva Web interface).

  2. 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