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="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ibm.db2.jcc</groupId>
    <artifactId>runtime</artifactId>
    <version>V8-FP15</version>
    <packaging>pom</packaging>
    <description>Library POM for the DB2 Universal Driver runtime jars 
from DB2 V8 FP15.</description>
    <dependencies>
        <dependency>
            <groupId>com.ibm.db2.jcc</groupId>
            <artifactId>db2jcc</artifactId>
            <version>V8-FP15</version>
        </dependency>
        <dependency>
            <groupId>com.ibm.db2.jcc</groupId>
            <artifactId>db2jcc_license_cisuz</artifactId>
            <version>V8-FP15</version>
        </dependency>
        <dependency>
            <groupId>com.ibm.db2.jcc</groupId>
            <artifactId>db2jcc_license_cu</artifactId>
            <version>V8-FP15</version>
        </dependency>
    </dependencies>
</project>

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 -DgroupId=com.ibm.db2.jcc 
-DartifactId=db2jcc               -Dversion=V8-FP15 -Dpackaging=jar 
-DgeneratePom=true -DrepositoryId=? -Durl=?
call mvn deploy:deploy-file -Dfile=db2jcc_license_cisuz.jar 
-DgroupId=com.ibm.db2.jcc -DartifactId=db2jcc_license_cisuz 
-Dversion=V8-FP15 -Dpackaging=jar -DgeneratePom=true -DrepositoryId=? 
-Durl=?
call mvn deploy:deploy-file -Dfile=db2jcc_license_cu.jar 
-DgroupId=com.ibm.db2.jcc -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).

-Chris


**********************************************************************
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to