How to use DB2's JCC jars as a single dependency.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to use DB2's JCC jars as a single dependency.

Chris Graham-2
I was asked privately how to:

"Can you explain what should I do to  use db2 jcc library as one
dependency in my maven project? What commands I should execute to gain
such feature?"

Simple, you need to install (into your local repo) or deploy (into your
corporate one, if you have one) the jars files individually (all three of
them) and the pom file (that holds them all together) into the repo.

These are the files that I have (the jars are from DB2 V8, FP15):

             1,139 db2-v8-fp15.pom
         1,216,068 db2jcc.jar
             2,063 db2jcc_license_cisuz.jar
             1,013 db2jcc_license_cu.jar

You need to construct a POM that acts as a library/aggregrate pom that
holds them all together, making use of the transative nature of maven 2.

This is what mine looks like:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""
    <description>Library POM for the DB2 Universal Driver runtime jars
from DB2 V8 FP15.</description>

Then you need to install/deploy them all, I have a batch file that does
them all in one hit:

This is how I deploy them:

call mvn deploy:deploy-file -Dfile=db2jcc.jar
-DartifactId=db2jcc               -Dversion=V8-FP15 -Dpackaging=jar
-DgeneratePom=true -DrepositoryId=? -Durl=?
call mvn deploy:deploy-file -Dfile=db2jcc_license_cisuz.jar -DartifactId=db2jcc_license_cisuz
-Dversion=V8-FP15 -Dpackaging=jar -DgeneratePom=true -DrepositoryId=?
call mvn deploy:deploy-file -Dfile=db2jcc_license_cu.jar -DartifactId=db2jcc_license_cu -Dversion=V8-FP15
-Dpackaging=jar -DgeneratePom=true -DrepositoryId=? -Durl=?

call mvn deploy:deploy-file -Dfile=db2-v8-fp15.pom
-DpomFile=db2-v8-fp15.pom -DrepositoryId=? -Durl=?

You'll just need to the the repositoryId and url to your local situation
(I can not help you on this one).


CAUTION - This message is intended for the addressee named above. It may contain privileged or confidential information.

If you are not the intended recipient of this message you must:
- Not use, copy, distribute or disclose it to anyone other than the addressee;
- Notify the sender via return email; and
- Delete the message (and any related attachments) from your computer immediately.

Internet emails are not necessarily secure. Australian Associated Motors Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do not accept responsibility for changes made to this message after it was sent.

Unless otherwise stated, views expressed within this email are the author's own and do not represent those of AAMI.

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]