Sure, here you are:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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.roo.jdbc</groupId>
<artifactId>${pom.groupId}.${pkgArtifactId}</artifactId>
<packaging>bundle</packaging>
<version>${osgiVersion}</version>
<name>com-ibm-db2-roo-jdbc</name>
<description>This bundle wraps the standard Maven artifact: ${pkgArtifactId}-${pkgVersion}.</description>
<properties>
<pkgArtifactId>db2jcc4</pkgArtifactId>
<pkgVersion>9.7.2</pkgVersion>
<osgiVersion>${pkgVersion}.0001</osgiVersion>
<pkgVendor>IBM</pkgVendor>
<pkgDocUrl/>
<pkgLicense>http://www-01.ibm.com/software/data/db2</pkgLicense>
<repo.folder>com/ibm/db2/roo/jdbc</repo.folder>
<google.code.project.name>${project.name}</google.code.project.name>
</properties>
<dependencies>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>db2jcc4</artifactId>
<version>9.7.2</version>
<optional>true</optional>
</dependency>
</dependencies>
<scm>
<connection>scm:svn:https://${google.code.project.name}.googlecode.com/svn/trunk</connection>
<developerConnection>scm:svn:https://${google.code.project.name}.googlecode.com/svn/trunk</developerConnection>
<url>http://code.google.com/p/${google.code.project.name}/source/browse</url>
</scm>
<distributionManagement>
<repository>
<id>Google Code</id>
<url>dav:https://${google.code.project.name}.googlecode.com/svn/repo</url>
</repository>
</distributionManagement>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<remoteOBR>true</remoteOBR>
<bundleUrl>httppgp://${google.code.project.name}.googlecode.com/svn/repo/${repo.folder}/${project.artifactId}/${project.version}/${project.artifactId}-${project.version}.jar</bundleUrl>
<instructions>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Export-Package>*;version=${pom.version}</Export-Package>
<Bundle-Vendor>${pkgVendor} (wrapped into an OSGi bundle by the Spring Roo project build system)</Bundle-Vendor>
<Bundle-DocURL>${pkgDocUrl}</Bundle-DocURL>
<Bundle-License>${pkgLicense}</Bundle-License>
<Import-Package>COM.ibm.db2os390.*;resolution:=optional,com.ibm.websphere.*;resolution:=optional,javax.*;resolution:=optional,org.w3c.*;resolution:=optional,org.xml.*;resolution:=optional,sqlj.*;resolution:=optional,org.ietf.jgss;resolution:=optional,sun.*;resolution:=optional</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
The full procedure with db2jcc4.jar in the .m2 repository and a database named foo on localhost is:
1. Create 2 projects: wrapper and dbre.
2. In wrapper, start roo:
Code:
addon create wrapper --topLevelPackage com.ibm.db2.roo.jdbc --groupId com.ibm --artifactId db2jcc4 --version 9.7.2 --vendorName IBM --licenseUrl http://www-01.ibm.com/software/data/db2
quit
3. Edit the pom.xml to include the Import-Package line
4. mvn bundle:bundle
5. Copy the jar from wrapper/target to wrapper (i'm too lazy to figure out the correct --url file syntax). Start roo again:
Code:
osgi start --url file:com.ibm.db2.roo.jdbc.db2jcc4-9.7.2.0001.jar
quit
6. In dbre, start roo:
Code:
project --topLevelPackage com.example
persistence setup --provider HIBERNATE --database DB2 --hostName localhost --databaseName foo --userName foo --password bar
dependency remove --groupId com.ibm --artifactId db2jcc --version 3.59.81
dependency add --groupId com.ibm --artifactId db2jcc4 --version 9.7.2
database introspect --schema foo
database reverse engineer --schema foo
and that's it. As far as i can tell, only the db2jcc4.jar is required.